Adding new test #71136

This commit is contained in:
Kevin Per 2020-05-03 11:11:23 +02:00
parent dfbc143e65
commit bc29f1d062
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,8 @@
struct Foo(u8);
#[derive(Clone)]
struct FooHolster {
the_foos: Vec<Foo>, //~ERROR Clone
}
fn main() {}

View File

@ -0,0 +1,13 @@
error[E0277]: the trait bound `Foo: std::clone::Clone` is not satisfied
--> $DIR/traits-issue-71136.rs:5:5
|
LL | the_foos: Vec<Foo>,
| ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `std::clone::Clone`
|
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<Foo>`
= note: required by `std::clone::Clone::clone`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.