summaryrefslogtreecommitdiffstats
path: root/tests/ui/inference/char-as-str-multi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/inference/char-as-str-multi.rs')
-rw-r--r--tests/ui/inference/char-as-str-multi.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/inference/char-as-str-multi.rs b/tests/ui/inference/char-as-str-multi.rs
new file mode 100644
index 000000000..c29a15025
--- /dev/null
+++ b/tests/ui/inference/char-as-str-multi.rs
@@ -0,0 +1,7 @@
+// When a MULTI/NO-character string literal is used where a char should be,
+// DO NOT suggest changing to single quotes.
+
+fn main() {
+ let _: char = "foo"; //~ ERROR mismatched types
+ let _: char = ""; //~ ERROR mismatched types
+}