diff options
| author | kennytm <kennytm@gmail.com> | 2018-08-17 00:13:29 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-17 00:13:29 +0800 |
| commit | 1cb13b296d992e36f7070f642b0f7de1b81fa525 (patch) | |
| tree | d2fd49b149ee9e992b928027a571805b4b49e331 /src/libsyntax_ext | |
| parent | ae3ebf0316eb282bff311d183d1bb5d9abbf7e70 (diff) | |
| parent | e7b65bd4578b1d8254f6ef700994fe3677693f02 (diff) | |
| download | rust-1cb13b296d992e36f7070f642b0f7de1b81fa525.tar.gz rust-1cb13b296d992e36f7070f642b0f7de1b81fa525.zip | |
Rollup merge of #53412 - eddyb:stage-who, r=alexcrichton
syntax_ext: remove leftover span_err_if_not_stage0 macro. I believe this is the right fix for #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)
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/default.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax_ext/deriving/mod.rs | 11 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/libsyntax_ext/deriving/default.rs b/src/libsyntax_ext/deriving/default.rs index 958116f7809..adbc5828b8f 100644 --- a/src/libsyntax_ext/deriving/default.rs +++ b/src/libsyntax_ext/deriving/default.rs @@ -76,8 +76,8 @@ fn default_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructur } } StaticEnum(..) => { - span_err_if_not_stage0!(cx, trait_span, E0665, - "`Default` cannot be derived for enums, only structs"); + span_err!(cx, trait_span, E0665, + "`Default` cannot be derived for enums, only structs"); // let compilation continue cx.expr_usize(trait_span, 0) } diff --git a/src/libsyntax_ext/deriving/mod.rs b/src/libsyntax_ext/deriving/mod.rs index 2f5e42d2f7b..ae47a028bc3 100644 --- a/src/libsyntax_ext/deriving/mod.rs +++ b/src/libsyntax_ext/deriving/mod.rs @@ -19,17 +19,6 @@ use syntax::ptr::P; use syntax::symbol::Symbol; use syntax_pos::Span; -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) - } - } -} - macro path_local($x:ident) { generic::ty::Path::new_local(stringify!($x)) } |
