rust/tests/run-make/const-trait-stable-toolchain/const-super-trait.rs
Esteban Küber 4007fc9a0f Tweak wording of non-const traits used as const bounds
Use verbose suggestions and add additional labels/notes.

Add more test cases for stable/nightly and feature enabled/disabled.
2024-12-10 00:38:05 +00:00

14 lines
180 B
Rust

#![cfg_attr(feature_enabled, feature(const_trait_impl))]
trait Foo {
fn a(&self);
}
trait Bar: ~const Foo {}
const fn foo<T: ~const Bar>(x: &T) {
x.a();
}
fn main() {}