mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Rollup merge of #42953 - estebank:fix-20729, r=petrochenkov
Move type parameter shadowing test to `ui` Fix #20729.
This commit is contained in:
commit
4f121542e9
28
src/test/ui/shadowed-type-parameter.stderr
Normal file
28
src/test/ui/shadowed-type-parameter.stderr
Normal file
@ -0,0 +1,28 @@
|
||||
error[E0194]: type parameter `T` shadows another type parameter of the same name
|
||||
--> $DIR/shadowed-type-parameter.rs:30:27
|
||||
|
|
||||
27 | trait Bar<T> {
|
||||
| - first `T` declared here
|
||||
...
|
||||
30 | fn shadow_in_required<T>(&self);
|
||||
| ^ shadows another type parameter
|
||||
|
||||
error[E0194]: type parameter `T` shadows another type parameter of the same name
|
||||
--> $DIR/shadowed-type-parameter.rs:33:27
|
||||
|
|
||||
27 | trait Bar<T> {
|
||||
| - first `T` declared here
|
||||
...
|
||||
33 | fn shadow_in_provided<T>(&self) {}
|
||||
| ^ shadows another type parameter
|
||||
|
||||
error[E0194]: type parameter `T` shadows another type parameter of the same name
|
||||
--> $DIR/shadowed-type-parameter.rs:18:25
|
||||
|
|
||||
17 | impl<T> Foo<T> {
|
||||
| - first `T` declared here
|
||||
18 | fn shadow_in_method<T>(&self) {}
|
||||
| ^ shadows another type parameter
|
||||
|
||||
error: aborting due to previous error(s)
|
||||
|
Loading…
Reference in New Issue
Block a user