diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/suggestions/format-borrow.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/suggestions/format-borrow.stderr')
-rw-r--r-- | src/test/ui/suggestions/format-borrow.stderr | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/format-borrow.stderr b/src/test/ui/suggestions/format-borrow.stderr new file mode 100644 index 000000000..fac6a5a5f --- /dev/null +++ b/src/test/ui/suggestions/format-borrow.stderr @@ -0,0 +1,59 @@ +error[E0308]: mismatched types + --> $DIR/format-borrow.rs:2:21 + | +LL | let a: String = &String::from("a"); + | ------ ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&String` + | | + | expected due to this + | +help: consider removing the borrow + | +LL - let a: String = &String::from("a"); +LL + let a: String = String::from("a"); + | + +error[E0308]: mismatched types + --> $DIR/format-borrow.rs:4:21 + | +LL | let b: String = &format!("b"); + | ------ ^^^^^^^^^^^^^ expected struct `String`, found `&String` + | | + | expected due to this + | +help: consider removing the borrow + | +LL - let b: String = &format!("b"); +LL + let b: String = format!("b"); + | + +error[E0308]: mismatched types + --> $DIR/format-borrow.rs:6:21 + | +LL | let c: String = &mut format!("c"); + | ------ ^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String` + | | + | expected due to this + | +help: consider removing the borrow + | +LL - let c: String = &mut format!("c"); +LL + let c: String = format!("c"); + | + +error[E0308]: mismatched types + --> $DIR/format-borrow.rs:8:21 + | +LL | let d: String = &mut (format!("d")); + | ------ ^^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String` + | | + | expected due to this + | +help: consider removing the borrow + | +LL - let d: String = &mut (format!("d")); +LL + let d: String = format!("d")); + | + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. |