Skip to content

Commit bc29f1d

Browse files
committed
Adding new test rust-lang#71136
1 parent dfbc143 commit bc29f1d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
struct Foo(u8);
2+
3+
#[derive(Clone)]
4+
struct FooHolster {
5+
the_foos: Vec<Foo>, //~ERROR Clone
6+
}
7+
8+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0277]: the trait bound `Foo: std::clone::Clone` is not satisfied
2+
--> $DIR/traits-issue-71136.rs:5:5
3+
|
4+
LL | the_foos: Vec<Foo>,
5+
| ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `std::clone::Clone`
6+
|
7+
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<Foo>`
8+
= note: required by `std::clone::Clone::clone`
9+
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
10+
11+
error: aborting due to previous error
12+
13+
For more information about this error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)