]> git.proxmox.com Git - rustc.git/blob - tests/ui/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / rfc-2632-const-trait-impl / tilde_const_on_impl_bound.rs
1 // check-pass
2 #![feature(const_trait_impl)]
3
4 #[const_trait]
5 trait Foo {
6 fn foo(&self) {}
7 }
8
9 struct Bar<T>(T);
10
11 impl<T: ~const Foo> Bar<T> {
12 const fn foo(&self) {
13 self.0.foo()
14 }
15 }
16
17 fn main() {}