2024-12-09 19:34:43 +00:00
|
|
|
#![cfg_attr(feature_enabled, feature(const_trait_impl))]
|
|
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
|
fn a(&self);
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-06 13:51:50 +01:00
|
|
|
trait Bar: [const] Foo {}
|
2024-12-09 19:34:43 +00:00
|
|
|
|
2025-08-06 13:51:50 +01:00
|
|
|
const fn foo<T: [const] Bar>(x: &T) {
|
2024-12-09 19:34:43 +00:00
|
|
|
x.a();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|