This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/test/ui/stability-attribute Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ fn main() {
3737 let _ = STRUCT1 ; // ok
3838 let _: Struct1 = STRUCT1 ; // ok
3939 let _: Struct1 < usize > = STRUCT1 ; //~ ERROR use of unstable library feature 'unstable_default'
40- let _: Struct1 < isize > = STRUCT1 ; //~ ERROR use of unstable library feature 'unstable_default'
40+ let _: Struct1 < isize > = Struct1 { field : 0 } ; //~ ERROR use of unstable library feature 'unstable_default'
4141
4242 // Instability is not enforced for generic type parameters used in public fields.
4343 // Note how the unstable type default `usize` leaks,
@@ -56,7 +56,7 @@ fn main() {
5656 let _ = STRUCT2 ;
5757 let _: Struct2 = STRUCT2 ; // ok
5858 let _: Struct2 < usize > = STRUCT2 ; // ok
59- let _: Struct2 < usize > = STRUCT2 ; // ok
59+ let _: Struct2 < isize > = Struct2 { field : 0 } ; // ok
6060 let _ = STRUCT2 . field ; // ok
6161 let _: usize = STRUCT2 . field ; // ok
6262 let _ = STRUCT2 . field + 1 ; // ok
Original file line number Diff line number Diff line change @@ -23,25 +23,25 @@ LL | impl Trait2<usize> for S {
2323 = help: add `#![feature(unstable_default)]` to the crate attributes to enable
2424
2525error[E0658]: use of unstable library feature 'unstable_default'
26- --> $DIR/generics-default-stability.rs:37 :20
26+ --> $DIR/generics-default-stability.rs:35 :20
2727 |
2828LL | let _: Struct1<isize> = Struct1 { field: 1 };
2929 | ^^^^^
3030 |
3131 = help: add `#![feature(unstable_default)]` to the crate attributes to enable
3232
3333error[E0658]: use of unstable library feature 'unstable_default'
34- --> $DIR/generics-default-stability.rs:41 :20
34+ --> $DIR/generics-default-stability.rs:39 :20
3535 |
3636LL | let _: Struct1<usize> = STRUCT1;
3737 | ^^^^^
3838 |
3939 = help: add `#![feature(unstable_default)]` to the crate attributes to enable
4040
4141error[E0658]: use of unstable library feature 'unstable_default'
42- --> $DIR/generics-default-stability.rs:42 :20
42+ --> $DIR/generics-default-stability.rs:40 :20
4343 |
44- LL | let _: Struct1<usize > = STRUCT1 ;
44+ LL | let _: Struct1<isize > = Struct1 { field: 0 } ;
4545 | ^^^^^
4646 |
4747 = help: add `#![feature(unstable_default)]` to the crate attributes to enable
You can’t perform that action at this time.
0 commit comments