1
1
warning: cannot use constants which depend on trivially-false where clauses
2
- --> $DIR/impossible_preds_repeat_expr_hack.rs:25:28
2
+ --> $DIR/impossible_preds_repeat_expr_hack.rs:26:19
3
+ |
4
+ LL | let _a = [(); <u8 as Trait<()>>::ASSOC];
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
+ = note: for more information, see issue #76200 <https://github.com/rust-lang/rust/issues/76200>
9
+ = note: `#[warn(const_evaluatable_unchecked)]` on by default
10
+
11
+ warning: cannot use constants which depend on trivially-false where clauses
12
+ --> $DIR/impossible_preds_repeat_expr_hack.rs:35:28
3
13
|
4
14
LL | let _a: [(); 1] = [(); <u8 as Trait<()>>::ASSOC];
5
15
| ^^^^^^^^^^^^^^^^^^^^^^^^
6
16
|
7
17
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
18
= note: for more information, see issue #76200 <https://github.com/rust-lang/rust/issues/76200>
9
- = note: `#[warn(const_evaluatable_unchecked)]` on by default
10
19
11
20
error[E0308]: mismatched types
12
- --> $DIR/impossible_preds_repeat_expr_hack.rs:25 :23
21
+ --> $DIR/impossible_preds_repeat_expr_hack.rs:35 :23
13
22
|
14
23
LL | let _a: [(); 1] = [(); <u8 as Trait<()>>::ASSOC];
15
24
| ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a size of 1, found one with a size of <u8 as Trait<()>>::ASSOC
16
25
| |
17
26
| expected due to this
18
27
28
+ warning: cannot use constants which depend on trivially-false where clauses
29
+ --> $DIR/impossible_preds_repeat_expr_hack.rs:42:28
30
+ |
31
+ LL | let _c: [(); 2] = [(); 1 + 1];
32
+ | ^^^^^
33
+ |
34
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35
+ = note: for more information, see issue #76200 <https://github.com/rust-lang/rust/issues/76200>
36
+
19
37
error[E0277]: the trait bound `for<'a> (): Unimplemented<'a>` is not satisfied
20
- --> $DIR/impossible_preds_repeat_expr_hack.rs:37 :43
38
+ --> $DIR/impossible_preds_repeat_expr_hack.rs:53 :43
21
39
|
22
40
LL | let _a: Foo<1> = Foo::<{ <u8 as Trait<()>>::ASSOC }>;
23
41
| ^^ the trait `for<'a> Unimplemented<'a>` is not implemented for `()`
@@ -37,7 +55,7 @@ LL | const ASSOC: usize;
37
55
| ----- required by a bound in this associated constant
38
56
39
57
error[E0277]: the trait bound `for<'a> (): Unimplemented<'a>` is not satisfied
40
- --> $DIR/impossible_preds_repeat_expr_hack.rs:37 :31
58
+ --> $DIR/impossible_preds_repeat_expr_hack.rs:53 :31
41
59
|
42
60
LL | let _a: Foo<1> = Foo::<{ <u8 as Trait<()>>::ASSOC }>;
43
61
| ^^ the trait `for<'a> Unimplemented<'a>` is not implemented for `()`
@@ -56,7 +74,7 @@ LL | where
56
74
LL | for<'a> T: Unimplemented<'a>,
57
75
| ----------------- unsatisfied trait bound introduced here
58
76
59
- error: aborting due to 3 previous errors; 1 warning emitted
77
+ error: aborting due to 3 previous errors; 3 warnings emitted
60
78
61
79
Some errors have detailed explanations: E0277, E0308.
62
80
For more information about an error, try `rustc --explain E0277`.
0 commit comments