]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / default-method-body-is-const-body-checking.rs
1 #![feature(const_trait_impl)]
2
3 trait Tr {}
4 impl Tr for () {}
5
6 const fn foo<T>() where T: ~const Tr {}
7
8 #[const_trait]
9 pub trait Foo {
10     fn foo() {
11         foo::<()>();
12         //~^ ERROR the trait bound `(): ~const Tr` is not satisfied
13     }
14 }
15
16 fn main() {}