-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend rustc_on_unimplemented
to allow pointing at enclosing function/closure
#61709
Comments
@estebank Can I pick this up? I don't have much of an idea about this, but would like to get involved |
@sam09 of course! I can take a look at #54946 and #47613 for some changes made to this code, the currently up to date documentation for the feature. You will probably have to take a look at
|
@sam09 would you mind me picking this up? |
@Areredify @estebank |
@estebank I implemented it, but I don't know how to compile it, since I changed both libstd(added an annotation to the Try trait) and the compiler. |
…=davidtwco Add `enclosing scope` parameter to `rustc_on_unimplemented` Adds a new parameter to `#[rustc_on_unimplemented]`, `enclosing scope`, which highlights the function or closure scope with a message. The wip part refers to adding this annotation to `Try` trait to improve ergonomics (which I don't know how to do since I change both std and librustc) Closes rust-lang#61709.
We should extend
rustc_on_unimplemented
to be able to point at the enclosing scope. With that capability, we could turn the following:into something along the lines of
This has caused confusion in the wild.
The text was updated successfully, but these errors were encountered: