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/typeck/conversion-methods.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/typeck/conversion-methods.stderr')
-rw-r--r-- | src/test/ui/typeck/conversion-methods.stderr | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/test/ui/typeck/conversion-methods.stderr b/src/test/ui/typeck/conversion-methods.stderr new file mode 100644 index 000000000..091502bdd --- /dev/null +++ b/src/test/ui/typeck/conversion-methods.stderr @@ -0,0 +1,45 @@ +error[E0308]: mismatched types + --> $DIR/conversion-methods.rs:5:41 + | +LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; + | ------ ^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()` + | | | + | | expected struct `String`, found `&str` + | expected due to this + +error[E0308]: mismatched types + --> $DIR/conversion-methods.rs:6:40 + | +LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); + | ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_path_buf()` + | | | + | | expected struct `PathBuf`, found `&Path` + | expected due to this + +error[E0308]: mismatched types + --> $DIR/conversion-methods.rs:9:40 + | +LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here + | ------ ^- help: try using a conversion method: `.to_string()` + | | | + | | expected struct `String`, found integer + | expected due to this + +error[E0308]: mismatched types + --> $DIR/conversion-methods.rs:12:47 + | +LL | let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3]; + | ---------- ^^^^^^^^^^ expected struct `Vec`, found `&[{integer}; 3]` + | | + | expected due to this + | + = note: expected struct `Vec<usize>` + found reference `&[{integer}; 3]` +help: try using a conversion method + | +LL | let _prove_piercing_earnest: Vec<usize> = (&[1, 2, 3]).to_vec(); + | + ++++++++++ + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. |