Add test cases
This commit is contained in:
parent
523490e94a
commit
ee02c8e20a
4 changed files with 107 additions and 3 deletions
|
@ -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() {}
|
Loading…
Add table
Add a link
Reference in a new issue