Update E0010 to use the new format
For https://github.com/rust-lang/rust/issues/35194
This commit is contained in:
parent
4c02363852
commit
dfb66c3e2b
@ -686,8 +686,10 @@ fn visit_rvalue(&mut self, rvalue: &Rvalue<'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…
Reference in New Issue
Block a user