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() {
37
37
let _ = STRUCT1 ; // ok
38
38
let _: Struct1 = STRUCT1 ; // ok
39
39
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'
41
41
42
42
// Instability is not enforced for generic type parameters used in public fields.
43
43
// Note how the unstable type default `usize` leaks,
@@ -56,7 +56,7 @@ fn main() {
56
56
let _ = STRUCT2 ;
57
57
let _: Struct2 = STRUCT2 ; // ok
58
58
let _: Struct2 < usize > = STRUCT2 ; // ok
59
- let _: Struct2 < usize > = STRUCT2 ; // ok
59
+ let _: Struct2 < isize > = Struct2 { field : 0 } ; // ok
60
60
let _ = STRUCT2 . field ; // ok
61
61
let _: usize = STRUCT2 . field ; // ok
62
62
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 {
23
23
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
24
24
25
25
error[E0658]: use of unstable library feature 'unstable_default'
26
- --> $DIR/generics-default-stability.rs:37 :20
26
+ --> $DIR/generics-default-stability.rs:35 :20
27
27
|
28
28
LL | let _: Struct1<isize> = Struct1 { field: 1 };
29
29
| ^^^^^
30
30
|
31
31
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
32
32
33
33
error[E0658]: use of unstable library feature 'unstable_default'
34
- --> $DIR/generics-default-stability.rs:41 :20
34
+ --> $DIR/generics-default-stability.rs:39 :20
35
35
|
36
36
LL | let _: Struct1<usize> = STRUCT1;
37
37
| ^^^^^
38
38
|
39
39
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
40
40
41
41
error[E0658]: use of unstable library feature 'unstable_default'
42
- --> $DIR/generics-default-stability.rs:42 :20
42
+ --> $DIR/generics-default-stability.rs:40 :20
43
43
|
44
- LL | let _: Struct1<usize > = STRUCT1 ;
44
+ LL | let _: Struct1<isize > = Struct1 { field: 0 } ;
45
45
| ^^^^^
46
46
|
47
47
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
You can’t perform that action at this time.
0 commit comments