]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/tilde_const_on_impl_bound.rs
Rollup merge of #104182 - gabhijit:ipv6-in6addr-any-doc-fix, r=m-ou-se
[rust.git] / src / test / 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() {}