mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
14 lines
180 B
Rust
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() {}
|