about summary refs log tree commit diff
path: root/src/test/ui/structs
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2018-12-18 00:40:22 +0000
committerAlexander Regueiro <alexreg@me.com>2018-12-26 21:54:18 +0000
commit8eb1a9e4e7337dd17827e00f0e1d2e10f11de30c (patch)
treef8f952c5bf48af13c7613aa3db015f9bc5670f8a /src/test/ui/structs
parent5a36f9e6e1eaf0330e499d15ab428350be837657 (diff)
downloadrust-8eb1a9e4e7337dd17827e00f0e1d2e10f11de30c.tar.gz
rust-8eb1a9e4e7337dd17827e00f0e1d2e10f11de30c.zip
Added regression test for using generic parameters on modules.
Diffstat (limited to 'src/test/ui/structs')
-rw-r--r--src/test/ui/structs/struct-path-associated-type.rs6
-rw-r--r--src/test/ui/structs/struct-path-associated-type.stderr14
-rw-r--r--src/test/ui/structs/struct-path-self.rs6
-rw-r--r--src/test/ui/structs/struct-path-self.stderr16
4 files changed, 21 insertions, 21 deletions
diff --git a/src/test/ui/structs/struct-path-associated-type.rs b/src/test/ui/structs/struct-path-associated-type.rs
index 1cafe265b2e..7c770852d22 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 parameters are not allowed on this type
+    //~| ERROR type arguments are not allowed on this entity
     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 parameters are not allowed on this type
+    let z = T::A::<u8> {}; //~ ERROR type arguments are not allowed on this entity
     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 parameters are not allowed on this type
+    //~^ ERROR type arguments are not allowed on this entity
     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 41360d87930..80824d98478 100644
--- a/src/test/ui/structs/struct-path-associated-type.stderr
+++ b/src/test/ui/structs/struct-path-associated-type.stderr
@@ -4,11 +4,11 @@ error[E0071]: expected struct, variant or union type, found associated type
 LL |     let s = T::A {};
    |             ^^^^ not a struct
 
-error[E0109]: type parameters are not allowed on this type
+error[E0109]: type arguments are not allowed on this entity
   --> $DIR/struct-path-associated-type.rs:14:20
    |
 LL |     let z = T::A::<u8> {};
-   |                    ^^ type parameter not allowed
+   |                    ^^ type argument not allowed
 
 error[E0071]: expected struct, variant or union type, found associated type
   --> $DIR/struct-path-associated-type.rs:14:13
@@ -22,11 +22,11 @@ error[E0071]: expected struct, variant or union type, found associated type
 LL |         T::A {} => {}
    |         ^^^^ not a struct
 
-error[E0109]: type parameters are not allowed on this type
+error[E0109]: type arguments are not allowed on this entity
   --> $DIR/struct-path-associated-type.rs:25:20
    |
-LL |     let z = T::A::<u8> {}; //~ ERROR type parameters are not allowed on this type
-   |                    ^^ type parameter not allowed
+LL |     let z = T::A::<u8> {}; //~ ERROR type arguments are not allowed on this entity
+   |                    ^^ type argument not allowed
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:32:13
@@ -34,11 +34,11 @@ error[E0223]: ambiguous associated type
 LL |     let s = S::A {}; //~ ERROR ambiguous associated type
    |             ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
 
-error[E0109]: type parameters are not allowed on this type
+error[E0109]: type arguments are not allowed on this entity
   --> $DIR/struct-path-associated-type.rs:33:20
    |
 LL |     let z = S::A::<u8> {}; //~ ERROR ambiguous associated type
-   |                    ^^ type parameter not allowed
+   |                    ^^ type argument not allowed
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:33:13
diff --git a/src/test/ui/structs/struct-path-self.rs b/src/test/ui/structs/struct-path-self.rs
index ccbf3db29b1..51ed9e5457e 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 parameters are not allowed on this type
+        //~| ERROR type arguments are not allowed on this entity
         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 parameters are not allowed on this type
+        let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
         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 parameters are not allowed on this type
+        let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
         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 a1df1a0764c..cda6b7a533f 100644
--- a/src/test/ui/structs/struct-path-self.stderr
+++ b/src/test/ui/structs/struct-path-self.stderr
@@ -4,11 +4,11 @@ error[E0071]: expected struct, variant or union type, found Self
 LL |         let s = Self {};
    |                 ^^^^ not a struct
 
-error[E0109]: type parameters are not allowed on this type
+error[E0109]: type arguments are not allowed on this entity
   --> $DIR/struct-path-self.rs:7:24
    |
 LL |         let z = Self::<u8> {};
-   |                        ^^ type parameter not allowed
+   |                        ^^ type argument not allowed
 
 error[E0071]: expected struct, variant or union type, found Self
   --> $DIR/struct-path-self.rs:7:17
@@ -22,17 +22,17 @@ error[E0071]: expected struct, variant or union type, found Self
 LL |             Self { .. } => {}
    |             ^^^^ not a struct
 
-error[E0109]: type parameters are not allowed on this type
+error[E0109]: type arguments are not allowed on this entity
   --> $DIR/struct-path-self.rs:20:24
    |
-LL |         let z = Self::<u8> {}; //~ ERROR type parameters are not allowed on this type
-   |                        ^^ type parameter not allowed
+LL |         let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
+   |                        ^^ type argument not allowed
 
-error[E0109]: type parameters are not allowed on this type
+error[E0109]: type arguments are not allowed on this entity
   --> $DIR/struct-path-self.rs:30:24
    |
-LL |         let z = Self::<u8> {}; //~ ERROR type parameters are not allowed on this type
-   |                        ^^ type parameter not allowed
+LL |         let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
+   |                        ^^ type argument not allowed
 
 error: aborting due to 6 previous errors