mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
19 lines
289 B
Rust
19 lines
289 B
Rust
//@ check-pass
|
|
#![feature(const_trait_impl, rustc_attrs)]
|
|
|
|
#[const_trait]
|
|
trait IntoIter {
|
|
fn into_iter(self);
|
|
}
|
|
|
|
#[const_trait]
|
|
trait Hmm: Sized {
|
|
#[rustc_do_not_const_check]
|
|
fn chain<U>(self, other: U) where U: IntoIter,
|
|
{
|
|
other.into_iter()
|
|
}
|
|
}
|
|
|
|
fn main() {}
|