rust/src/test/ui/traits/trait-bounds-not-on-struct.rs
2018-12-25 21:08:33 -07:00

10 lines
211 B
Rust

#![allow(bare_trait_objects)]
struct Foo;
fn foo(_x: Box<Foo + Send>) { } //~ ERROR expected trait, found struct `Foo`
type A<T> = Box<dyn Vec<T>>; //~ ERROR expected trait, found struct `Vec`
fn main() { }