rust/tests/run-make/const-trait-stable-toolchain/const-super-trait.rs

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

14 lines
180 B
Rust
Raw Normal View History

#![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() {}