Fix fallout in tests.
This commit is contained in:
parent
d854c362fe
commit
dfa69be38a
@ -98,10 +98,10 @@ Erroneous code examples:
|
|||||||
|
|
||||||
```compile_fail,E0466
|
```compile_fail,E0466
|
||||||
#[macro_use(a_macro(another_macro))] // error: invalid import declaration
|
#[macro_use(a_macro(another_macro))] // error: invalid import declaration
|
||||||
extern crate some_crate;
|
extern crate core as some_crate;
|
||||||
|
|
||||||
#[macro_use(i_want = "some_macros")] // error: invalid import declaration
|
#[macro_use(i_want = "some_macros")] // error: invalid import declaration
|
||||||
extern crate another_crate;
|
extern crate core as another_crate;
|
||||||
```
|
```
|
||||||
|
|
||||||
This is a syntax error at the level of attribute declarations. The proper
|
This is a syntax error at the level of attribute declarations. The proper
|
||||||
@ -135,10 +135,10 @@ Erroneous code examples:
|
|||||||
|
|
||||||
```compile_fail,E0467
|
```compile_fail,E0467
|
||||||
#[macro_reexport] // error: no macros listed for export
|
#[macro_reexport] // error: no macros listed for export
|
||||||
extern crate macros_for_good;
|
extern crate core as macros_for_good;
|
||||||
|
|
||||||
#[macro_reexport(fun_macro = "foo")] // error: not a macro identifier
|
#[macro_reexport(fun_macro = "foo")] // error: not a macro identifier
|
||||||
extern crate other_macros_for_good;
|
extern crate core as other_macros_for_good;
|
||||||
```
|
```
|
||||||
|
|
||||||
This is a syntax error at the level of attribute declarations.
|
This is a syntax error at the level of attribute declarations.
|
||||||
@ -165,8 +165,8 @@ Example of erroneous code:
|
|||||||
```compile_fail,E0468
|
```compile_fail,E0468
|
||||||
mod foo {
|
mod foo {
|
||||||
#[macro_use(helpful_macro)] // error: must be at crate root to import
|
#[macro_use(helpful_macro)] // error: must be at crate root to import
|
||||||
extern crate some_crate; // macros from another crate
|
extern crate core; // macros from another crate
|
||||||
helpful_macro!(...)
|
helpful_macro!(...);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ impl IndexMut<usize> for Indexable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[2]::eq[0]
|
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[4]::eq[0]
|
||||||
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[2]::ne[0]
|
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[4]::ne[0]
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
pub struct Equatable(u32);
|
pub struct Equatable(u32);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ pub struct Equatable(u32);
|
|||||||
impl Add<u32> for Equatable {
|
impl Add<u32> for Equatable {
|
||||||
type Output = u32;
|
type Output = u32;
|
||||||
|
|
||||||
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[3]::add[0]
|
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[2]::add[0]
|
||||||
fn add(self, rhs: u32) -> u32 {
|
fn add(self, rhs: u32) -> u32 {
|
||||||
self.0 + rhs
|
self.0 + rhs
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ impl Add<u32> for Equatable {
|
|||||||
impl Deref for Equatable {
|
impl Deref for Equatable {
|
||||||
type Target = u32;
|
type Target = u32;
|
||||||
|
|
||||||
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[4]::deref[0]
|
//~ TRANS_ITEM fn overloaded_operators::{{impl}}[3]::deref[0]
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&self.0
|
&self.0
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
extern crate core;
|
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate serialize as rustc_serialize;
|
extern crate serialize as rustc_serialize;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern crate bäz; //~ ERROR non-ascii idents
|
extern crate core as bäz; //~ ERROR non-ascii idents
|
||||||
|
|
||||||
use föö::bar; //~ ERROR non-ascii idents
|
use föö::bar; //~ ERROR non-ascii idents
|
||||||
|
|
||||||
|
@ -39,11 +39,17 @@ pub fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use std::option::Option as Self;
|
mod m1 {
|
||||||
//~^ ERROR expected identifier, found keyword `Self`
|
extern crate core as Self;
|
||||||
|
//~^ ERROR expected identifier, found keyword `Self`
|
||||||
|
}
|
||||||
|
|
||||||
extern crate Self;
|
mod m2 {
|
||||||
//~^ ERROR expected identifier, found keyword `Self`
|
use std::option::Option as Self;
|
||||||
|
//~^ ERROR expected identifier, found keyword `Self`
|
||||||
|
}
|
||||||
|
|
||||||
trait Self {}
|
mod m3 {
|
||||||
//~^ ERROR expected identifier, found keyword `Self`
|
trait Self {}
|
||||||
|
//~^ ERROR expected identifier, found keyword `Self`
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user