Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/tests/generated.rs')
-rw-r--r--crates/ide-assists/src/tests/generated.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs
index 8a35fd290e..c097e07398 100644
--- a/crates/ide-assists/src/tests/generated.rs
+++ b/crates/ide-assists/src/tests/generated.rs
@@ -1480,6 +1480,27 @@ fn foo(name: Option<&str>) {
}
#[test]
+fn doctest_inline_const_as_literal() {
+ check_doc_test(
+ "inline_const_as_literal",
+ r#####"
+const STRING: &str = "Hello, World!";
+
+fn something() -> &'static str {
+ STRING$0
+}
+"#####,
+ r#####"
+const STRING: &str = "Hello, World!";
+
+fn something() -> &'static str {
+ "Hello, World!"
+}
+"#####,
+ )
+}
+
+#[test]
fn doctest_inline_into_callers() {
check_doc_test(
"inline_into_callers",