fix test after rebase
This commit is contained in:
parent
c95210f013
commit
6756561887
2 changed files with 10 additions and 6 deletions
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct ContainsRc<T> {
|
||||
#[derive(Clone)] //~ NOTE in this expansion
|
||||
struct ContainsRc<T> { //~ NOTE derive introduces an implicit `T: Clone` bound
|
||||
value: Rc<T>,
|
||||
}
|
||||
|
||||
|
|
@ -14,7 +14,6 @@ fn clone_me<T>(x: &ContainsRc<T>) -> ContainsRc<T> {
|
|||
//~| NOTE expected `ContainsRc<T>`, found `&ContainsRc<T>`
|
||||
//~| NOTE expected struct `ContainsRc<_>`
|
||||
//~| NOTE `ContainsRc<T>` does not implement `Clone`, so `&ContainsRc<T>` was cloned instead
|
||||
//~| NOTE the trait `Clone` must be implemented
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,14 @@ note: `ContainsRc<T>` does not implement `Clone`, so `&ContainsRc<T>` was cloned
|
|||
|
|
||||
LL | x.clone()
|
||||
| ^
|
||||
= help: `Clone` is not implemented because the trait bound `T: Clone` is not satisfied
|
||||
note: the trait `Clone` must be implemented
|
||||
--> $SRC_DIR/core/src/clone.rs:LL:COL
|
||||
help: `Clone` is not implemented because a trait bound is not satisfied
|
||||
--> $DIR/derive-clone-already-present-issue-146515.rs:6:19
|
||||
|
|
||||
LL | #[derive(Clone)]
|
||||
| ----- in this derive macro expansion
|
||||
LL | struct ContainsRc<T> {
|
||||
| ^ derive introduces an implicit `T: Clone` bound
|
||||
= help: consider manually implementing `Clone` to avoid the implicit type parameter bounds
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue