diff options
| author | varkor <github@varkor.com> | 2019-03-20 18:32:52 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-03-20 18:32:52 +0000 |
| commit | aff175b328d8d35969e5a76aa0fff4d6c4a5d262 (patch) | |
| tree | cd308683ae262bef60f7c8de793b8be8e41edee2 /src/test/ui/structs | |
| parent | 4900585a4f15f93bb466f8c194445a0e9e628d49 (diff) | |
| download | rust-aff175b328d8d35969e5a76aa0fff4d6c4a5d262.tar.gz rust-aff175b328d8d35969e5a76aa0fff4d6c4a5d262.zip | |
Update tests
Diffstat (limited to 'src/test/ui/structs')
| -rw-r--r-- | src/test/ui/structs/struct-path-associated-type.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-path-associated-type.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-path-self.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-path-self.stderr | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/test/ui/structs/struct-path-associated-type.rs b/src/test/ui/structs/struct-path-associated-type.rs index 7c770852d22..15b37facc50 100644 --- a/src/test/ui/structs/struct-path-associated-type.rs +++ b/src/test/ui/structs/struct-path-associated-type.rs @@ -13,7 +13,7 @@ fn f<T: Tr>() { //~^ ERROR expected struct, variant or union type, found associated type let z = T::A::<u8> {}; //~^ ERROR expected struct, variant or union type, found associated type - //~| ERROR type arguments are not allowed on this entity + //~| ERROR type arguments are not allowed for this type match S { T::A {} => {} //~^ ERROR expected struct, variant or union type, found associated type @@ -22,7 +22,7 @@ fn f<T: Tr>() { fn g<T: Tr<A = S>>() { let s = T::A {}; // OK - let z = T::A::<u8> {}; //~ ERROR type arguments are not allowed on this entity + let z = T::A::<u8> {}; //~ ERROR type arguments are not allowed for this type match S { T::A {} => {} // OK } @@ -31,7 +31,7 @@ fn g<T: Tr<A = S>>() { fn main() { let s = S::A {}; //~ ERROR ambiguous associated type let z = S::A::<u8> {}; //~ ERROR ambiguous associated type - //~^ ERROR type arguments are not allowed on this entity + //~^ ERROR type arguments are not allowed for this type match S { S::A {} => {} //~ ERROR ambiguous associated type } diff --git a/src/test/ui/structs/struct-path-associated-type.stderr b/src/test/ui/structs/struct-path-associated-type.stderr index 0ca64ed40a5..f054bd3d297 100644 --- a/src/test/ui/structs/struct-path-associated-type.stderr +++ b/src/test/ui/structs/struct-path-associated-type.stderr @@ -4,7 +4,7 @@ error[E0071]: expected struct, variant or union type, found associated type LL | let s = T::A {}; | ^^^^ not a struct -error[E0109]: type arguments are not allowed on this entity +error[E0109]: type arguments are not allowed for this type --> $DIR/struct-path-associated-type.rs:14:20 | LL | let z = T::A::<u8> {}; @@ -22,7 +22,7 @@ error[E0071]: expected struct, variant or union type, found associated type LL | T::A {} => {} | ^^^^ not a struct -error[E0109]: type arguments are not allowed on this entity +error[E0109]: type arguments are not allowed for this type --> $DIR/struct-path-associated-type.rs:25:20 | LL | let z = T::A::<u8> {}; @@ -34,7 +34,7 @@ error[E0223]: ambiguous associated type LL | let s = S::A {}; | ^^^^ help: use fully-qualified syntax: `<S as Trait>::A` -error[E0109]: type arguments are not allowed on this entity +error[E0109]: type arguments are not allowed for this type --> $DIR/struct-path-associated-type.rs:33:20 | LL | let z = S::A::<u8> {}; diff --git a/src/test/ui/structs/struct-path-self.rs b/src/test/ui/structs/struct-path-self.rs index 51ed9e5457e..77880bfca40 100644 --- a/src/test/ui/structs/struct-path-self.rs +++ b/src/test/ui/structs/struct-path-self.rs @@ -6,7 +6,7 @@ trait Tr { //~^ ERROR expected struct, variant or union type, found Self let z = Self::<u8> {}; //~^ ERROR expected struct, variant or union type, found Self - //~| ERROR type arguments are not allowed on this entity + //~| ERROR type arguments are not allowed for this type match s { Self { .. } => {} //~^ ERROR expected struct, variant or union type, found Self @@ -17,7 +17,7 @@ trait Tr { impl Tr for S { fn f() { let s = Self {}; // OK - let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity + let z = Self::<u8> {}; //~ ERROR type arguments are not allowed for this type match s { Self { .. } => {} // OK } @@ -27,7 +27,7 @@ impl Tr for S { impl S { fn g() { let s = Self {}; // OK - let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity + let z = Self::<u8> {}; //~ ERROR type arguments are not allowed for this type match s { Self { .. } => {} // OK } diff --git a/src/test/ui/structs/struct-path-self.stderr b/src/test/ui/structs/struct-path-self.stderr index 0fb02b9c44b..d9e84acdb3c 100644 --- a/src/test/ui/structs/struct-path-self.stderr +++ b/src/test/ui/structs/struct-path-self.stderr @@ -4,7 +4,7 @@ error[E0071]: expected struct, variant or union type, found Self LL | let s = Self {}; | ^^^^ not a struct -error[E0109]: type arguments are not allowed on this entity +error[E0109]: type arguments are not allowed for this type --> $DIR/struct-path-self.rs:7:24 | LL | let z = Self::<u8> {}; @@ -22,13 +22,13 @@ error[E0071]: expected struct, variant or union type, found Self LL | Self { .. } => {} | ^^^^ not a struct -error[E0109]: type arguments are not allowed on this entity +error[E0109]: type arguments are not allowed for this type --> $DIR/struct-path-self.rs:20:24 | LL | let z = Self::<u8> {}; | ^^ type argument not allowed -error[E0109]: type arguments are not allowed on this entity +error[E0109]: type arguments are not allowed for this type --> $DIR/struct-path-self.rs:30:24 | LL | let z = Self::<u8> {}; |
