mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
22 lines
248 B
Rust
22 lines
248 B
Rust
#![feature(do_not_recommend)]
|
|
|
|
pub trait Foo {
|
|
}
|
|
|
|
impl Foo for i32 {
|
|
}
|
|
|
|
pub trait Bar {
|
|
}
|
|
|
|
#[do_not_recommend]
|
|
impl<T: Foo> Bar for T {
|
|
}
|
|
|
|
fn stuff<T: Bar>(_: T) {}
|
|
|
|
fn main() {
|
|
stuff(1u8);
|
|
//~^ the trait bound `u8: Foo` is not satisfied
|
|
}
|