Files
rust/tests/ui/traits/const-traits/unsatisfied-const-trait-bound.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-09-24 10:53:19 -04:00
error: `-Znext-solver=globally` and `generic_const_exprs` are incompatible, using them at the same time is not allowed
2024-10-30 18:03:44 +00:00
--> $DIR/unsatisfied-const-trait-bound.rs:5:30
2024-09-24 10:53:19 -04:00
|
2024-10-30 18:03:44 +00:00
LL | #![feature(const_trait_impl, generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
2024-09-24 10:53:19 -04:00
|
= help: remove one of these features
error[E0277]: the trait bound `T: const Trait` is not satisfied
--> $DIR/unsatisfied-const-trait-bound.rs:29:37
|
LL | fn accept0<T: Trait>(_: Container<{ T::make() }>) {}
| ^
error[E0277]: the trait bound `T: const Trait` is not satisfied
--> $DIR/unsatisfied-const-trait-bound.rs:33:50
|
LL | const fn accept1<T: ~const Trait>(_: Container<{ T::make() }>) {}
| ^
error[E0277]: the trait bound `Ty: const Trait` is not satisfied
--> $DIR/unsatisfied-const-trait-bound.rs:22:15
|
LL | require::<Ty>();
| ^^
|
note: required by a bound in `require`
2024-09-24 10:53:19 -04:00
--> $DIR/unsatisfied-const-trait-bound.rs:8:15
|
LL | fn require<T: const Trait>() {}
| ^^^^^^^^^^^ required by this bound in `require`
2024-09-24 10:53:19 -04:00
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0277`.