Add unstable default feature enabled test
This commit is contained in:
parent
af19d44921
commit
7616b30bff
@ -55,6 +55,12 @@ pub struct Struct5<#[unstable(feature = "unstable_default", issue = "none")] A =
|
||||
pub field: A,
|
||||
}
|
||||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
pub struct Struct6<#[unstable(feature = "unstable_default6", issue = "none")] T = usize> {
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
pub field: T,
|
||||
}
|
||||
|
||||
#[stable(feature = "stable_test_feature", since = "1.0.0")]
|
||||
pub const STRUCT1: Struct1 = Struct1 { field: 1 };
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// ignore-tidy-linelength
|
||||
// aux-build:unstable_generic_param.rs
|
||||
#![feature(unstable_default6)]
|
||||
|
||||
extern crate unstable_generic_param;
|
||||
|
||||
@ -105,4 +106,7 @@ fn main() {
|
||||
//~^ use of deprecated item 'unstable_generic_param::Struct5': test [deprecated]
|
||||
//~^^ use of deprecated item 'unstable_generic_param::Struct5': test [deprecated]
|
||||
//~^^^ use of deprecated item 'unstable_generic_param::Struct5::field': test [deprecated]
|
||||
|
||||
let _: Struct6<isize> = Struct6 { field: 1 }; // ok
|
||||
let _: Struct6<isize> = Struct6 { field: 0 }; // ok
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: use of unstable library feature 'unstable_default'
|
||||
--> $DIR/generics-default-stability.rs:16:13
|
||||
--> $DIR/generics-default-stability.rs:17:13
|
||||
|
|
||||
LL | impl Trait1<usize> for S {
|
||||
| ^^^^^
|
||||
@ -7,7 +7,7 @@ LL | impl Trait1<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:20:13
|
||||
--> $DIR/generics-default-stability.rs:21:13
|
||||
|
|
||||
LL | impl Trait1<isize> for S {
|
||||
| ^^^^^
|
||||
@ -15,7 +15,7 @@ LL | impl Trait1<isize> 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:24:13
|
||||
--> $DIR/generics-default-stability.rs:25:13
|
||||
|
|
||||
LL | impl Trait2<usize> for S {
|
||||
| ^^^^^
|
||||
@ -23,7 +23,7 @@ LL | impl Trait2<usize> for S {
|
||||
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4': test
|
||||
--> $DIR/generics-default-stability.rs:83:29
|
||||
--> $DIR/generics-default-stability.rs:84:29
|
||||
|
|
||||
LL | let _: Struct4<isize> = Struct4 { field: 1 };
|
||||
| ^^^^^^^
|
||||
@ -31,73 +31,73 @@ LL | let _: Struct4<isize> = Struct4 { field: 1 };
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4': test
|
||||
--> $DIR/generics-default-stability.rs:83:12
|
||||
--> $DIR/generics-default-stability.rs:84:12
|
||||
|
|
||||
LL | let _: Struct4<isize> = Struct4 { field: 1 };
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4': test
|
||||
--> $DIR/generics-default-stability.rs:88:12
|
||||
--> $DIR/generics-default-stability.rs:89:12
|
||||
|
|
||||
LL | let _: Struct4 = STRUCT4;
|
||||
| ^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4': test
|
||||
--> $DIR/generics-default-stability.rs:89:12
|
||||
--> $DIR/generics-default-stability.rs:90:12
|
||||
|
|
||||
LL | let _: Struct4<usize> = STRUCT4;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4': test
|
||||
--> $DIR/generics-default-stability.rs:90:29
|
||||
--> $DIR/generics-default-stability.rs:91:29
|
||||
|
|
||||
LL | let _: Struct4<isize> = Struct4 { field: 0 };
|
||||
| ^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4': test
|
||||
--> $DIR/generics-default-stability.rs:90:12
|
||||
--> $DIR/generics-default-stability.rs:91:12
|
||||
|
|
||||
LL | let _: Struct4<isize> = Struct4 { field: 0 };
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5': test
|
||||
--> $DIR/generics-default-stability.rs:96:29
|
||||
--> $DIR/generics-default-stability.rs:97:29
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 1 };
|
||||
| ^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5': test
|
||||
--> $DIR/generics-default-stability.rs:96:12
|
||||
--> $DIR/generics-default-stability.rs:97:12
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 1 };
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5': test
|
||||
--> $DIR/generics-default-stability.rs:101:12
|
||||
--> $DIR/generics-default-stability.rs:102:12
|
||||
|
|
||||
LL | let _: Struct5 = STRUCT5;
|
||||
| ^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5': test
|
||||
--> $DIR/generics-default-stability.rs:102:12
|
||||
--> $DIR/generics-default-stability.rs:103:12
|
||||
|
|
||||
LL | let _: Struct5<usize> = STRUCT5;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5': test
|
||||
--> $DIR/generics-default-stability.rs:104:29
|
||||
--> $DIR/generics-default-stability.rs:105:29
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 0 };
|
||||
| ^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5': test
|
||||
--> $DIR/generics-default-stability.rs:104:12
|
||||
--> $DIR/generics-default-stability.rs:105:12
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 0 };
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error[E0658]: use of unstable library feature 'unstable_default'
|
||||
--> $DIR/generics-default-stability.rs:35:20
|
||||
--> $DIR/generics-default-stability.rs:36:20
|
||||
|
|
||||
LL | let _: Struct1<isize> = Struct1 { field: 1 };
|
||||
| ^^^^^
|
||||
@ -105,7 +105,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:39:20
|
||||
--> $DIR/generics-default-stability.rs:40:20
|
||||
|
|
||||
LL | let _: Struct1<usize> = STRUCT1;
|
||||
| ^^^^^
|
||||
@ -113,7 +113,7 @@ 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:40:20
|
||||
--> $DIR/generics-default-stability.rs:41:20
|
||||
|
|
||||
LL | let _: Struct1<isize> = Struct1 { field: 0 };
|
||||
| ^^^^^
|
||||
@ -121,7 +121,7 @@ LL | let _: Struct1<isize> = Struct1 { field: 0 };
|
||||
= 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:69:27
|
||||
--> $DIR/generics-default-stability.rs:70:27
|
||||
|
|
||||
LL | let _: Struct3<isize, usize> = STRUCT3;
|
||||
| ^^^^^
|
||||
@ -129,7 +129,7 @@ LL | let _: Struct3<isize, usize> = STRUCT3;
|
||||
= 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:71:27
|
||||
--> $DIR/generics-default-stability.rs:72:27
|
||||
|
|
||||
LL | let _: Struct3<isize, isize> = Struct3 { field1: 0, field2: 0 };
|
||||
| ^^^^^
|
||||
@ -137,7 +137,7 @@ LL | let _: Struct3<isize, isize> = Struct3 { field1: 0, field2: 0 };
|
||||
= 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:72:27
|
||||
--> $DIR/generics-default-stability.rs:73:27
|
||||
|
|
||||
LL | let _: Struct3<usize, usize> = Struct3 { field1: 0, field2: 0 };
|
||||
| ^^^^^
|
||||
@ -145,7 +145,7 @@ LL | let _: Struct3<usize, usize> = Struct3 { field1: 0, field2: 0 };
|
||||
= 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:96:20
|
||||
--> $DIR/generics-default-stability.rs:97:20
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 1 };
|
||||
| ^^^^^
|
||||
@ -153,7 +153,7 @@ LL | let _: Struct5<isize> = Struct5 { 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:102:20
|
||||
--> $DIR/generics-default-stability.rs:103:20
|
||||
|
|
||||
LL | let _: Struct5<usize> = STRUCT5;
|
||||
| ^^^^^
|
||||
@ -161,7 +161,7 @@ LL | let _: Struct5<usize> = STRUCT5;
|
||||
= 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:104:20
|
||||
--> $DIR/generics-default-stability.rs:105:20
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 0 };
|
||||
| ^^^^^
|
||||
@ -169,25 +169,25 @@ LL | let _: Struct5<isize> = Struct5 { field: 0 };
|
||||
= help: add `#![feature(unstable_default)]` to the crate attributes to enable
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4::field': test
|
||||
--> $DIR/generics-default-stability.rs:83:39
|
||||
--> $DIR/generics-default-stability.rs:84:39
|
||||
|
|
||||
LL | let _: Struct4<isize> = Struct4 { field: 1 };
|
||||
| ^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct4::field': test
|
||||
--> $DIR/generics-default-stability.rs:90:39
|
||||
--> $DIR/generics-default-stability.rs:91:39
|
||||
|
|
||||
LL | let _: Struct4<isize> = Struct4 { field: 0 };
|
||||
| ^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5::field': test
|
||||
--> $DIR/generics-default-stability.rs:96:39
|
||||
--> $DIR/generics-default-stability.rs:97:39
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 1 };
|
||||
| ^^^^^^^^
|
||||
|
||||
warning: use of deprecated item 'unstable_generic_param::Struct5::field': test
|
||||
--> $DIR/generics-default-stability.rs:104:39
|
||||
--> $DIR/generics-default-stability.rs:105:39
|
||||
|
|
||||
LL | let _: Struct5<isize> = Struct5 { field: 0 };
|
||||
| ^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user