1
Fork 0

Add test cases

This commit is contained in:
Deadbeef 2021-08-28 15:53:26 +00:00
parent 523490e94a
commit ee02c8e20a
No known key found for this signature in database
GPG key ID: 027DF9338862ADDD
4 changed files with 107 additions and 3 deletions

View file

@ -0,0 +1,24 @@
// check-pass
#![feature(const_trait_impl)]
#![feature(const_fn_trait_bound)]
trait Foo {
fn bar() where Self: ~const Foo;
}
struct S;
impl Foo for S {
fn bar() {}
}
fn baz<T: Foo>() {
T::bar();
}
const fn qux<T: ~const Foo>() {
T::bar();
}
fn main() {}