aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/collector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
-rw-r--r--crates/hir_def/src/nameres/collector.rs21
1 files changed, 13 insertions, 8 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 6fab58f15..4ae02e576 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -1992,8 +1992,8 @@ mod tests {
1992 collector.def_map 1992 collector.def_map
1993 } 1993 }
1994 1994
1995 fn do_resolve(code: &str) -> DefMap { 1995 fn do_resolve(not_ra_fixture: &str) -> DefMap {
1996 let (db, _file_id) = TestDB::with_single_file(code); 1996 let (db, _file_id) = TestDB::with_single_file(not_ra_fixture);
1997 let krate = db.test_crate(); 1997 let krate = db.test_crate();
1998 1998
1999 let edition = db.crate_graph()[krate].edition; 1999 let edition = db.crate_graph()[krate].edition;
@@ -2013,16 +2013,21 @@ mod tests {
2013 ); 2013 );
2014 } 2014 }
2015 2015
2016 #[ignore] // this test does succeed, but takes quite a while :/ 2016 #[ignore]
2017 #[test] 2017 #[test]
2018 fn test_macro_expand_will_stop_2() { 2018 fn test_macro_expand_will_stop_2() {
2019 // FIXME: this test does succeed, but takes quite a while: 90 seconds in
2020 // the release mode. That's why the argument is not an ra_fixture --
2021 // otherwise injection highlighting gets stuck.
2022 //
2023 // We need to find a way to fail this faster.
2019 do_resolve( 2024 do_resolve(
2020 r#" 2025 r#"
2021 macro_rules! foo { 2026macro_rules! foo {
2022 ($($ty:ty)*) => { foo!($($ty)* $($ty)*); } 2027 ($($ty:ty)*) => { foo!($($ty)* $($ty)*); }
2023 } 2028}
2024 foo!(KABOOM); 2029foo!(KABOOM);
2025 "#, 2030"#,
2026 ); 2031 );
2027 } 2032 }
2028} 2033}