Rollup merge of #35439 - pcn:update-E0010-error-message, r=jonathandturner
Update E0010 to use the new format For https://github.com/rust-lang/rust/issues/35194
This commit is contained in:
commit
7d9ea8b371
@ -686,8 +686,10 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
|
||||
Rvalue::Box(_) => {
|
||||
self.add(Qualif::NOT_CONST);
|
||||
if self.mode != Mode::Fn {
|
||||
span_err!(self.tcx.sess, self.span, E0010,
|
||||
"allocations are not allowed in {}s", self.mode);
|
||||
struct_span_err!(self.tcx.sess, self.span, E0010,
|
||||
"allocations are not allowed in {}s", self.mode)
|
||||
.span_label(self.span, &format!("allocation not allowed in {}s", self.mode))
|
||||
.emit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,5 +11,6 @@
|
||||
#![feature(box_syntax)]
|
||||
|
||||
const CON : Box<i32> = box 0; //~ ERROR E0010
|
||||
//~| NOTE allocation not allowed in
|
||||
|
||||
fn main() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user