-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Point at type parameter in plain path expr #101425
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @spastorino (or someone else) soon. Please see the contribution instructions for more information. |
@compiler-errors looks good but, what was happening before this PR? |
If you test the UI test on nightly: fn foo<T: std::fmt::Display>() {}
fn main() {
let x = foo::<()>;
//~^ ERROR `()` doesn't implement `std::fmt::Display`
} Then you see:
Notably, that error message on line 4 becomes (after this PR):
Notice the tighter span. This was because we were only triggering |
@bors r+ rollup |
… r=spastorino Point at type parameter in plain path expr Slightly better error message for a kinda unique use case.
… r=spastorino Point at type parameter in plain path expr Slightly better error message for a kinda unique use case.
Rollup of 7 pull requests Successful merges: - rust-lang#99291 (Add let else drop order tests) - rust-lang#101402 (Add a Machine hook for inline assembly) - rust-lang#101404 (Fix cleanup for uninitialized stdout) - rust-lang#101418 (Revert "Mention rust-analyzer maintainers when `proc_macro` bridge is changed") - rust-lang#101425 (Point at type parameter in plain path expr) - rust-lang#101426 (Don't duplicate file descriptors into stdio fds) - rust-lang#101447 (Remove generics_def_id_map from the resolver.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Slightly better error message for a kinda unique use case.