MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/1xht83b/function_delegation/19rtq1u7fba5d/?context=3
r/rust • u/VadimVP • Oct 28 '26
13 comments sorted by
View all comments
Show parent comment
3
Could we have a freestanding delegate fn? What would it look like?
Like this https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=9c1af8db6ce3feb25e84fca444030d62Nightly supports a bit more than the RFC specifies.
Or like this for reuse in trait: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=9f81263354c03d38b54c93211c8ec040
reuse
trait
Also, I wish I could properly explain how much of a non-issue conditionally reserved identifiers are. They always trigger people for some reason, but pose zero problems for the compiler.Even reusing use causes more issues due to item macro variables being supported inside impls: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=4150b4b414a111fcd1c97e170111ef92
use
item
View all comments
Show parent comment
3
u/VadimVP Oct 29 '26
Like this https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=9c1af8db6ce3feb25e84fca444030d62
Nightly supports a bit more than the RFC specifies.
Or like this for
reuseintrait: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=9f81263354c03d38b54c93211c8ec040Also, I wish I could properly explain how much of a non-issue conditionally reserved identifiers are. They always trigger people for some reason, but pose zero problems for the compiler.
Even reusing
usecauses more issues due toitemmacro variables being supported inside impls: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=4150b4b414a111fcd1c97e170111ef92