bless tests
This commit is contained in:
parent
f03907b33f
commit
c9e7045e81
12 changed files with 43 additions and 9 deletions
|
@ -1,6 +1,8 @@
|
|||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/E0435.rs:3:17
|
||||
|
|
||||
LL | let foo = 42u32;
|
||||
| --- help: consider using `const` instead of `let`
|
||||
LL | let _: [u8; foo];
|
||||
| ^^^ non-constant value
|
||||
|
||||
|
|
|
@ -2,25 +2,33 @@ error[E0435]: attempt to use a non-constant value in a constant
|
|||
--> $DIR/bindings.rs:5:29
|
||||
|
|
||||
LL | const foo: impl Clone = x;
|
||||
| ^ non-constant value
|
||||
| --- ^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `const`
|
||||
|
||||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/bindings.rs:11:33
|
||||
|
|
||||
LL | const foo: impl Clone = x;
|
||||
| ^ non-constant value
|
||||
| --- ^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `const`
|
||||
|
||||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/bindings.rs:18:33
|
||||
|
|
||||
LL | const foo: impl Clone = x;
|
||||
| ^ non-constant value
|
||||
| --- ^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `const`
|
||||
|
||||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/bindings.rs:25:33
|
||||
|
|
||||
LL | const foo: impl Clone = x;
|
||||
| ^ non-constant value
|
||||
| --- ^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `const`
|
||||
|
||||
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/bindings.rs:1:12
|
||||
|
|
|
@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
|
|||
--> $DIR/issue-27433.rs:3:23
|
||||
|
|
||||
LL | const FOO : u32 = foo;
|
||||
| ^^^ non-constant value
|
||||
| --- ^^^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `const`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
|
|||
--> $DIR/issue-3521-2.rs:4:23
|
||||
|
|
||||
LL | static y: isize = foo + 1;
|
||||
| ^^^ non-constant value
|
||||
| - ^^^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `static`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/issue-3521.rs:6:15
|
||||
|
|
||||
LL | let foo = 100;
|
||||
| --- help: consider using `const` instead of `let`
|
||||
...
|
||||
LL | Bar = foo
|
||||
| ^^^ non-constant value
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
|
|||
--> $DIR/issue-3668-2.rs:2:27
|
||||
|
|
||||
LL | static child: isize = x + 1;
|
||||
| ^ non-constant value
|
||||
| ----- ^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `static`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
|
|||
--> $DIR/issue-3668.rs:8:34
|
||||
|
|
||||
LL | static childVal: Box<P> = self.child.get();
|
||||
| ^^^^ non-constant value
|
||||
| -------- ^^^^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `static`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/issue-42060.rs:3:23
|
||||
|
|
||||
LL | let thing = ();
|
||||
| ----- help: consider using `const` instead of `let`
|
||||
LL | let other: typeof(thing) = thing;
|
||||
| ^^^^^ non-constant value
|
||||
|
||||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/issue-42060.rs:9:13
|
||||
|
|
||||
LL | let q = 1;
|
||||
| - help: consider using `const` instead of `let`
|
||||
LL | <typeof(q)>::N
|
||||
| ^ non-constant value
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/issue-44239.rs:6:26
|
||||
|
|
||||
LL | let n = 0;
|
||||
| - help: consider using `const` instead of `let`
|
||||
...
|
||||
LL | const N: usize = n;
|
||||
| ^ non-constant value
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/non-constant-expr-for-arr-len.rs:5:22
|
||||
|
|
||||
LL | fn bar(n: usize) {
|
||||
| - help: consider using `const` instead of `let`
|
||||
LL | let _x = [0; n];
|
||||
| ^ non-constant value
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
error[E0435]: attempt to use a non-constant value in a constant
|
||||
--> $DIR/repeat_count.rs:5:17
|
||||
|
|
||||
LL | let n = 1;
|
||||
| - help: consider using `const` instead of `let`
|
||||
LL | let a = [0; n];
|
||||
| ^ non-constant value
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
|
|||
--> $DIR/type-dependent-def-issue-49241.rs:3:22
|
||||
|
|
||||
LL | const l: usize = v.count();
|
||||
| ^ non-constant value
|
||||
| - ^ non-constant value
|
||||
| |
|
||||
| help: consider using `let` instead of `const`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue