Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/simple.rs')
-rw-r--r--crates/hir-ty/src/tests/simple.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/simple.rs b/crates/hir-ty/src/tests/simple.rs
index f92589ea77..3ece40486d 100644
--- a/crates/hir-ty/src/tests/simple.rs
+++ b/crates/hir-ty/src/tests/simple.rs
@@ -3572,3 +3572,18 @@ fn main() {
"#,
);
}
+
+#[test]
+fn cstring_literals() {
+ check_types(
+ r#"
+#[lang = "CStr"]
+pub struct CStr;
+
+fn main() {
+ c"ello";
+ //^^^^^^^ &CStr
+}
+"#,
+ );
+}