]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/explain_clone_autoref.stderr
Merge commit 'fdb84cbfd25908df5683f8f62388f663d9260e39' into clippyup
[rust.git] / src / test / ui / typeck / explain_clone_autoref.stderr
1 error[E0308]: mismatched types
2   --> $DIR/explain_clone_autoref.rs:9:5
3    |
4 LL | fn clone_thing(nc: &NotClone) -> NotClone {
5    |                                  -------- expected `NotClone` because of return type
6 LL |
7 LL |     nc.clone()
8    |     ^^^^^^^^^^ expected struct `NotClone`, found `&NotClone`
9    |
10 note: `NotClone` does not implement `Clone`, so `&NotClone` was cloned instead
11   --> $DIR/explain_clone_autoref.rs:9:5
12    |
13 LL |     nc.clone()
14    |     ^^
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.