Skip to content

Commit a5cc7c7

Browse files
committed
Only error when not bootstrapping for easier crater
1 parent 4ca4a2c commit a5cc7c7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/librustc/middle/intrinsicck.rs

+11-4
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,17 @@ impl<'a, 'tcx> ExprVisitor<'a, 'tcx> {
206206
assert!(!to.has_infer_types());
207207

208208
let unspecified_layout = |msg, ty| {
209-
struct_span_err!(self.tcx.sess, span, E0912, "{}", msg)
210-
.note(&format!("{} has an unspecified layout", ty))
211-
.note("this will become a hard error in the future")
212-
.emit();
209+
if ::std::env::var("RUSTC_BOOTSTRAP").is_ok() {
210+
struct_span_warn!(self.tcx.sess, span, E0912, "{}", msg)
211+
.note(&format!("{} has an unspecified layout", ty))
212+
.note("this will become a hard error in the future")
213+
.emit();
214+
} else {
215+
struct_span_err!(self.tcx.sess, span, E0912, "{}", msg)
216+
.note(&format!("{} has an unspecified layout", ty))
217+
.note("this will become a hard error in the future")
218+
.emit();
219+
}
213220
};
214221

215222
if self.is_layout_specified(from) == Some(false) {

0 commit comments

Comments
 (0)