forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#42953 - estebank:fix-20729, r=petrochenkov
Move type parameter shadowing test to `ui` Fix rust-lang#20729.
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|