diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/span/coerce-suggestions.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/span/coerce-suggestions.stderr')
-rw-r--r-- | tests/ui/span/coerce-suggestions.stderr | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/ui/span/coerce-suggestions.stderr b/tests/ui/span/coerce-suggestions.stderr new file mode 100644 index 000000000..db784d5fe --- /dev/null +++ b/tests/ui/span/coerce-suggestions.stderr @@ -0,0 +1,72 @@ +error[E0308]: mismatched types + --> $DIR/coerce-suggestions.rs:7:20 + | +LL | let x: usize = String::new(); + | ----- ^^^^^^^^^^^^^ expected `usize`, found struct `String` + | | + | expected due to this + +error[E0308]: mismatched types + --> $DIR/coerce-suggestions.rs:9:19 + | +LL | let x: &str = String::new(); + | ---- ^^^^^^^^^^^^^ + | | | + | | expected `&str`, found struct `String` + | | help: consider borrowing here: `&String::new()` + | expected due to this + +error[E0308]: mismatched types + --> $DIR/coerce-suggestions.rs:12:10 + | +LL | test(&y); + | ---- ^^ types differ in mutability + | | + | arguments to this function are incorrect + | + = note: expected mutable reference `&mut String` + found reference `&String` +note: function defined here + --> $DIR/coerce-suggestions.rs:1:4 + | +LL | fn test(_x: &mut String) {} + | ^^^^ --------------- + +error[E0308]: mismatched types + --> $DIR/coerce-suggestions.rs:14:11 + | +LL | test2(&y); + | ----- ^^ types differ in mutability + | | + | arguments to this function are incorrect + | + = note: expected mutable reference `&mut i32` + found reference `&String` +note: function defined here + --> $DIR/coerce-suggestions.rs:3:4 + | +LL | fn test2(_x: &mut i32) {} + | ^^^^^ ------------ + +error[E0308]: mismatched types + --> $DIR/coerce-suggestions.rs:17:9 + | +LL | f = Box::new(f); + | ^^^^^^^^^^^ cyclic type of infinite size + | +help: consider unboxing the value + | +LL | f = *Box::new(f); + | + + +error[E0308]: mismatched types + --> $DIR/coerce-suggestions.rs:21:9 + | +LL | s = format!("foo"); + | ^^^^^^^^^^^^^^ expected `&mut String`, found struct `String` + | + = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0308`. |