@@ -36,6 +36,7 @@ mod test_1 {
3636 //~| ERROR can't use generic parameters from outer item
3737 //~| ERROR: unresolved item provided when a constant was expected
3838 //~| ERROR: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
39+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
3940 }
4041}
4142
@@ -44,36 +45,45 @@ mod test_2 {
4445
4546 reuse foo:: < > as bar1;
4647 //~^ ERROR: the placeholder `_` is not allowed within types on item signatures for functions
48+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
4749
4850 reuse foo:: < String , String > as bar2;
4951 //~^ ERROR: function takes 3 generic arguments but 2 generic arguments were supplied
5052 //~| ERROR: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
53+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
5154
5255 reuse foo:: < ' static , _ , ' asdasd , ' static , ' static , ' static , _ > as bar3;
5356 //~^ ERROR: use of undeclared lifetime name `'asdasd`
5457 //~| ERROR: function takes 2 lifetime arguments but 5 lifetime arguments were supplied
5558 //~| ERROR: function takes 3 generic arguments but 2 generic arguments were supplied
59+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
60+
5661 reuse foo:: < String , ' static , 123 , asdasd > as bar4;
5762 //~^ ERROR: cannot find type `asdasd` in this scope
5863 //~| ERROR: function takes 2 lifetime arguments but 1 lifetime argument was supplied
64+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
5965
6066 reuse foo:: < 1 , 2 , _ , 4 , 5 , _ > as bar5;
6167 //~^ ERROR: function takes 3 generic arguments but 6 generic arguments were supplied
6268 //~| ERROR: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
69+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
6370
6471 reuse foo:: < 1 , 2 , asd , String , { let x = 0 ; } > as bar6;
6572 //~^ ERROR: cannot find type `asd` in this scope
6673 //~| ERROR: function takes 3 generic arguments but 5 generic arguments were supplied
6774 //~| ERROR: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
75+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
6876
6977 reuse foo:: < "asdasd" , asd , "askdn" , ' static , ' a > as bar7;
7078 //~^ ERROR: use of undeclared lifetime name `'a`
7179 //~| ERROR: cannot find type `asd` in this scope
7280 //~| ERROR: constant provided when a type was expected
81+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
7382
7483 reuse foo:: < { } , { } , { } > as bar8;
7584 //~^ ERROR: constant provided when a type was expected
7685 //~| ERROR: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
86+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
7787}
7888
7989mod test_3 {
@@ -90,34 +100,43 @@ mod test_3 {
90100 //~| ERROR: cannot find type `asdasa` in this scope
91101 //~| ERROR: trait takes 3 lifetime arguments but 0 lifetime arguments were supplied
92102 //~| ERROR: trait takes 2 generic arguments but 6 generic arguments were supplied
103+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
93104
94105 reuse Trait :: < ' static , ' static > :: foo as bar2;
95106 //~^ ERROR: trait takes 3 lifetime arguments but 2 lifetime arguments were supplied
96107 //~| ERROR: the placeholder `_` is not allowed within types on item signatures for functions
108+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
97109 reuse Trait :: < 1 , 2 , 3 , 4 , 5 > :: foo as bar3;
98110 //~^ ERROR: trait takes 3 lifetime arguments but 0 lifetime arguments were supplied
99111 //~| ERROR: trait takes 2 generic arguments but 5 generic arguments were supplied
112+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
100113
101114 reuse Trait :: < 1 , 2 , true > :: foo as bar4;
102115 //~^ ERROR: trait takes 3 lifetime arguments but 0 lifetime arguments were supplied
103116 //~| ERROR: trait takes 2 generic arguments but 3 generic arguments were supplied
117+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
104118
105119 reuse Trait :: < ' static > :: foo as bar5;
106120 //~^ ERROR: trait takes 3 lifetime arguments but 1 lifetime argument was supplied
107121 //~| ERROR: the placeholder `_` is not allowed within types on item signatures for functions
122+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
108123
109124 reuse Trait :: < 1 , 2 , ' static , DDDD > :: foo:: < 1 , 2 , 3 , 4 , 5 , 6 > as bar6;
110125 //~^ ERROR: cannot find type `DDDD` in this scope [E0425]
111126 //~| ERROR: trait takes 3 lifetime arguments but 1 lifetime argument was supplied
112127 //~| ERROR: trait takes 2 generic arguments but 3 generic arguments were supplied
113128 //~| ERROR: method takes 2 generic arguments but 6 generic arguments were supplied
114129 //~| ERROR: method takes 1 lifetime argument but 0 lifetime arguments were supplied
130+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
131+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
115132
116133 reuse Trait :: < Trait , Clone , _ , ' static , dyn Send , _ > :: foo:: < 1 , 2 , 3 , _ , 6 > as bar7;
117134 //~^ ERROR: trait takes 3 lifetime arguments but 1 lifetime argument was supplied
118135 //~| ERROR: trait takes 2 generic arguments but 5 generic arguments were supplied
119136 //~| ERROR: method takes 2 generic arguments but 5 generic arguments were supplied
120137 //~| ERROR: method takes 1 lifetime argument but 0 lifetime arguments were supplied
138+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
139+ //~| ERROR: inferred lifetimes are not allowed in delegations as we need to inherit signature
121140}
122141
123142fn main( ) { }
0 commit comments