11warning: 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
313 |
414LL | let _a: [(); 1] = [(); <u8 as Trait<()>>::ASSOC];
515 | ^^^^^^^^^^^^^^^^^^^^^^^^
616 |
717 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
818 = note: for more information, see issue #76200 <https://github.com/rust-lang/rust/issues/76200>
9- = note: `#[warn(const_evaluatable_unchecked)]` on by default
1019
1120error[E0308]: mismatched types
12- --> $DIR/impossible_preds_repeat_expr_hack.rs:25 :23
21+ --> $DIR/impossible_preds_repeat_expr_hack.rs:35 :23
1322 |
1423LL | let _a: [(); 1] = [(); <u8 as Trait<()>>::ASSOC];
1524 | ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a size of 1, found one with a size of <u8 as Trait<()>>::ASSOC
1625 | |
1726 | expected due to this
1827
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+
1937error[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
2139 |
2240LL | let _a: Foo<1> = Foo::<{ <u8 as Trait<()>>::ASSOC }>;
2341 | ^^ the trait `for<'a> Unimplemented<'a>` is not implemented for `()`
@@ -37,7 +55,7 @@ LL | const ASSOC: usize;
3755 | ----- required by a bound in this associated constant
3856
3957error[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
4159 |
4260LL | let _a: Foo<1> = Foo::<{ <u8 as Trait<()>>::ASSOC }>;
4361 | ^^ the trait `for<'a> Unimplemented<'a>` is not implemented for `()`
@@ -56,7 +74,7 @@ LL | where
5674LL | for<'a> T: Unimplemented<'a>,
5775 | ----------------- unsatisfied trait bound introduced here
5876
59- error: aborting due to 3 previous errors; 1 warning emitted
77+ error: aborting due to 3 previous errors; 3 warnings emitted
6078
6179Some errors have detailed explanations: E0277, E0308.
6280For more information about an error, try `rustc --explain E0277`.
0 commit comments