Skip to content

Commit c9e7045

Browse files
committed
bless tests
1 parent f03907b commit c9e7045

12 files changed

+43
-9
lines changed

src/test/ui/error-codes/E0435.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/E0435.rs:3:17
33
|
4+
LL | let foo = 42u32;
5+
| --- help: consider using `const` instead of `let`
46
LL | let _: [u8; foo];
57
| ^^^ non-constant value
68

src/test/ui/impl-trait/bindings.stderr

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,33 @@ error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/bindings.rs:5:29
33
|
44
LL | const foo: impl Clone = x;
5-
| ^ non-constant value
5+
| --- ^ non-constant value
6+
| |
7+
| help: consider using `let` instead of `const`
68

79
error[E0435]: attempt to use a non-constant value in a constant
810
--> $DIR/bindings.rs:11:33
911
|
1012
LL | const foo: impl Clone = x;
11-
| ^ non-constant value
13+
| --- ^ non-constant value
14+
| |
15+
| help: consider using `let` instead of `const`
1216

1317
error[E0435]: attempt to use a non-constant value in a constant
1418
--> $DIR/bindings.rs:18:33
1519
|
1620
LL | const foo: impl Clone = x;
17-
| ^ non-constant value
21+
| --- ^ non-constant value
22+
| |
23+
| help: consider using `let` instead of `const`
1824

1925
error[E0435]: attempt to use a non-constant value in a constant
2026
--> $DIR/bindings.rs:25:33
2127
|
2228
LL | const foo: impl Clone = x;
23-
| ^ non-constant value
29+
| --- ^ non-constant value
30+
| |
31+
| help: consider using `let` instead of `const`
2432

2533
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
2634
--> $DIR/bindings.rs:1:12

src/test/ui/issues/issue-27433.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-27433.rs:3:23
33
|
44
LL | const FOO : u32 = foo;
5-
| ^^^ non-constant value
5+
| --- ^^^ non-constant value
6+
| |
7+
| help: consider using `let` instead of `const`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-3521-2.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-3521-2.rs:4:23
33
|
44
LL | static y: isize = foo + 1;
5-
| ^^^ non-constant value
5+
| - ^^^ non-constant value
6+
| |
7+
| help: consider using `let` instead of `static`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-3521.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-3521.rs:6:15
33
|
4+
LL | let foo = 100;
5+
| --- help: consider using `const` instead of `let`
6+
...
47
LL | Bar = foo
58
| ^^^ non-constant value
69

src/test/ui/issues/issue-3668-2.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-3668-2.rs:2:27
33
|
44
LL | static child: isize = x + 1;
5-
| ^ non-constant value
5+
| ----- ^ non-constant value
6+
| |
7+
| help: consider using `let` instead of `static`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-3668.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-3668.rs:8:34
33
|
44
LL | static childVal: Box<P> = self.child.get();
5-
| ^^^^ non-constant value
5+
| -------- ^^^^ non-constant value
6+
| |
7+
| help: consider using `let` instead of `static`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-42060.stderr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-42060.rs:3:23
33
|
4+
LL | let thing = ();
5+
| ----- help: consider using `const` instead of `let`
46
LL | let other: typeof(thing) = thing;
57
| ^^^^^ non-constant value
68

79
error[E0435]: attempt to use a non-constant value in a constant
810
--> $DIR/issue-42060.rs:9:13
911
|
12+
LL | let q = 1;
13+
| - help: consider using `const` instead of `let`
1014
LL | <typeof(q)>::N
1115
| ^ non-constant value
1216

src/test/ui/issues/issue-44239.stderr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/issue-44239.rs:6:26
33
|
4+
LL | let n = 0;
5+
| - help: consider using `const` instead of `let`
6+
...
47
LL | const N: usize = n;
58
| ^ non-constant value
69

src/test/ui/non-constant-expr-for-arr-len.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/non-constant-expr-for-arr-len.rs:5:22
33
|
4+
LL | fn bar(n: usize) {
5+
| - help: consider using `const` instead of `let`
46
LL | let _x = [0; n];
57
| ^ non-constant value
68

src/test/ui/repeat_count.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/repeat_count.rs:5:17
33
|
4+
LL | let n = 1;
5+
| - help: consider using `const` instead of `let`
46
LL | let a = [0; n];
57
| ^ non-constant value
68

src/test/ui/type/type-dependent-def-issue-49241.stderr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ error[E0435]: attempt to use a non-constant value in a constant
22
--> $DIR/type-dependent-def-issue-49241.rs:3:22
33
|
44
LL | const l: usize = v.count();
5-
| ^ non-constant value
5+
| - ^ non-constant value
6+
| |
7+
| help: consider using `let` instead of `const`
68

79
error: aborting due to previous error
810

0 commit comments

Comments
 (0)