Skip to content

Commit 5ed3894

Browse files
committedJun 28, 2017
Move type parameter shadowing test to ui
1 parent 229d0d3 commit 5ed3894

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
 
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
error[E0194]: type parameter `T` shadows another type parameter of the same name
2+
--> $DIR/shadowed-type-parameter.rs:30:27
3+
|
4+
27 | trait Bar<T> {
5+
| - first `T` declared here
6+
...
7+
30 | fn shadow_in_required<T>(&self);
8+
| ^ shadows another type parameter
9+
10+
error[E0194]: type parameter `T` shadows another type parameter of the same name
11+
--> $DIR/shadowed-type-parameter.rs:33:27
12+
|
13+
27 | trait Bar<T> {
14+
| - first `T` declared here
15+
...
16+
33 | fn shadow_in_provided<T>(&self) {}
17+
| ^ shadows another type parameter
18+
19+
error[E0194]: type parameter `T` shadows another type parameter of the same name
20+
--> $DIR/shadowed-type-parameter.rs:18:25
21+
|
22+
17 | impl<T> Foo<T> {
23+
| - first `T` declared here
24+
18 | fn shadow_in_method<T>(&self) {}
25+
| ^ shadows another type parameter
26+
27+
error: aborting due to previous error(s)
28+

0 commit comments

Comments
 (0)