Skip to content

Commit

Permalink
Adding new test rust-lang#71136
Browse files Browse the repository at this point in the history
  • Loading branch information
kper committed May 3, 2020
1 parent dfbc143 commit bc29f1d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/ui/traits/traits-issue-71136.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
struct Foo(u8);

#[derive(Clone)]
struct FooHolster {
the_foos: Vec<Foo>, //~ERROR Clone
}

fn main() {}
13 changes: 13 additions & 0 deletions src/test/ui/traits/traits-issue-71136.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit bc29f1d

Please sign in to comment.