1
1
error[E0435]: attempt to use a non-constant value in a constant
2
- --> $DIR/constness.rs:32 :34
2
+ --> $DIR/constness.rs:30 :34
3
3
|
4
4
LL | let _ = const { size_of_val(&v) };
5
5
| ^ non-constant value
@@ -11,7 +11,7 @@ LL + const v: /* Type */ = NotConstSized;
11
11
|
12
12
13
13
error[E0435]: attempt to use a non-constant value in a constant
14
- --> $DIR/constness.rs:37 :33
14
+ --> $DIR/constness.rs:35 :33
15
15
|
16
16
LL | let _ = const { size_of_val(v) };
17
17
| ^ non-constant value
@@ -23,49 +23,49 @@ LL + const v: /* Type */ = NotConstSized;
23
23
|
24
24
25
25
error[E0277]: the trait bound `NotConstSized: const Sized` is not satisfied
26
- --> $DIR/constness.rs:22 :31
26
+ --> $DIR/constness.rs:20 :31
27
27
|
28
28
LL | let _ = const { size_of::<NotConstSized>() };
29
29
| ^^^^^^^^^^^^^
30
30
|
31
31
note: required by a bound in `size_of`
32
- --> $DIR/constness.rs:18 :21
32
+ --> $DIR/constness.rs:16 :21
33
33
|
34
34
LL | const fn size_of<T: ~const Sized>() { unimplemented!() }
35
35
| ^^^^^^^^^^^^ required by this bound in `size_of`
36
36
37
37
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
38
- --> $DIR/constness.rs:26 :31
38
+ --> $DIR/constness.rs:24 :31
39
39
|
40
40
LL | let _ = const { size_of::<NotConstMetaSized>() };
41
41
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
42
42
|
43
43
= help: within `NotConstMetaSized`, the trait `Sized` is not implemented for `[u8]`
44
44
note: required because it appears within the type `NotConstMetaSized`
45
- --> $DIR/constness.rs:12 :8
45
+ --> $DIR/constness.rs:10 :8
46
46
|
47
47
LL | struct NotConstMetaSized([u8]);
48
48
| ^^^^^^^^^^^^^^^^^
49
49
note: required by a bound in `size_of`
50
- --> $DIR/constness.rs:18 :21
50
+ --> $DIR/constness.rs:16 :21
51
51
|
52
52
LL | const fn size_of<T: ~const Sized>() { unimplemented!() }
53
53
| ^^^^^^^^^^^^ required by this bound in `size_of`
54
54
55
55
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
56
- --> $DIR/constness.rs:28 :23
56
+ --> $DIR/constness.rs:26 :23
57
57
|
58
58
LL | let _ = size_of::<NotConstMetaSized>();
59
59
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
60
60
|
61
61
= help: within `NotConstMetaSized`, the trait `Sized` is not implemented for `[u8]`
62
62
note: required because it appears within the type `NotConstMetaSized`
63
- --> $DIR/constness.rs:12 :8
63
+ --> $DIR/constness.rs:10 :8
64
64
|
65
65
LL | struct NotConstMetaSized([u8]);
66
66
| ^^^^^^^^^^^^^^^^^
67
67
note: required by a bound in `size_of`
68
- --> $DIR/constness.rs:18 :21
68
+ --> $DIR/constness.rs:16 :21
69
69
|
70
70
LL | const fn size_of<T: ~const Sized>() { unimplemented!() }
71
71
| ^^^^^^^^^^^^ required by this bound in `size_of`
0 commit comments