about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKevin Per <kevin.per@protonmail.com>2020-05-03 11:11:23 +0200
committerKevin Per <kevin.per@protonmail.com>2020-05-03 11:11:23 +0200
commitbc29f1d062feeb68207c961d254652d6bff9fd9b (patch)
treeab65299d7f2dda878786b308147a277ff2f11ba3
parentdfbc143e65dd4dc8499f7296ddc7889854a8cc7d (diff)
downloadrust-bc29f1d062feeb68207c961d254652d6bff9fd9b.tar.gz
rust-bc29f1d062feeb68207c961d254652d6bff9fd9b.zip
Adding new test #71136
-rw-r--r--src/test/ui/traits/traits-issue-71136.rs8
-rw-r--r--src/test/ui/traits/traits-issue-71136.stderr13
2 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/traits/traits-issue-71136.rs b/src/test/ui/traits/traits-issue-71136.rs
new file mode 100644
index 00000000000..b21756e2b63
--- /dev/null
+++ b/src/test/ui/traits/traits-issue-71136.rs
@@ -0,0 +1,8 @@
+struct Foo(u8);
+
+#[derive(Clone)]
+struct FooHolster {
+    the_foos: Vec<Foo>, //~ERROR Clone
+}
+
+fn main() {}
diff --git a/src/test/ui/traits/traits-issue-71136.stderr b/src/test/ui/traits/traits-issue-71136.stderr
new file mode 100644
index 00000000000..4c0a43062f6
--- /dev/null
+++ b/src/test/ui/traits/traits-issue-71136.stderr
@@ -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`.