Skip to content

Commit

Permalink
Fix 2018 edition tests
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Aug 5, 2018
1 parent 5815a84 commit c157ec8
Show file tree
Hide file tree
Showing 20 changed files with 11 additions and 42 deletions.
1 change: 0 additions & 1 deletion src/libcore/tests/lib.rs
Expand Up @@ -13,7 +13,6 @@
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
#![feature(dec2flt)]
#![feature(decode_utf8)]
#![feature(euclidean_division)]
#![feature(exact_size_is_empty)]
#![feature(fixed_size_array)]
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/diagnostic_list.rs
Expand Up @@ -381,7 +381,7 @@ the current edition.
Erroneous code example:
```compile_fail,E0705
#![allow(rust_2018_preview)]
#![feature(rust_2018_preview)]
#![feature(raw_identifiers)] // error: the feature `raw_identifiers` is
// included in the Rust 2018 edition
```
Expand Down
Expand Up @@ -10,8 +10,6 @@

// edition:2018

#![feature(extern_absolute_paths)]

use xcrate::S; //~ ERROR can't find crate for `xcrate`

fn main() {}
Expand Up @@ -10,8 +10,6 @@

// edition:2018

#![feature(extern_absolute_paths)]

fn main() {
let s = ::xcrate::S; //~ ERROR can't find crate for `xcrate`
}
Expand Up @@ -10,8 +10,6 @@

// edition:2018

#![feature(extern_absolute_paths)]

use ycrate; //~ ERROR can't find crate for `ycrate`

fn main() {}
Expand Up @@ -11,9 +11,6 @@
// aux-build:xcrate.rs
// edition:2018

#![feature(crate_in_paths)]
#![feature(extern_absolute_paths)]

use crate; //~ ERROR unresolved import `crate`
//~^ NOTE crate root imports need to be explicitly named: `use crate as name;`
use *; //~ ERROR unresolved import `*`
Expand Down
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(extern_absolute_paths)]

use krate2::hello;

fn main() {
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/auxiliary/edition-kw-macro-2018.rs
Expand Up @@ -10,8 +10,6 @@

// edition:2018

#![feature(raw_identifiers)]

#[macro_export]
macro_rules! produces_async {
() => (pub fn async() {})
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/edition-keywords-2018-2015.rs
Expand Up @@ -11,8 +11,6 @@
// edition:2018
// aux-build:edition-kw-macro-2015.rs

#![feature(raw_identifiers)]

#[macro_use]
extern crate edition_kw_macro_2015;

Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/edition-keywords-2018-2018.rs
Expand Up @@ -11,8 +11,6 @@
// edition:2018
// aux-build:edition-kw-macro-2018.rs

#![feature(raw_identifiers)]

#[macro_use]
extern crate edition_kw_macro_2018;

Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/rfc-2126-extern-absolute-paths/basic.rs
Expand Up @@ -11,8 +11,6 @@
// aux-build:xcrate.rs
// edition:2018

#![feature(extern_absolute_paths)]

use xcrate::Z;

fn f() {
Expand Down
5 changes: 1 addition & 4 deletions src/test/run-pass/rfc-2126-extern-absolute-paths/test.rs
Expand Up @@ -15,8 +15,5 @@
// edition:2018
// compile-flags: --test

#![feature(extern_absolute_paths)]

#[test]
fn test() {
}
fn test() {}
1 change: 0 additions & 1 deletion src/test/ui/auxiliary/edition-kw-macro-2018.rs
Expand Up @@ -10,7 +10,6 @@

// edition:2018

#![feature(raw_identifiers)]
#![allow(async_idents)]

#[macro_export]
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/edition-keywords-2018-2015-expansion.rs
Expand Up @@ -12,7 +12,6 @@
// aux-build:edition-kw-macro-2015.rs
// compile-pass

#![feature(raw_identifiers)]
#![allow(async_idents)]

#[macro_use]
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/edition-keywords-2018-2015-parsing.rs
Expand Up @@ -11,8 +11,6 @@
// edition:2018
// aux-build:edition-kw-macro-2015.rs

#![feature(raw_identifiers)]

#[macro_use]
extern crate edition_kw_macro_2015;

Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/edition-keywords-2018-2015-parsing.stderr
@@ -1,23 +1,23 @@
error: expected identifier, found reserved keyword `async`
--> $DIR/edition-keywords-2018-2015-parsing.rs:20:13
--> $DIR/edition-keywords-2018-2015-parsing.rs:18:13
|
LL | let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
| ^^^^^ expected identifier, found reserved keyword

error: expected identifier, found reserved keyword `async`
--> $DIR/edition-keywords-2018-2015-parsing.rs:30:13
--> $DIR/edition-keywords-2018-2015-parsing.rs:28:13
|
LL | module::async(); //~ ERROR expected identifier, found reserved keyword `async`
| ^^^^^ expected identifier, found reserved keyword

error: no rules expected the token `r#async`
--> $DIR/edition-keywords-2018-2015-parsing.rs:24:31
--> $DIR/edition-keywords-2018-2015-parsing.rs:22:31
|
LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
| ^^^^^^^

error: no rules expected the token `async`
--> $DIR/edition-keywords-2018-2015-parsing.rs:25:35
--> $DIR/edition-keywords-2018-2015-parsing.rs:23:35
|
LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
| ^^^^^
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/edition-keywords-2018-2018-expansion.rs
Expand Up @@ -11,8 +11,6 @@
// edition:2018
// aux-build:edition-kw-macro-2018.rs

#![feature(raw_identifiers)]

#[macro_use]
extern crate edition_kw_macro_2018;

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/edition-keywords-2018-2018-expansion.stderr
@@ -1,5 +1,5 @@
error: expected identifier, found reserved keyword `async`
--> $DIR/edition-keywords-2018-2018-expansion.rs:20:5
--> $DIR/edition-keywords-2018-2018-expansion.rs:18:5
|
LL | produces_async! {} //~ ERROR expected identifier, found reserved keyword `async`
| ^^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/edition-keywords-2018-2018-parsing.rs
Expand Up @@ -11,8 +11,6 @@
// edition:2018
// aux-build:edition-kw-macro-2018.rs

#![feature(raw_identifiers)]

#[macro_use]
extern crate edition_kw_macro_2018;

Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/edition-keywords-2018-2018-parsing.stderr
@@ -1,23 +1,23 @@
error: expected identifier, found reserved keyword `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:20:13
--> $DIR/edition-keywords-2018-2018-parsing.rs:18:13
|
LL | let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
| ^^^^^ expected identifier, found reserved keyword

error: expected identifier, found reserved keyword `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:30:13
--> $DIR/edition-keywords-2018-2018-parsing.rs:28:13
|
LL | module::async(); //~ ERROR expected identifier, found reserved keyword `async`
| ^^^^^ expected identifier, found reserved keyword

error: no rules expected the token `r#async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:24:31
--> $DIR/edition-keywords-2018-2018-parsing.rs:22:31
|
LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
| ^^^^^^^

error: no rules expected the token `async`
--> $DIR/edition-keywords-2018-2018-parsing.rs:25:35
--> $DIR/edition-keywords-2018-2018-parsing.rs:23:35
|
LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
| ^^^^^
Expand Down

0 comments on commit c157ec8

Please sign in to comment.