@@ -9,6 +9,7 @@ use crate::{Analysis, AnalysisHost, FileId, FilePosition, FileRange};
9
9
pub ( crate ) fn file ( ra_fixture : & str ) -> ( Analysis , FileId ) {
10
10
let mut host = AnalysisHost :: default ( ) ;
11
11
let change_fixture = ChangeFixture :: parse ( ra_fixture) ;
12
+ host. db . set_enable_proc_attr_macros ( true ) ;
12
13
host. db . apply_change ( change_fixture. change ) ;
13
14
( host. analysis ( ) , change_fixture. files [ 0 ] )
14
15
}
@@ -17,6 +18,7 @@ pub(crate) fn file(ra_fixture: &str) -> (Analysis, FileId) {
17
18
pub ( crate ) fn position ( ra_fixture : & str ) -> ( Analysis , FilePosition ) {
18
19
let mut host = AnalysisHost :: default ( ) ;
19
20
let change_fixture = ChangeFixture :: parse ( ra_fixture) ;
21
+ host. db . set_enable_proc_attr_macros ( true ) ;
20
22
host. db . apply_change ( change_fixture. change ) ;
21
23
let ( file_id, range_or_offset) = change_fixture. file_position . expect ( "expected a marker ($0)" ) ;
22
24
let offset = range_or_offset. expect_offset ( ) ;
@@ -27,6 +29,7 @@ pub(crate) fn position(ra_fixture: &str) -> (Analysis, FilePosition) {
27
29
pub ( crate ) fn range ( ra_fixture : & str ) -> ( Analysis , FileRange ) {
28
30
let mut host = AnalysisHost :: default ( ) ;
29
31
let change_fixture = ChangeFixture :: parse ( ra_fixture) ;
32
+ host. db . set_enable_proc_attr_macros ( true ) ;
30
33
host. db . apply_change ( change_fixture. change ) ;
31
34
let ( file_id, range_or_offset) = change_fixture. file_position . expect ( "expected a marker ($0)" ) ;
32
35
let range = range_or_offset. expect_range ( ) ;
@@ -37,6 +40,7 @@ pub(crate) fn range(ra_fixture: &str) -> (Analysis, FileRange) {
37
40
pub ( crate ) fn range_or_position ( ra_fixture : & str ) -> ( Analysis , FileId , RangeOrOffset ) {
38
41
let mut host = AnalysisHost :: default ( ) ;
39
42
let change_fixture = ChangeFixture :: parse ( ra_fixture) ;
43
+ host. db . set_enable_proc_attr_macros ( true ) ;
40
44
host. db . apply_change ( change_fixture. change ) ;
41
45
let ( file_id, range_or_offset) = change_fixture. file_position . expect ( "expected a marker ($0)" ) ;
42
46
( host. analysis ( ) , file_id, range_or_offset)
@@ -45,8 +49,8 @@ pub(crate) fn range_or_position(ra_fixture: &str) -> (Analysis, FileId, RangeOrO
45
49
/// Creates analysis from a multi-file fixture, returns positions marked with $0.
46
50
pub ( crate ) fn annotations ( ra_fixture : & str ) -> ( Analysis , FilePosition , Vec < ( FileRange , String ) > ) {
47
51
let mut host = AnalysisHost :: default ( ) ;
48
- host. db . set_enable_proc_attr_macros ( true ) ;
49
52
let change_fixture = ChangeFixture :: parse ( ra_fixture) ;
53
+ host. db . set_enable_proc_attr_macros ( true ) ;
50
54
host. db . apply_change ( change_fixture. change ) ;
51
55
let ( file_id, range_or_offset) = change_fixture. file_position . expect ( "expected a marker ($0)" ) ;
52
56
let offset = range_or_offset. expect_offset ( ) ;
0 commit comments