Skip to content

E0194 needs to be updated to new format #35280

Closed
@sophiajt

Description

@sophiajt

From: src/test/compile-fail/E0194.rs

Error E0194 needs a span_label, updating it from:

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

To:

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

Bonus: the span can be shortened and we can reference the other T

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions