diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-11-08 17:51:13 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-11-22 14:14:27 -0800 |
| commit | abdcb868ff69a5f6a96dd188ff845a1ec67335f8 (patch) | |
| tree | f17cca278a41f4713443b2a4f18ff1cfa67d490d /src/test/ui/error-codes | |
| parent | 910ec6d97ff03549c22352d7763be02b60d73470 (diff) | |
| download | rust-abdcb868ff69a5f6a96dd188ff845a1ec67335f8.tar.gz rust-abdcb868ff69a5f6a96dd188ff845a1ec67335f8.zip | |
Point at every unexpected lifetime and type argument in E0107
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0107-b.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0107-b.stderr | 24 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0107.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0107.stderr | 6 |
4 files changed, 38 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0107-b.rs b/src/test/ui/error-codes/E0107-b.rs new file mode 100644 index 00000000000..58e7718ba5b --- /dev/null +++ b/src/test/ui/error-codes/E0107-b.rs @@ -0,0 +1,8 @@ +pub trait T<X, Y> { + type A; + type B; + type C; +} + pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> } + + fn main() {} diff --git a/src/test/ui/error-codes/E0107-b.stderr b/src/test/ui/error-codes/E0107-b.stderr new file mode 100644 index 00000000000..28b957dc91e --- /dev/null +++ b/src/test/ui/error-codes/E0107-b.stderr @@ -0,0 +1,24 @@ +error[E0107]: wrong number of type arguments: expected 2, found 4 + --> $DIR/E0107-b.rs:6:42 + | +LL | pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> } + | ^^^^^ ^^^^^ unexpected type argument + | | + | unexpected type argument + +error[E0191]: the value of the associated type `A` (from the trait `T`) must be specified + --> $DIR/E0107-b.rs:6:26 + | +LL | pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing associated type `A` value + +error[E0191]: the value of the associated type `C` (from the trait `T`) must be specified + --> $DIR/E0107-b.rs:6:26 + | +LL | pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing associated type `C` value + +error: aborting due to 3 previous errors + +Some errors occurred: E0107, E0191. +For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/error-codes/E0107.rs b/src/test/ui/error-codes/E0107.rs index 815c7fefd2a..87ac9e37853 100644 --- a/src/test/ui/error-codes/E0107.rs +++ b/src/test/ui/error-codes/E0107.rs @@ -26,7 +26,8 @@ struct Baz<'a, 'b, 'c> { //~| unexpected lifetime argument foo2: Foo<'a, 'b, 'c>, //~^ ERROR E0107 - //~| 2 unexpected lifetime arguments + //~| unexpected lifetime argument + //~| unexpected lifetime argument } fn main() {} diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr index 497fa91bd4f..a07c92cf26a 100644 --- a/src/test/ui/error-codes/E0107.stderr +++ b/src/test/ui/error-codes/E0107.stderr @@ -11,10 +11,12 @@ LL | bar: Bar<'a>, | ^^ unexpected lifetime argument error[E0107]: wrong number of lifetime arguments: expected 1, found 3 - --> $DIR/E0107.rs:27:11 + --> $DIR/E0107.rs:27:19 | LL | foo2: Foo<'a, 'b, 'c>, - | ^^^^^^^^^^^^^^^ 2 unexpected lifetime arguments + | ^^ ^^ unexpected lifetime argument + | | + | unexpected lifetime argument error: aborting due to 3 previous errors |
