-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
216 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/test/ui/stability-attribute/generics-default-stability-trait.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// aux-build:unstable_generic_param.rs | ||
#![feature(unstable_default6)] | ||
|
||
extern crate unstable_generic_param; | ||
|
||
use unstable_generic_param::*; | ||
|
||
struct R; | ||
|
||
impl Trait1 for S { | ||
fn foo() -> () { () } // ok | ||
} | ||
|
||
struct S; | ||
|
||
impl Trait1<usize> for S { //~ ERROR use of unstable library feature 'unstable_default' | ||
fn foo() -> usize { 0 } | ||
} | ||
|
||
impl Trait1<isize> for S { //~ ERROR use of unstable library feature 'unstable_default' | ||
fn foo() -> isize { 0 } | ||
} | ||
|
||
impl Trait2<usize> for S { //~ ERROR use of unstable library feature 'unstable_default' | ||
fn foo() -> usize { 0 } | ||
} | ||
|
||
impl Trait3<usize> for S { | ||
fn foo() -> usize { 0 } // ok | ||
} | ||
|
||
fn main() { | ||
} |
27 changes: 27 additions & 0 deletions
27
src/test/ui/stability-attribute/generics-default-stability-trait.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
error[E0658]: use of unstable library feature 'unstable_default' | ||
--> $DIR/generics-default-stability-trait.rs:16:13 | ||
| | ||
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-trait.rs:20:13 | ||
| | ||
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-trait.rs:24:13 | ||
| | ||
LL | impl Trait2<usize> for S { | ||
| ^^^^^ | ||
| | ||
= help: add `#![feature(unstable_default)]` to the crate attributes to enable | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.