diff options
| author | b-naber <bn263@gmx.de> | 2021-02-18 21:01:44 +0100 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2021-05-11 14:09:46 +0200 |
| commit | e4d9bc66f65fd3d206587c07e33c4877fda073f9 (patch) | |
| tree | 1cbfff1dc8de7fd37b9c550e063d9e6256599676 /src/test/ui/generics | |
| parent | fe62c6e2958abfe54a9410a24a5750baf4c157e0 (diff) | |
improve diagnosts for GATs
Diffstat (limited to 'src/test/ui/generics')
13 files changed, 168 insertions, 168 deletions
diff --git a/src/test/ui/generics/bad-mid-path-type-params.rs b/src/test/ui/generics/bad-mid-path-type-params.rs index c42ce602e99..23a5d1525d9 100644 --- a/src/test/ui/generics/bad-mid-path-type-params.rs +++ b/src/test/ui/generics/bad-mid-path-type-params.rs @@ -28,17 +28,17 @@ impl Trait<isize> for S2 { fn foo<'a>() { let _ = S::new::<isize,f64>(1, 1.0); - //~^ ERROR this associated function takes 1 type argument but 2 type arguments were supplied + //~^ ERROR this associated function takes 1 let _ = S::<'a,isize>::new::<f64>(1, 1.0); //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied let _: S2 = Trait::new::<isize,f64>(1, 1.0); - //~^ ERROR this associated function takes 1 type argument but 2 type arguments were supplied + //~^ ERROR this associated function takes 1 let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); //~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this associated function takes 1 type argument but 2 type arguments were supplied + //~| ERROR this associated function takes 1 } fn main() {} diff --git a/src/test/ui/generics/bad-mid-path-type-params.stderr b/src/test/ui/generics/bad-mid-path-type-params.stderr index dd96856e563..aee2b60159f 100644 --- a/src/test/ui/generics/bad-mid-path-type-params.stderr +++ b/src/test/ui/generics/bad-mid-path-type-params.stderr @@ -1,12 +1,12 @@ -error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied +error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/bad-mid-path-type-params.rs:30:16 | LL | let _ = S::new::<isize,f64>(1, 1.0); - | ^^^ ---- help: remove this type argument + | ^^^ --- help: remove this generic argument | | - | expected 1 type argument + | expected 1 generic argument | -note: associated function defined here, with 1 type parameter: `U` +note: associated function defined here, with 1 generic parameter: `U` --> $DIR/bad-mid-path-type-params.rs:6:8 | LL | fn new<U>(x: T, _: U) -> S<T> { @@ -16,7 +16,7 @@ error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was --> $DIR/bad-mid-path-type-params.rs:33:13 | LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0); - | ^ --- help: remove this lifetime argument + | ^ -- help: remove this lifetime argument | | | expected 0 lifetime arguments | @@ -26,15 +26,15 @@ note: struct defined here, with 0 lifetime parameters LL | struct S<T> { | ^ -error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied +error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/bad-mid-path-type-params.rs:36:24 | LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0); - | ^^^ ---- help: remove this type argument + | ^^^ --- help: remove this generic argument | | - | expected 1 type argument + | expected 1 generic argument | -note: associated function defined here, with 1 type parameter: `U` +note: associated function defined here, with 1 generic parameter: `U` --> $DIR/bad-mid-path-type-params.rs:14:8 | LL | fn new<U>(x: T, y: U) -> Self; @@ -44,7 +44,7 @@ error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was --> $DIR/bad-mid-path-type-params.rs:39:17 | LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); - | ^^^^^ --- help: remove this lifetime argument + | ^^^^^ -- help: remove this lifetime argument | | | expected 0 lifetime arguments | @@ -54,15 +54,15 @@ note: trait defined here, with 0 lifetime parameters LL | trait Trait<T> { | ^^^^^ -error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied +error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/bad-mid-path-type-params.rs:39:36 | LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); - | ^^^ ---- help: remove this type argument + | ^^^ --- help: remove this generic argument | | - | expected 1 type argument + | expected 1 generic argument | -note: associated function defined here, with 1 type parameter: `U` +note: associated function defined here, with 1 generic parameter: `U` --> $DIR/bad-mid-path-type-params.rs:14:8 | LL | fn new<U>(x: T, y: U) -> Self; diff --git a/src/test/ui/generics/generic-arg-mismatch-recover.rs b/src/test/ui/generics/generic-arg-mismatch-recover.rs index 0e0d1daec5f..2cf7f1d657b 100644 --- a/src/test/ui/generics/generic-arg-mismatch-recover.rs +++ b/src/test/ui/generics/generic-arg-mismatch-recover.rs @@ -8,5 +8,5 @@ fn main() { Bar::<'static, 'static, ()>(&()); //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied - //~| ERROR this struct takes 0 type arguments but 1 type argument was supplied + //~| ERROR this struct takes 0 } diff --git a/src/test/ui/generics/generic-arg-mismatch-recover.stderr b/src/test/ui/generics/generic-arg-mismatch-recover.stderr index ca73b82737d..45fea925f27 100644 --- a/src/test/ui/generics/generic-arg-mismatch-recover.stderr +++ b/src/test/ui/generics/generic-arg-mismatch-recover.stderr @@ -2,7 +2,7 @@ error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments wer --> $DIR/generic-arg-mismatch-recover.rs:6:5 | LL | Foo::<'static, 'static, ()>(&0); - | ^^^ --------- help: remove this lifetime argument + | ^^^ ------- help: remove this lifetime argument | | | expected 1 lifetime argument | @@ -16,7 +16,7 @@ error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments wer --> $DIR/generic-arg-mismatch-recover.rs:9:5 | LL | Bar::<'static, 'static, ()>(&()); - | ^^^ --------- help: remove this lifetime argument + | ^^^ ------- help: remove this lifetime argument | | | expected 1 lifetime argument | @@ -26,15 +26,15 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Bar<'a>(&'a ()); | ^^^ -- -error[E0107]: this struct takes 0 type arguments but 1 type argument was supplied +error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied --> $DIR/generic-arg-mismatch-recover.rs:9:5 | LL | Bar::<'static, 'static, ()>(&()); - | ^^^ ---- help: remove this type argument + | ^^^ -- help: remove this generic argument | | - | expected 0 type arguments + | expected 0 generic arguments | -note: struct defined here, with 0 type parameters +note: struct defined here, with 0 generic parameters --> $DIR/generic-arg-mismatch-recover.rs:3:8 | LL | struct Bar<'a>(&'a ()); diff --git a/src/test/ui/generics/generic-impl-less-params-with-defaults.rs b/src/test/ui/generics/generic-impl-less-params-with-defaults.rs index 01964f652ee..66afbb58ad4 100644 --- a/src/test/ui/generics/generic-impl-less-params-with-defaults.rs +++ b/src/test/ui/generics/generic-impl-less-params-with-defaults.rs @@ -9,5 +9,5 @@ impl<A, B, C> Foo<A, B, C> { fn main() { Foo::<isize>::new(); - //~^ ERROR this struct takes at least 2 type arguments but only 1 type argument was supplied + //~^ ERROR this struct takes at least 2 generic arguments but 1 generic argument } diff --git a/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr b/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr index a8a17876ee0..2c7ffde7ddb 100644 --- a/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-impl-less-params-with-defaults.stderr @@ -1,17 +1,17 @@ -error[E0107]: this struct takes at least 2 type arguments but only 1 type argument was supplied +error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/generic-impl-less-params-with-defaults.rs:11:5 | LL | Foo::<isize>::new(); - | ^^^ ----- supplied 1 type argument + | ^^^ ----- supplied 1 generic argument | | - | expected at least 2 type arguments + | expected at least 2 generic arguments | -note: struct defined here, with at least 2 type parameters: `A`, `B` +note: struct defined here, with at least 2 generic parameters: `A`, `B` --> $DIR/generic-impl-less-params-with-defaults.rs:3:8 | LL | struct Foo<A, B, C = (A, B)>( | ^^^ - - -help: add missing type argument +help: add missing generic argument | LL | Foo::<isize, B>::new(); | ^^^ diff --git a/src/test/ui/generics/generic-impl-more-params-with-defaults.rs b/src/test/ui/generics/generic-impl-more-params-with-defaults.rs index 24c41a9088b..a283323742a 100644 --- a/src/test/ui/generics/generic-impl-more-params-with-defaults.rs +++ b/src/test/ui/generics/generic-impl-more-params-with-defaults.rs @@ -11,5 +11,5 @@ impl<T, A> Vec<T, A> { fn main() { Vec::<isize, Heap, bool>::new(); - //~^ ERROR this struct takes at most 2 type arguments but 3 type arguments were supplied + //~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments were supplied } diff --git a/src/test/ui/generics/generic-impl-more-params-with-defaults.stderr b/src/test/ui/generics/generic-impl-more-params-with-defaults.stderr index 8ba86afe91e..059289533da 100644 --- a/src/test/ui/generics/generic-impl-more-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-impl-more-params-with-defaults.stderr @@ -1,12 +1,12 @@ -error[E0107]: this struct takes at most 2 type arguments but 3 type arguments were supplied +error[E0107]: this struct takes at most 2 generic arguments but 3 generic arguments were supplied --> $DIR/generic-impl-more-params-with-defaults.rs:13:5 | LL | Vec::<isize, Heap, bool>::new(); - | ^^^ ------ help: remove this type argument + | ^^^ ---- help: remove this generic argument | | - | expected at most 2 type arguments + | expected at most 2 generic arguments | -note: struct defined here, with at most 2 type parameters: `T`, `A` +note: struct defined here, with at most 2 generic parameters: `T`, `A` --> $DIR/generic-impl-more-params-with-defaults.rs:5:8 | LL | struct Vec<T, A = Heap>( diff --git a/src/test/ui/generics/generic-type-less-params-with-defaults.stderr b/src/test/ui/generics/generic-type-less-params-with-defaults.stderr index 93f7a24d877..7c0836375e3 100644 --- a/src/test/ui/generics/generic-type-less-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-type-less-params-with-defaults.stderr @@ -2,17 +2,17 @@ error[E0107]: missing generics for struct `Vec` --> $DIR/generic-type-less-params-with-defaults.rs:9:12 | LL | let _: Vec; - | ^^^ expected at least 1 type argument + | ^^^ expected at least 1 generic argument | -note: struct defined here, with at least 1 type parameter: `T` +note: struct defined here, with at least 1 generic parameter: `T` --> $DIR/generic-type-less-params-with-defaults.rs:5:8 | LL | struct Vec<T, A = Heap>( | ^^^ - -help: use angle brackets to add missing type argument +help: add missing generic argument | LL | let _: Vec<T>; - | ^^^ + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/generics/generic-type-more-params-with-defaults.rs b/src/test/ui/generics/generic-type-more-params-with-defaults.rs index c421774ebba..3dab03297c9 100644 --- a/src/test/ui/generics/generic-type-more-params-with-defaults.rs +++ b/src/test/ui/generics/generic-type-more-params-with-defaults.rs @@ -7,5 +7,5 @@ struct Vec<T, A = Heap>( fn main() { let _: Vec<isize, Heap, bool>; - //~^ ERROR this struct takes at most 2 type arguments but 3 type arguments were supplied + //~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments } diff --git a/src/test/ui/generics/generic-type-more-params-with-defaults.stderr b/src/test/ui/generics/generic-type-more-params-with-defaults.stderr index e331481390b..500880cfb86 100644 --- a/src/test/ui/generics/generic-type-more-params-with-defaults.stderr +++ b/src/test/ui/generics/generic-type-more-params-with-defaults.stderr @@ -1,12 +1,12 @@ -error[E0107]: this struct takes at most 2 type arguments but 3 type arguments were supplied +error[E0107]: this struct takes at most 2 generic arguments but 3 generic arguments were supplied --> $DIR/generic-type-more-params-with-defaults.rs:9:12 | LL | let _: Vec<isize, Heap, bool>; - | ^^^ ------ help: remove this type argument + | ^^^ ---- help: remove this generic argument | | - | expected at most 2 type arguments + | expected at most 2 generic arguments | -note: struct defined here, with at most 2 type parameters: `T`, `A` +note: struct defined here, with at most 2 generic parameters: `T`, `A` --> $DIR/generic-type-more-params-with-defaults.rs:5:8 | LL | struct Vec<T, A = Heap>( diff --git a/src/test/ui/generics/wrong-number-of-args.rs b/src/test/ui/generics/wrong-number-of-args.rs index 2994ca3c759..f061c581459 100644 --- a/src/test/ui/generics/wrong-number-of-args.rs +++ b/src/test/ui/generics/wrong-number-of-args.rs @@ -4,18 +4,18 @@ mod no_generics { type A = Ty; type B = Ty<'static>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument //~| HELP remove these generics type C = Ty<'static, usize>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this struct takes 0 type arguments but 1 type argument was supplied + //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument + //~| ERROR this struct takes 0 generic arguments but 1 generic argument //~| HELP remove this lifetime argument - //~| HELP remove this type argument + //~| HELP remove this generic argument type D = Ty<'static, usize, { 0 }>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this struct takes 0 generic arguments but 2 generic arguments were supplied + //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument + //~| ERROR this struct takes 0 generic arguments but 2 generic arguments //~| HELP remove this lifetime argument //~| HELP remove these generic arguments } @@ -25,31 +25,31 @@ mod type_and_type { type A = Ty; //~^ ERROR missing generics for struct `type_and_type::Ty` - //~| HELP use angle brackets + //~| HELP add missing type B = Ty<usize>; - //~^ ERROR this struct takes 2 type arguments but only 1 type argument was supplied - //~| HELP add missing type argument + //~^ ERROR this struct takes 2 generic arguments but 1 generic argument + //~| HELP add missing type C = Ty<usize, String>; type D = Ty<usize, String, char>; - //~^ ERROR this struct takes 2 type arguments but 3 type arguments were supplied - //~| HELP remove this type argument + //~^ ERROR this struct takes 2 generic arguments but 3 generic arguments + //~| HELP remove this } mod lifetime_and_type { struct Ty<'a, T>; type A = Ty; - //~^ ERROR missing generics for struct `lifetime_and_type::Ty` + //~^ ERROR missing generics for struct //~| ERROR missing lifetime specifier + //~| HELP add missing //~| HELP consider introducing - //~| HELP use angle brackets type B = Ty<'static>; - //~^ ERROR this struct takes 1 type argument but 0 type arguments were supplied - //~| HELP add missing type argument + //~^ ERROR this struct takes 1 generic argument but 0 generic arguments + //~| HELP add missing type C = Ty<usize>; //~^ ERROR missing lifetime specifier @@ -63,18 +63,18 @@ mod type_and_type_and_type { type A = Ty; //~^ ERROR missing generics for struct `type_and_type_and_type::Ty` - //~| HELP use angle brackets + //~| HELP add missing type B = Ty<usize>; - //~^ ERROR this struct takes at least 2 type arguments but only 1 type argument was supplied - //~| HELP add missing type argument + //~^ ERROR this struct takes at least 2 + //~| HELP add missing type C = Ty<usize, String>; type D = Ty<usize, String, char>; type E = Ty<usize, String, char, f64>; - //~^ ERROR this struct takes at most 3 type arguments but 4 type arguments were supplied + //~^ ERROR this struct takes at most 3 //~| HELP remove } @@ -94,7 +94,7 @@ mod r#trait { } type A = Box<dyn NonGeneric<usize>>; - //~^ ERROR this trait takes 0 type arguments but 1 type argument was supplied + //~^ ERROR this trait takes 0 generic arguments but 1 generic argument //~| HELP remove type B = Box<dyn GenericLifetime>; @@ -107,10 +107,10 @@ mod r#trait { type D = Box<dyn GenericType>; //~^ ERROR missing generics for trait `GenericType` - //~| HELP use angle brackets + //~| HELP add missing type E = Box<dyn GenericType<String, usize>>; - //~^ ERROR this trait takes 1 type argument but 2 type arguments were supplied + //~^ ERROR this trait takes 1 generic argument but 2 generic arguments //~| HELP remove } @@ -120,40 +120,40 @@ mod stdlib { type A = HashMap; //~^ ERROR missing generics for struct `HashMap` - //~| HELP use angle brackets + //~| HELP add missing type B = HashMap<String>; - //~^ ERROR this struct takes at least 2 type arguments but only 1 type argument was supplied - //~| HELP add missing type argument + //~^ ERROR this struct takes at least + //~| HELP add missing type C = HashMap<'static>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument //~| HELP remove these generics - //~| ERROR this struct takes at least 2 type arguments but 0 type arguments were supplied - //~| HELP add missing type arguments + //~| ERROR this struct takes at least 2 + //~| HELP add missing type D = HashMap<usize, String, char, f64>; - //~^ ERROR this struct takes at most 3 type arguments but 4 type arguments were supplied - //~| HELP remove this type argument + //~^ ERROR this struct takes at most 3 + //~| HELP remove this } mod result { type A = Result; //~^ ERROR missing generics for enum `Result` - //~| HELP use angle brackets + //~| HELP add missing type B = Result<String>; - //~^ ERROR this enum takes 2 type arguments but only 1 type argument was supplied - //~| HELP add missing type argument + //~^ ERROR this enum takes 2 generic arguments but 1 generic argument + //~| HELP add missing type C = Result<'static>; - //~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument //~| HELP remove these generics - //~| ERROR this enum takes 2 type arguments but 0 type arguments were supplied - //~| HELP add missing type arguments + //~| ERROR this enum takes 2 generic arguments but 0 generic arguments + //~| HELP add missing type D = Result<usize, String, char>; - //~^ ERROR this enum takes 2 type arguments but 3 type arguments were supplied + //~^ ERROR this enum takes 2 generic arguments but 3 generic arguments //~| HELP remove } } diff --git a/src/test/ui/generics/wrong-number-of-args.stderr b/src/test/ui/generics/wrong-number-of-args.stderr index 94fdd355d48..45bde4163d0 100644 --- a/src/test/ui/generics/wrong-number-of-args.stderr +++ b/src/test/ui/generics/wrong-number-of-args.stderr @@ -16,7 +16,7 @@ error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was --> $DIR/wrong-number-of-args.rs:10:14 | LL | type C = Ty<'static, usize>; - | ^^ --------- help: remove this lifetime argument + | ^^ ------- help: remove this lifetime argument | | | expected 0 lifetime arguments | @@ -26,15 +26,15 @@ note: struct defined here, with 0 lifetime parameters LL | struct Ty; | ^^ -error[E0107]: this struct takes 0 type arguments but 1 type argument was supplied +error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:10:14 | LL | type C = Ty<'static, usize>; - | ^^ ------- help: remove this type argument + | ^^ ----- help: remove this generic argument | | - | expected 0 type arguments + | expected 0 generic arguments | -note: struct defined here, with 0 type parameters +note: struct defined here, with 0 generic parameters --> $DIR/wrong-number-of-args.rs:2:12 | LL | struct Ty; @@ -44,7 +44,7 @@ error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was --> $DIR/wrong-number-of-args.rs:16:14 | LL | type D = Ty<'static, usize, { 0 }>; - | ^^ --------- help: remove this lifetime argument + | ^^ ------- help: remove this lifetime argument | | | expected 0 lifetime arguments | @@ -58,7 +58,7 @@ error[E0107]: this struct takes 0 generic arguments but 2 generic arguments were --> $DIR/wrong-number-of-args.rs:16:14 | LL | type D = Ty<'static, usize, { 0 }>; - | ^^ -------------- help: remove these generic arguments + | ^^ ------------ help: remove these generic arguments | | | expected 0 generic arguments | @@ -72,45 +72,45 @@ error[E0107]: missing generics for struct `type_and_type::Ty` --> $DIR/wrong-number-of-args.rs:26:14 | LL | type A = Ty; - | ^^ expected 2 type arguments + | ^^ expected 2 generic arguments | -note: struct defined here, with 2 type parameters: `A`, `B` +note: struct defined here, with 2 generic parameters: `A`, `B` --> $DIR/wrong-number-of-args.rs:24:12 | LL | struct Ty<A, B>; | ^^ - - -help: use angle brackets to add missing type arguments +help: add missing generic arguments | LL | type A = Ty<A, B>; - | ^^^^^^ + | ^^^^^^^^ -error[E0107]: this struct takes 2 type arguments but only 1 type argument was supplied +error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:30:14 | LL | type B = Ty<usize>; - | ^^ ----- supplied 1 type argument + | ^^ ----- supplied 1 generic argument | | - | expected 2 type arguments + | expected 2 generic arguments | -note: struct defined here, with 2 type parameters: `A`, `B` +note: struct defined here, with 2 generic parameters: `A`, `B` --> $DIR/wrong-number-of-args.rs:24:12 | LL | struct Ty<A, B>; | ^^ - - -help: add missing type argument +help: add missing generic argument | LL | type B = Ty<usize, B>; | ^^^ -error[E0107]: this struct takes 2 type arguments but 3 type arguments were supplied +error[E0107]: this struct takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:36:14 | LL | type D = Ty<usize, String, char>; - | ^^ ------ help: remove this type argument + | ^^ ---- help: remove this generic argument | | - | expected 2 type arguments + | expected 2 generic arguments | -note: struct defined here, with 2 type parameters: `A`, `B` +note: struct defined here, with 2 generic parameters: `A`, `B` --> $DIR/wrong-number-of-args.rs:24:12 | LL | struct Ty<A, B>; @@ -120,17 +120,17 @@ error[E0107]: missing generics for struct `lifetime_and_type::Ty` --> $DIR/wrong-number-of-args.rs:44:14 | LL | type A = Ty; - | ^^ expected 1 type argument + | ^^ expected 1 generic argument | -note: struct defined here, with 1 type parameter: `T` +note: struct defined here, with 1 generic parameter: `T` --> $DIR/wrong-number-of-args.rs:42:12 | LL | struct Ty<'a, T>; | ^^ - -help: use angle brackets to add missing type argument +help: add missing generic argument | LL | type A = Ty<T>; - | ^^^ + | ^^^^^ error[E0106]: missing lifetime specifier --> $DIR/wrong-number-of-args.rs:44:14 @@ -143,18 +143,18 @@ help: consider introducing a named lifetime parameter LL | type A<'a> = Ty<'a>; | ^^^^ ^^^^^^ -error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied +error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:50:14 | LL | type B = Ty<'static>; - | ^^ expected 1 type argument + | ^^ expected 1 generic argument | -note: struct defined here, with 1 type parameter: `T` +note: struct defined here, with 1 generic parameter: `T` --> $DIR/wrong-number-of-args.rs:42:12 | LL | struct Ty<'a, T>; | ^^ - -help: add missing type argument +help: add missing generic argument | LL | type B = Ty<'static, T>; | ^^^ @@ -174,59 +174,59 @@ error[E0107]: missing generics for struct `type_and_type_and_type::Ty` --> $DIR/wrong-number-of-args.rs:64:14 | LL | type A = Ty; - | ^^ expected at least 2 type arguments + | ^^ expected at least 2 generic arguments | -note: struct defined here, with at least 2 type parameters: `A`, `B` +note: struct defined here, with at least 2 generic parameters: `A`, `B` --> $DIR/wrong-number-of-args.rs:62:12 | LL | struct Ty<A, B, C = &'static str>; | ^^ - - -help: use angle brackets to add missing type arguments +help: add missing generic arguments | LL | type A = Ty<A, B>; - | ^^^^^^ + | ^^^^^^^^ -error[E0107]: this struct takes at least 2 type arguments but only 1 type argument was supplied +error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:68:14 | LL | type B = Ty<usize>; - | ^^ ----- supplied 1 type argument + | ^^ ----- supplied 1 generic argument | | - | expected at least 2 type arguments + | expected at least 2 generic arguments | -note: struct defined here, with at least 2 type parameters: `A`, `B` +note: struct defined here, with at least 2 generic parameters: `A`, `B` --> $DIR/wrong-number-of-args.rs:62:12 | LL | struct Ty<A, B, C = &'static str>; | ^^ - - -help: add missing type argument +help: add missing generic argument | LL | type B = Ty<usize, B>; | ^^^ -error[E0107]: this struct takes at most 3 type arguments but 4 type arguments were supplied +error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:76:14 | LL | type E = Ty<usize, String, char, f64>; - | ^^ ----- help: remove this type argument + | ^^ --- help: remove this generic argument | | - | expected at most 3 type arguments + | expected at most 3 generic arguments | -note: struct defined here, with at most 3 type parameters: `A`, `B`, `C` +note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C` --> $DIR/wrong-number-of-args.rs:62:12 | LL | struct Ty<A, B, C = &'static str>; | ^^ - - - -error[E0107]: this trait takes 0 type arguments but 1 type argument was supplied +error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:96:22 | LL | type A = Box<dyn NonGeneric<usize>>; | ^^^^^^^^^^------- help: remove these generics | | - | expected 0 type arguments + | expected 0 generic arguments | -note: trait defined here, with 0 type parameters +note: trait defined here, with 0 generic parameters --> $DIR/wrong-number-of-args.rs:84:11 | LL | trait NonGeneric { @@ -247,7 +247,7 @@ error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were --> $DIR/wrong-number-of-args.rs:104:22 | LL | type C = Box<dyn GenericLifetime<'static, 'static>>; - | ^^^^^^^^^^^^^^^ --------- help: remove this lifetime argument + | ^^^^^^^^^^^^^^^ ------- help: remove this lifetime argument | | | expected 1 lifetime argument | @@ -261,27 +261,27 @@ error[E0107]: missing generics for trait `GenericType` --> $DIR/wrong-number-of-args.rs:108:22 | LL | type D = Box<dyn GenericType>; - | ^^^^^^^^^^^ expected 1 type argument + | ^^^^^^^^^^^ expected 1 generic argument | -note: trait defined here, with 1 type parameter: `A` +note: trait defined here, with 1 generic parameter: `A` --> $DIR/wrong-number-of-args.rs:92:11 | LL | trait GenericType<A> { | ^^^^^^^^^^^ - -help: use angle brackets to add missing type argument +help: add missing generic argument | LL | type D = Box<dyn GenericType<A>>; - | ^^^ + | ^^^^^^^^^^^^^^ -error[E0107]: this trait takes 1 type argument but 2 type arguments were supplied +error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:112:22 | LL | type E = Box<dyn GenericType<String, usize>>; - | ^^^^^^^^^^^ ------- help: remove this type argument + | ^^^^^^^^^^^ ----- help: remove this generic argument | | - | expected 1 type argument + | expected 1 generic argument | -note: trait defined here, with 1 type parameter: `A` +note: trait defined here, with 1 generic parameter: `A` --> $DIR/wrong-number-of-args.rs:92:11 | LL | trait GenericType<A> { @@ -291,32 +291,32 @@ error[E0107]: missing generics for struct `HashMap` --> $DIR/wrong-number-of-args.rs:121:18 | LL | type A = HashMap; - | ^^^^^^^ expected at least 2 type arguments + | ^^^^^^^ expected at least 2 generic arguments | -note: struct defined here, with at least 2 type parameters: `K`, `V` +note: struct defined here, with at least 2 generic parameters: `K`, `V` --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL | LL | pub struct HashMap<K, V, S = RandomState> { | ^^^^^^^ - - -help: use angle brackets to add missing type arguments +help: add missing generic arguments | LL | type A = HashMap<K, V>; - | ^^^^^^ + | ^^^^^^^^^^^^^ -error[E0107]: this struct takes at least 2 type arguments but only 1 type argument was supplied +error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:125:18 | LL | type B = HashMap<String>; - | ^^^^^^^ ------ supplied 1 type argument + | ^^^^^^^ ------ supplied 1 generic argument | | - | expected at least 2 type arguments + | expected at least 2 generic arguments | -note: struct defined here, with at least 2 type parameters: `K`, `V` +note: struct defined here, with at least 2 generic parameters: `K`, `V` --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL | LL | pub struct HashMap<K, V, S = RandomState> { | ^^^^^^^ - - -help: add missing type argument +help: add missing generic argument | LL | type B = HashMap<String, V>; | ^^^ @@ -335,31 +335,31 @@ note: struct defined here, with 0 lifetime parameters LL | pub struct HashMap<K, V, S = RandomState> { | ^^^^^^^ -error[E0107]: this struct takes at least 2 type arguments but 0 type arguments were supplied +error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:129:18 | LL | type C = HashMap<'static>; - | ^^^^^^^ expected at least 2 type arguments + | ^^^^^^^ expected at least 2 generic arguments | -note: struct defined here, with at least 2 type parameters: `K`, `V` +note: struct defined here, with at least 2 generic parameters: `K`, `V` --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL | LL | pub struct HashMap<K, V, S = RandomState> { | ^^^^^^^ - - -help: add missing type arguments +help: add missing generic arguments | LL | type C = HashMap<'static, K, V>; | ^^^^^^ -error[E0107]: this struct takes at most 3 type arguments but 4 type arguments were supplied +error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:135:18 | LL | type D = HashMap<usize, String, char, f64>; - | ^^^^^^^ ----- help: remove this type argument + | ^^^^^^^ --- help: remove this generic argument | | - | expected at most 3 type arguments + | expected at most 3 generic arguments | -note: struct defined here, with at most 3 type parameters: `K`, `V`, `S` +note: struct defined here, with at most 3 generic parameters: `K`, `V`, `S` --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL | LL | pub struct HashMap<K, V, S = RandomState> { @@ -369,32 +369,32 @@ error[E0107]: missing generics for enum `Result` --> $DIR/wrong-number-of-args.rs:141:18 | LL | type A = Result; - | ^^^^^^ expected 2 type arguments + | ^^^^^^ expected 2 generic arguments | -note: enum defined here, with 2 type parameters: `T`, `E` +note: enum defined here, with 2 generic parameters: `T`, `E` --> $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result<T, E> { | ^^^^^^ - - -help: use angle brackets to add missing type arguments +help: add missing generic arguments | LL | type A = Result<T, E>; - | ^^^^^^ + | ^^^^^^^^^^^^ -error[E0107]: this enum takes 2 type arguments but only 1 type argument was supplied +error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:145:18 | LL | type B = Result<String>; - | ^^^^^^ ------ supplied 1 type argument + | ^^^^^^ ------ supplied 1 generic argument | | - | expected 2 type arguments + | expected 2 generic arguments | -note: enum defined here, with 2 type parameters: `T`, `E` +note: enum defined here, with 2 generic parameters: `T`, `E` --> $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result<T, E> { | ^^^^^^ - - -help: add missing type argument +help: add missing generic argument | LL | type B = Result<String, E>; | ^^^ @@ -413,31 +413,31 @@ note: enum defined here, with 0 lifetime parameters LL | pub enum Result<T, E> { | ^^^^^^ -error[E0107]: this enum takes 2 type arguments but 0 type arguments were supplied +error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:149:18 | LL | type C = Result<'static>; - | ^^^^^^ expected 2 type arguments + | ^^^^^^ expected 2 generic arguments | -note: enum defined here, with 2 type parameters: `T`, `E` +note: enum defined here, with 2 generic parameters: `T`, `E` --> $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result<T, E> { | ^^^^^^ - - -help: add missing type arguments +help: add missing generic arguments | LL | type C = Result<'static, T, E>; | ^^^^^^ -error[E0107]: this enum takes 2 type arguments but 3 type arguments were supplied +error[E0107]: this enum takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:155:18 | LL | type D = Result<usize, String, char>; - | ^^^^^^ ------ help: remove this type argument + | ^^^^^^ ---- help: remove this generic argument | | - | expected 2 type arguments + | expected 2 generic arguments | -note: enum defined here, with 2 type parameters: `T`, `E` +note: enum defined here, with 2 generic parameters: `T`, `E` --> $SRC_DIR/core/src/result.rs:LL:COL | LL | pub enum Result<T, E> { |
