Skip to content

Commit 1cb13b2

Browse files
authored
Rollup merge of rust-lang#53412 - eddyb:stage-who, r=alexcrichton
syntax_ext: remove leftover span_err_if_not_stage0 macro. I believe this is the right fix for rust-lang#53380, although I'm not sure what happened. My guess is this copy of the macro was accidentally missed when others were removed? cc @matthewjasper @varkor (please do not put this in a rollup, in case it fails)
2 parents ae3ebf0 + e7b65bd commit 1cb13b2

16 files changed

+24
-48
lines changed

src/libsyntax_ext/deriving/default.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ fn default_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructur
7676
}
7777
}
7878
StaticEnum(..) => {
79-
span_err_if_not_stage0!(cx, trait_span, E0665,
80-
"`Default` cannot be derived for enums, only structs");
79+
span_err!(cx, trait_span, E0665,
80+
"`Default` cannot be derived for enums, only structs");
8181
// let compilation continue
8282
cx.expr_usize(trait_span, 0)
8383
}

src/libsyntax_ext/deriving/mod.rs

-11
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ use syntax::ptr::P;
1919
use syntax::symbol::Symbol;
2020
use syntax_pos::Span;
2121

22-
macro_rules! span_err_if_not_stage0 {
23-
($cx:expr, $sp:expr, $code:ident, $text:tt) => {
24-
#[cfg(not(stage0))] {
25-
span_err!($cx, $sp, $code, $text)
26-
}
27-
#[cfg(stage0)] {
28-
$cx.span_err($sp, $text)
29-
}
30-
}
31-
}
32-
3322
macro path_local($x:ident) {
3423
generic::ty::Path::new_local(stringify!($x))
3524
}

src/test/ui/E0660.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-stage1
12-
1311
#![feature(asm)]
1412

1513
fn main() {

src/test/ui/E0660.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0660]: malformed inline assembly
2-
--> $DIR/E0660.rs:17:5
2+
--> $DIR/E0660.rs:15:5
33
|
44
LL | asm!("nop" "nop");
55
| ^^^^^^^^^^^^^^^^^^
66

77
error[E0660]: malformed inline assembly
8-
--> $DIR/E0660.rs:19:5
8+
--> $DIR/E0660.rs:17:5
99
|
1010
LL | asm!("nop" "nop" : "=r"(a));
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/E0661.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-stage1
12-
1311
#![feature(asm)]
1412

1513
fn main() {

src/test/ui/E0661.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0661]: output operand constraint lacks '=' or '+'
2-
--> $DIR/E0661.rs:17:18
2+
--> $DIR/E0661.rs:15:18
33
|
44
LL | asm!("nop" : "r"(a));
55
| ^^^

src/test/ui/E0662.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-stage1
12-
1311
#![feature(asm)]
1412

1513
fn main() {

src/test/ui/E0662.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0662]: input operand constraint contains '='
2-
--> $DIR/E0662.rs:18:12
2+
--> $DIR/E0662.rs:16:12
33
|
44
LL | : "=test"("a") //~ ERROR E0662
55
| ^^^^^^^

src/test/ui/E0663.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-stage1
12-
1311
#![feature(asm)]
1412

1513
fn main() {

src/test/ui/E0663.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0663]: input operand constraint contains '+'
2-
--> $DIR/E0663.rs:18:12
2+
--> $DIR/E0663.rs:16:12
33
|
44
LL | : "+test"("a") //~ ERROR E0663
55
| ^^^^^^^

src/test/ui/E0664.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-stage1
12-
1311
#![feature(asm)]
1412

1513
fn main() {

src/test/ui/E0664.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0664]: clobber should not be surrounded by braces
2-
--> $DIR/E0664.rs:19:12
2+
--> $DIR/E0664.rs:17:12
33
|
44
LL | : "{eax}" //~ ERROR E0664
55
| ^^^^^^^

src/test/ui/E0665.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-stage1
12-
1311
#[derive(Default)] //~ ERROR E0665
1412
enum Food {
1513
Sweet,

src/test/ui/E0665.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0665]: `Default` cannot be derived for enums, only structs
2-
--> $DIR/E0665.rs:13:10
2+
--> $DIR/E0665.rs:11:10
33
|
44
LL | #[derive(Default)] //~ ERROR E0665
55
| ^^^^^^^

src/test/ui/macros/macros-nonfatal-errors.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
1212
// ignore-tidy-linelength
13-
// ignore-stage1
1413

1514
// test that errors in a (selection) of macros don't kill compilation
1615
// immediately, so that we get more errors listed at a time.

src/test/ui/macros/macros-nonfatal-errors.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
error[E0665]: `Default` cannot be derived for enums, only structs
2-
--> $DIR/macros-nonfatal-errors.rs:21:10
2+
--> $DIR/macros-nonfatal-errors.rs:20:10
33
|
44
LL | #[derive(Default)] //~ ERROR
55
| ^^^^^^^
66

77
error: inline assembly must be a string literal
8-
--> $DIR/macros-nonfatal-errors.rs:25:10
8+
--> $DIR/macros-nonfatal-errors.rs:24:10
99
|
1010
LL | asm!(invalid); //~ ERROR
1111
| ^^^^^^^
1212

1313
error: concat_idents! requires ident args.
14-
--> $DIR/macros-nonfatal-errors.rs:27:5
14+
--> $DIR/macros-nonfatal-errors.rs:26:5
1515
|
1616
LL | concat_idents!("not", "idents"); //~ ERROR
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

1919
error: argument must be a string literal
20-
--> $DIR/macros-nonfatal-errors.rs:29:17
20+
--> $DIR/macros-nonfatal-errors.rs:28:17
2121
|
2222
LL | option_env!(invalid); //~ ERROR
2323
| ^^^^^^^
2424

2525
error: expected string literal
26-
--> $DIR/macros-nonfatal-errors.rs:30:10
26+
--> $DIR/macros-nonfatal-errors.rs:29:10
2727
|
2828
LL | env!(invalid); //~ ERROR
2929
| ^^^^^^^
3030

3131
error: expected string literal
32-
--> $DIR/macros-nonfatal-errors.rs:31:10
32+
--> $DIR/macros-nonfatal-errors.rs:30:10
3333
|
3434
LL | env!(foo, abr, baz); //~ ERROR
3535
| ^^^
3636

3737
error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined
38-
--> $DIR/macros-nonfatal-errors.rs:32:5
38+
--> $DIR/macros-nonfatal-errors.rs:31:5
3939
|
4040
LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
error[E0658]: non-ident macro paths are experimental (see issue #35896)
44-
--> $DIR/macros-nonfatal-errors.rs:34:5
44+
--> $DIR/macros-nonfatal-errors.rs:33:5
4545
|
4646
LL | foo::blah!(); //~ ERROR
4747
| ^^^^^^^^^
4848
|
4949
= help: add #![feature(use_extern_macros)] to the crate attributes to enable
5050

5151
error: format argument must be a string literal
52-
--> $DIR/macros-nonfatal-errors.rs:36:13
52+
--> $DIR/macros-nonfatal-errors.rs:35:13
5353
|
5454
LL | format!(invalid); //~ ERROR
5555
| ^^^^^^^
@@ -59,37 +59,37 @@ LL | format!("{}", invalid); //~ ERROR
5959
| ^^^^^
6060

6161
error: argument must be a string literal
62-
--> $DIR/macros-nonfatal-errors.rs:38:14
62+
--> $DIR/macros-nonfatal-errors.rs:37:14
6363
|
6464
LL | include!(invalid); //~ ERROR
6565
| ^^^^^^^
6666

6767
error: argument must be a string literal
68-
--> $DIR/macros-nonfatal-errors.rs:40:18
68+
--> $DIR/macros-nonfatal-errors.rs:39:18
6969
|
7070
LL | include_str!(invalid); //~ ERROR
7171
| ^^^^^^^
7272

7373
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: No such file or directory (os error 2)
74-
--> $DIR/macros-nonfatal-errors.rs:41:5
74+
--> $DIR/macros-nonfatal-errors.rs:40:5
7575
|
7676
LL | include_str!("i'd be quite surprised if a file with this name existed"); //~ ERROR
7777
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7878

7979
error: argument must be a string literal
80-
--> $DIR/macros-nonfatal-errors.rs:42:20
80+
--> $DIR/macros-nonfatal-errors.rs:41:20
8181
|
8282
LL | include_bytes!(invalid); //~ ERROR
8383
| ^^^^^^^
8484

8585
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: No such file or directory (os error 2)
86-
--> $DIR/macros-nonfatal-errors.rs:43:5
86+
--> $DIR/macros-nonfatal-errors.rs:42:5
8787
|
8888
LL | include_bytes!("i'd be quite surprised if a file with this name existed"); //~ ERROR
8989
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9090

9191
error: trace_macros! accepts only `true` or `false`
92-
--> $DIR/macros-nonfatal-errors.rs:45:5
92+
--> $DIR/macros-nonfatal-errors.rs:44:5
9393
|
9494
LL | trace_macros!(invalid); //~ ERROR
9595
| ^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)