Skip to content
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 Bonus Formatting #36057

Closed
leikahing opened this issue Aug 27, 2016 · 1 comment · Fixed by #36148
Closed

E0194 Bonus Formatting #36057

leikahing opened this issue Aug 27, 2016 · 1 comment · Fixed by #36148
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@leikahing
Copy link
Contributor

This ticket covers the bonus portion of #35280 as part of #35233.

It takes the original error message updates and expands it to:

error[E0194]: type parameter `T` shadows another type parameter of the same name
  --> src/test/compile-fail/E0194.rs:13:5
   |
11 | trait Foo<T> {
   |           - first `T` declared here
12 |     fn do_something(&self) -> T;
13 |     fn do_something_else<T: Clone>(&self, bar: T); //~ ERROR E0194
   |                          ^ shadows another type parameter

I made this ticket in order to separate the improvement from the original issue.

@Aatch Aatch added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 28, 2016
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 29, 2016
…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
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 30, 2016
…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
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 30, 2016
…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
@leikahing
Copy link
Contributor Author

I have a fix ready for this/for review but I'm waiting for PR #36056 to be merged into master before I make another PR.

leikahing added a commit to leikahing/rust that referenced this issue Aug 30, 2016
…ng#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.
leikahing added a commit to leikahing/rust that referenced this issue Aug 30, 2016
…ng#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 30, 2016
…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
leikahing added a commit to leikahing/rust that referenced this issue Aug 31, 2016
…ng#36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 31, 2016
…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
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 31, 2016
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants