|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/suggest-clone-in-macro-issue-139253.rs:13:34 |
| 3 | + | |
| 4 | +LL | let a: Struct = dbg!(expand!(field)); |
| 5 | + | ^^^^^ expected `S`, found `&S` |
| 6 | + | |
| 7 | +help: consider using clone here |
| 8 | + | |
| 9 | +LL | let a: Struct = dbg!(expand!(field: field.clone())); |
| 10 | + | +++++++++++++++ |
| 11 | + |
| 12 | +error[E0308]: mismatched types |
| 13 | + --> $DIR/suggest-clone-in-macro-issue-139253.rs:14:35 |
| 14 | + | |
| 15 | +LL | let b: Struct = dbg!(Struct { field }); |
| 16 | + | ^^^^^ expected `S`, found `&S` |
| 17 | + | |
| 18 | +help: consider using clone here |
| 19 | + | |
| 20 | +LL | let b: Struct = dbg!(Struct { field: field.clone() }); |
| 21 | + | +++++++++++++++ |
| 22 | + |
| 23 | +error[E0308]: mismatched types |
| 24 | + --> $DIR/suggest-clone-in-macro-issue-139253.rs:15:16 |
| 25 | + | |
| 26 | +LL | let c: S = dbg!(field); |
| 27 | + | ^^^^^^^^^^^ expected `S`, found `&S` |
| 28 | + | |
| 29 | + = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 30 | + |
| 31 | +error[E0308]: mismatched types |
| 32 | + --> $DIR/suggest-clone-in-macro-issue-139253.rs:16:16 |
| 33 | + | |
| 34 | +LL | let c: S = dbg!(dbg!(field)); |
| 35 | + | ^^^^^^^^^^^^^^^^^ expected `S`, found `&S` |
| 36 | + | |
| 37 | + = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 38 | + |
| 39 | +error: aborting due to 4 previous errors |
| 40 | + |
| 41 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments