Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit cb7264b

Browse files
Avi-D-coderJacob Hughes
authored andcommitted
Fix tests
1 parent eb7abb9 commit cb7264b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/ui/stability-attribute/generics-default-stability.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/test/ui/stability-attribute/generics-default-stability.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

2525
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
2727
|
2828
LL | let _: Struct1<isize> = Struct1 { field: 1 };
2929
| ^^^^^
3030
|
3131
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
3232

3333
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
3535
|
3636
LL | let _: Struct1<usize> = STRUCT1;
3737
| ^^^^^
3838
|
3939
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
4040

4141
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
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

0 commit comments

Comments
 (0)