mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 22:22:44 +00:00
Adding new test #71136
This commit is contained in:
parent
dfbc143e65
commit
bc29f1d062
8
src/test/ui/traits/traits-issue-71136.rs
Normal file
8
src/test/ui/traits/traits-issue-71136.rs
Normal file
@ -0,0 +1,8 @@
|
||||
struct Foo(u8);
|
||||
|
||||
#[derive(Clone)]
|
||||
struct FooHolster {
|
||||
the_foos: Vec<Foo>, //~ERROR Clone
|
||||
}
|
||||
|
||||
fn main() {}
|
13
src/test/ui/traits/traits-issue-71136.stderr
Normal file
13
src/test/ui/traits/traits-issue-71136.stderr
Normal 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`.
|
Loading…
Reference in New Issue
Block a user