about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAvi Dessauer <avi.the.coder@gmail.com>2020-06-20 17:33:04 -0400
committerJacob Hughes <j@jacobhughes.me>2020-09-22 21:54:07 -0400
commitcb7264b22a45b993df57bd17e869a472a5c12b47 (patch)
tree54c3a7b664cf0dbda3d1c515b43e919a8e4d7189
parenteb7abb9e32a2ba10d0c083b13bb1a2dcd1d22b5d (diff)
Fix tests
-rw-r--r--src/test/ui/stability-attribute/generics-default-stability.rs4
-rw-r--r--src/test/ui/stability-attribute/generics-default-stability.stderr8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/stability-attribute/generics-default-stability.rs b/src/test/ui/stability-attribute/generics-default-stability.rs
index bacbc64ab47..7f3f90c1926 100644
--- a/src/test/ui/stability-attribute/generics-default-stability.rs
+++ b/src/test/ui/stability-attribute/generics-default-stability.rs
@@ -37,7 +37,7 @@ fn main() {
     let _ = STRUCT1; // ok
     let _: Struct1 = STRUCT1; // ok
     let _: Struct1<usize> = STRUCT1; //~ ERROR use of unstable library feature 'unstable_default'
-    let _: Struct1<isize> = STRUCT1; //~ ERROR use of unstable library feature 'unstable_default'
+    let _: Struct1<isize> = Struct1 { field: 0 }; //~ ERROR use of unstable library feature 'unstable_default'
 
     // Instability is not enforced for generic type parameters used in public fields.
     // Note how the unstable type default `usize` leaks,
@@ -56,7 +56,7 @@ fn main() {
     let _ = STRUCT2;
     let _: Struct2 = STRUCT2; // ok
     let _: Struct2<usize> = STRUCT2; // ok
-    let _: Struct2<usize> = STRUCT2; // ok
+    let _: Struct2<isize> = Struct2 { field: 0 }; // ok
     let _ = STRUCT2.field; // ok
     let _: usize = STRUCT2.field; // ok
     let _ = STRUCT2.field + 1; // ok
diff --git a/src/test/ui/stability-attribute/generics-default-stability.stderr b/src/test/ui/stability-attribute/generics-default-stability.stderr
index 00ddc873cfb..6b405b55769 100644
--- a/src/test/ui/stability-attribute/generics-default-stability.stderr
+++ b/src/test/ui/stability-attribute/generics-default-stability.stderr
@@ -23,7 +23,7 @@ LL | impl Trait2<usize> for S {
    = help: add `#![feature(unstable_default)]` to the crate attributes to enable
 
 error[E0658]: use of unstable library feature 'unstable_default'
-  --> $DIR/generics-default-stability.rs:37:20
+  --> $DIR/generics-default-stability.rs:35:20
    |
 LL |     let _: Struct1<isize> = Struct1 { field: 1 };
    |                    ^^^^^
@@ -31,7 +31,7 @@ LL |     let _: Struct1<isize> = Struct1 { field: 1 };
    = help: add `#![feature(unstable_default)]` to the crate attributes to enable
 
 error[E0658]: use of unstable library feature 'unstable_default'
-  --> $DIR/generics-default-stability.rs:41:20
+  --> $DIR/generics-default-stability.rs:39:20
    |
 LL |     let _: Struct1<usize> = STRUCT1;
    |                    ^^^^^
@@ -39,9 +39,9 @@ LL |     let _: Struct1<usize> = STRUCT1;
    = help: add `#![feature(unstable_default)]` to the crate attributes to enable
 
 error[E0658]: use of unstable library feature 'unstable_default'
-  --> $DIR/generics-default-stability.rs:42:20
+  --> $DIR/generics-default-stability.rs:40:20
    |
-LL |     let _: Struct1<usize> = STRUCT1;
+LL |     let _: Struct1<isize> = Struct1 { field: 0 };
    |                    ^^^^^
    |
    = help: add `#![feature(unstable_default)]` to the crate attributes to enable