aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/inlay_hints.rs28
1 files changed, 5 insertions, 23 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index 27bd1e37f..31a6a1be8 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -412,7 +412,8 @@ mod tests {
412 } 412 }
413 413
414 fn check_with_config(config: InlayHintsConfig, ra_fixture: &str) { 414 fn check_with_config(config: InlayHintsConfig, ra_fixture: &str) {
415 let (analysis, file_id) = fixture::file(ra_fixture); 415 let ra_fixture = format!("{}\n{}", ra_fixture, FamousDefs::FIXTURE);
416 let (analysis, file_id) = fixture::file(&ra_fixture);
416 let expected = extract_annotations(&*analysis.file_text(file_id).unwrap()); 417 let expected = extract_annotations(&*analysis.file_text(file_id).unwrap());
417 let inlay_hints = analysis.inlay_hints(file_id, &config).unwrap(); 418 let inlay_hints = analysis.inlay_hints(file_id, &config).unwrap();
418 let actual = 419 let actual =
@@ -1011,13 +1012,6 @@ fn main() {
1011 println!("Unit expr"); 1012 println!("Unit expr");
1012} 1013}
1013 1014
1014//- /core.rs crate:core
1015#[prelude_import] use iter::*;
1016mod iter {
1017 trait IntoIterator {
1018 type Item;
1019 }
1020}
1021//- /alloc.rs crate:alloc deps:core 1015//- /alloc.rs crate:alloc deps:core
1022mod collections { 1016mod collections {
1023 struct Vec<T> {} 1017 struct Vec<T> {}
@@ -1059,14 +1053,6 @@ fn main() {
1059 //^ &str 1053 //^ &str
1060 } 1054 }
1061} 1055}
1062
1063//- /core.rs crate:core
1064#[prelude_import] use iter::*;
1065mod iter {
1066 trait IntoIterator {
1067 type Item;
1068 }
1069}
1070//- /alloc.rs crate:alloc deps:core 1056//- /alloc.rs crate:alloc deps:core
1071mod collections { 1057mod collections {
1072 struct Vec<T> {} 1058 struct Vec<T> {}
@@ -1125,15 +1111,13 @@ fn main() {
1125 chaining_hints: true, 1111 chaining_hints: true,
1126 max_length: None, 1112 max_length: None,
1127 }, 1113 },
1128 &format!( 1114 r#"
1129 "{}\n{}\n",
1130 r#"
1131//- /main.rs crate:main deps:std 1115//- /main.rs crate:main deps:std
1132use std::{Option::{self, Some, None}, iter}; 1116use std::iter;
1133 1117
1134struct MyIter; 1118struct MyIter;
1135 1119
1136impl iter::Iterator for MyIter { 1120impl Iterator for MyIter {
1137 type Item = (); 1121 type Item = ();
1138 fn next(&mut self) -> Option<Self::Item> { 1122 fn next(&mut self) -> Option<Self::Item> {
1139 None 1123 None
@@ -1154,8 +1138,6 @@ fn main() {
1154//- /std.rs crate:std deps:core 1138//- /std.rs crate:std deps:core
1155use core::*; 1139use core::*;
1156"#, 1140"#,
1157 FamousDefs::FIXTURE
1158 ),
1159 ); 1141 );
1160 } 1142 }
1161} 1143}