Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui test suite fails on stage 1 #53380

Closed
RalfJung opened this issue Aug 15, 2018 · 5 comments
Closed

ui test suite fails on stage 1 #53380

RalfJung opened this issue Aug 15, 2018 · 5 comments

Comments

@RalfJung
Copy link
Member

With current master (81cfaad), the UI stage 1 test suite fails for me. ./x.py --stage 1 test src/test/ui --bless introduces the following diff:

--- a/src/test/ui/macros/macros-nonfatal-errors.stderr
+++ b/src/test/ui/macros/macros-nonfatal-errors.stderr
@@ -1,4 +1,4 @@
-error[E0665]: `Default` cannot be derived for enums, only structs
+error: `Default` cannot be derived for enums, only structs
   --> $DIR/macros-nonfatal-errors.rs:20:10
    |
 LL | #[derive(Default)] //~ ERROR
@@ -96,5 +96,4 @@ LL |     trace_macros!(invalid); //~ ERROR
 
 error: aborting due to 15 previous errors
 
-Some errors occurred: E0658, E0665.
-For more information about an error, try `rustc --explain E0658`.
+For more information about this error, try `rustc --explain E0658`.

Stage 1 used to work fine, so this is a regression, likely introduced by #53196 (cc @davidtwco).

Stage 2 build is still running.

@varkor
Copy link
Member

varkor commented Aug 15, 2018

Fixed by #53368.

@RalfJung
Copy link
Member Author

FWIW, stage 2 works. I am surprised that such a difference is possible between stages...

@varkor
Copy link
Member

varkor commented Aug 15, 2018

It's explicitly gated on stage 2 (i.e. being compiled by stage 1 or greater):

StaticEnum(..) => {
span_err_if_not_stage0!(cx, trait_span, E0665,
"`Default` cannot be derived for enums, only structs");

I'm not quite sure why the only difference is emitting the error code or not, though:
macro_rules! span_err_if_not_stage0 {
($cx:expr, $sp:expr, $code:ident, $text:tt) => {
#[cfg(not(stage0))] {
span_err!($cx, $sp, $code, $text)
}
#[cfg(stage0)] {
$cx.span_err($sp, $text)
}
}
}

@davidtwco
Copy link
Member

Huh, that's interesting. I was always testing against stage 2 locally when working on #53196 and Travis didn't seem to pick that up either.

@RalfJung RalfJung changed the title ui test suite fails ui test suite fails on stage 1 Aug 15, 2018
@varkor
Copy link
Member

varkor commented Aug 15, 2018

Fixed by #53368 (comment).

@varkor varkor closed this as completed Aug 15, 2018
kennytm added a commit to kennytm/rust that referenced this issue Aug 16, 2018
 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants