-
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
E0194 needs to be updated to new format #35280
Comments
I'll work on this one. |
@jonathandturner @nikomatsakis I'm working on the bonus portion of this issue but I'm wondering if either of you have any pointers about where to start exploring with manipulating the spans and getting more context out of it so that I can get something that looks like this:
Into this expanded context?
|
@birryree any chance we can chat on IRC? :) |
@birryree ok I did a bit of investigating. At the point where error E0194 is issued, we have access to a Whew! |
@nikomatsakis - Whoa, thanks for the detailed response! Sorry I didn't get back to you sooner - I'm currently headed to a conference. @jonathandturner gave me some pointers over the weekend which helped me get started on the bonus part, so I have been doing some exploration on-and-off into the source to get the steps down for doing what I need. Your post definitely helps me move in the right direction (I was exploring with Thanks again! |
@birryree - are you still interested in this one? If not, I can release it and let someone else volunteer. |
@jonathandturner Yes, sorry - I already have the changes local, about to make a PR. |
Bonus section is being tracked by #36057 because I wanted to commit the non-bonus part of the update before I committed/made a PR for my additional bonus fixes (as they may require some extra review). |
…jonathandturner Update E0194 to new error format Fixes rust-lang#35280 to update E0194 to support new error message format. Part of rust-lang#35233. A separate Github issue rust-lang#36057 tracks the bonus portion of the original ticket. r? @jonathandturner
…jonathandturner Update E0194 to new error format Fixes rust-lang#35280 to update E0194 to support new error message format. Part of rust-lang#35233. A separate Github issue rust-lang#36057 tracks the bonus portion of the original ticket. r? @jonathandturner
…jonathandturner Update E0194 to new error format Fixes rust-lang#35280 to update E0194 to support new error message format. Part of rust-lang#35233. A separate Github issue rust-lang#36057 tracks the bonus portion of the original ticket. r? @jonathandturner
…ng#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.
…ng#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.
…thandturner Bonus format for E0194 Bonus fix for rust-lang#35280. Part of rust-lang#35233. Fixes rust-lang#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages. Errors for E0194 now look like this: ``` $> ./build/x86_64-apple-darwin/stage1/bin/rustc src/test/compile-fail/E0194.rs error[E0194]: type parameter `T` shadows another type parameter of the same name --> src/test/compile-fail/E0194.rs:13:26 | 11 | trait Foo<T> { //~ NOTE first `T` declared here | - first `T` declared here 12 | fn do_something(&self) -> T; 13 | fn do_something_else<T: Clone>(&self, bar: T); | ^ shadows another type parameter error: aborting due to previous error ``` r? @jonathandturner
…ng#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.
…thandturner Bonus format for E0194 Bonus fix for rust-lang#35280. Part of rust-lang#35233. Fixes rust-lang#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages. Errors for E0194 now look like this: ``` $> ./build/x86_64-apple-darwin/stage1/bin/rustc src/test/compile-fail/E0194.rs error[E0194]: type parameter `T` shadows another type parameter of the same name --> src/test/compile-fail/E0194.rs:13:26 | 11 | trait Foo<T> { //~ NOTE first `T` declared here | - first `T` declared here 12 | fn do_something(&self) -> T; 13 | fn do_something_else<T: Clone>(&self, bar: T); | ^ shadows another type parameter error: aborting due to previous error ``` r? @jonathandturner
…thandturner Bonus format for E0194 Bonus fix for rust-lang#35280. Part of rust-lang#35233. Fixes rust-lang#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages. Errors for E0194 now look like this: ``` $> ./build/x86_64-apple-darwin/stage1/bin/rustc src/test/compile-fail/E0194.rs error[E0194]: type parameter `T` shadows another type parameter of the same name --> src/test/compile-fail/E0194.rs:13:26 | 11 | trait Foo<T> { //~ NOTE first `T` declared here | - first `T` declared here 12 | fn do_something(&self) -> T; 13 | fn do_something_else<T: Clone>(&self, bar: T); | ^ shadows another type parameter error: aborting due to previous error ``` r? @jonathandturner
From: src/test/compile-fail/E0194.rs
Error E0194 needs a span_label, updating it from:
To:
Bonus: the span can be shortened and we can reference the other
T
The text was updated successfully, but these errors were encountered: