Move type parameter shadowing test to ui

This commit is contained in:
Esteban Küber 2017-06-28 11:09:00 -07:00
parent 229d0d3266
commit 5ed38946be
2 changed files with 28 additions and 0 deletions

View 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)