summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/type-mismatch-byte-literal.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /tests/ui/suggestions/type-mismatch-byte-literal.stderr
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/type-mismatch-byte-literal.stderr')
-rw-r--r--tests/ui/suggestions/type-mismatch-byte-literal.stderr45
1 files changed, 43 insertions, 2 deletions
diff --git a/tests/ui/suggestions/type-mismatch-byte-literal.stderr b/tests/ui/suggestions/type-mismatch-byte-literal.stderr
index c9c2e7498..3d27149f0 100644
--- a/tests/ui/suggestions/type-mismatch-byte-literal.stderr
+++ b/tests/ui/suggestions/type-mismatch-byte-literal.stderr
@@ -30,13 +30,54 @@ LL | foo(b'#');
| ~~~~
error[E0308]: mismatched types
- --> $DIR/type-mismatch-byte-literal.rs:16:18
+ --> $DIR/type-mismatch-byte-literal.rs:15:18
+ |
+LL | let _a: u8 = '\x20';
+ | -- ^^^^^^ expected `u8`, found `char`
+ | |
+ | expected due to this
+ |
+help: if you meant to write a byte literal, prefix with `b`
+ |
+LL | let _a: u8 = b'\x20';
+ | ~~~~~~~
+
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-byte-literal.rs:20:9
+ |
+LL | foo('\u{0080}');
+ | --- ^^^^^^^^^^ expected `u8`, found `char`
+ | |
+ | arguments to this function are incorrect
+ |
+note: function defined here
+ --> $DIR/type-mismatch-byte-literal.rs:4:4
+ |
+LL | fn foo(_t: u8) {}
+ | ^^^ ------
+
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-byte-literal.rs:24:18
|
LL | let _t: u8 = '€';
| -- ^^^ expected `u8`, found `char`
| |
| expected due to this
-error: aborting due to 3 previous errors
+error[E0308]: mismatched types
+ --> $DIR/type-mismatch-byte-literal.rs:28:9
+ |
+LL | foo('\u{1f980}');
+ | --- ^^^^^^^^^^^ expected `u8`, found `char`
+ | |
+ | arguments to this function are incorrect
+ |
+note: function defined here
+ --> $DIR/type-mismatch-byte-literal.rs:4:4
+ |
+LL | fn foo(_t: u8) {}
+ | ^^^ ------
+
+error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0308`.