diff options
Diffstat (limited to 'crates/ra_hir/src/nameres/tests')
-rw-r--r-- | crates/ra_hir/src/nameres/tests/incremental.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres/tests/incremental.rs b/crates/ra_hir/src/nameres/tests/incremental.rs index bc721f6e0..c41862a0b 100644 --- a/crates/ra_hir/src/nameres/tests/incremental.rs +++ b/crates/ra_hir/src/nameres/tests/incremental.rs | |||
@@ -114,7 +114,11 @@ fn typing_inside_a_macro_should_not_invalidate_def_map() { | |||
114 | ); | 114 | ); |
115 | { | 115 | { |
116 | let events = db.log_executed(|| { | 116 | let events = db.log_executed(|| { |
117 | let module = crate::source_binder::module_from_file_id(&db, pos.file_id).unwrap(); | 117 | let src = crate::Source { |
118 | file_id: pos.file_id.into(), | ||
119 | ast: crate::ModuleSource::new(&db, Some(pos.file_id), None), | ||
120 | }; | ||
121 | let module = crate::Module::from_definition(&db, src).unwrap(); | ||
118 | let decls = module.declarations(&db); | 122 | let decls = module.declarations(&db); |
119 | assert_eq!(decls.len(), 18); | 123 | assert_eq!(decls.len(), 18); |
120 | }); | 124 | }); |
@@ -124,7 +128,11 @@ fn typing_inside_a_macro_should_not_invalidate_def_map() { | |||
124 | 128 | ||
125 | { | 129 | { |
126 | let events = db.log_executed(|| { | 130 | let events = db.log_executed(|| { |
127 | let module = crate::source_binder::module_from_file_id(&db, pos.file_id).unwrap(); | 131 | let src = crate::Source { |
132 | file_id: pos.file_id.into(), | ||
133 | ast: crate::ModuleSource::new(&db, Some(pos.file_id), None), | ||
134 | }; | ||
135 | let module = crate::Module::from_definition(&db, src).unwrap(); | ||
128 | let decls = module.declarations(&db); | 136 | let decls = module.declarations(&db); |
129 | assert_eq!(decls.len(), 18); | 137 | assert_eq!(decls.len(), 18); |
130 | }); | 138 | }); |