Skip to content

Commit 0883ce1

Browse files
committed
change span label for E0435 (fix #41871)
1 parent ab5bec2 commit 0883ce1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn resolve_struct_error<'sess, 'a>(resolver: &'sess Resolver,
325325
span,
326326
E0435,
327327
"attempt to use a non-constant value in a constant");
328-
err.span_label(span, "non-constant used with constant");
328+
err.span_label(span, "non-constant value");
329329
err
330330
}
331331
ResolutionError::BindingShadowsSomethingUnacceptable(what_binding, name, binding) => {

src/test/compile-fail/E0435.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
fn main () {
1212
let foo = 42u32;
1313
let _: [u8; foo]; //~ ERROR E0435
14-
//~| NOTE non-constant used with constant
14+
//~| NOTE non-constant value
1515
}

src/test/compile-fail/non-constant-expr-for-vec-repeat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ fn main() {
1414
fn bar(n: usize) {
1515
let _x = [0; n];
1616
//~^ ERROR attempt to use a non-constant value in a constant [E0435]
17-
//~| NOTE non-constant used with constant
17+
//~| NOTE non-constant value
1818
}
1919
}

0 commit comments

Comments
 (0)