提交 0883ce1b 编写于 作者: A Alex Burka

change span label for E0435 (fix #41871)

上级 ab5bec25
......@@ -325,7 +325,7 @@ fn resolve_struct_error<'sess, 'a>(resolver: &'sess Resolver,
span,
E0435,
"attempt to use a non-constant value in a constant");
err.span_label(span, "non-constant used with constant");
err.span_label(span, "non-constant value");
err
}
ResolutionError::BindingShadowsSomethingUnacceptable(what_binding, name, binding) => {
......
......@@ -11,5 +11,5 @@
fn main () {
let foo = 42u32;
let _: [u8; foo]; //~ ERROR E0435
//~| NOTE non-constant used with constant
//~| NOTE non-constant value
}
......@@ -14,6 +14,6 @@ fn main() {
fn bar(n: usize) {
let _x = [0; n];
//~^ ERROR attempt to use a non-constant value in a constant [E0435]
//~| NOTE non-constant used with constant
//~| NOTE non-constant value
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册