@@ -31,7 +31,10 @@ fn simplify(e: ConstEvalError) -> ConstEvalError {
31
31
}
32
32
33
33
#[ track_caller]
34
- fn check_fail ( ra_fixture : & str , error : impl FnOnce ( ConstEvalError ) -> bool ) {
34
+ fn check_fail (
35
+ #[ rust_analyzer:: rust_fixture] ra_fixture : & str ,
36
+ error : impl FnOnce ( ConstEvalError ) -> bool ,
37
+ ) {
35
38
let ( db, file_id) = TestDB :: with_single_file ( ra_fixture) ;
36
39
match eval_goal ( & db, file_id) {
37
40
Ok ( _) => panic ! ( "Expected fail, but it succeeded" ) ,
@@ -42,7 +45,7 @@ fn check_fail(ra_fixture: &str, error: impl FnOnce(ConstEvalError) -> bool) {
42
45
}
43
46
44
47
#[ track_caller]
45
- fn check_number ( ra_fixture : & str , answer : i128 ) {
48
+ fn check_number ( # [ rust_analyzer :: rust_fixture ] ra_fixture : & str , answer : i128 ) {
46
49
check_answer ( ra_fixture, |b, _| {
47
50
assert_eq ! (
48
51
b,
@@ -54,7 +57,7 @@ fn check_number(ra_fixture: &str, answer: i128) {
54
57
}
55
58
56
59
#[ track_caller]
57
- fn check_str ( ra_fixture : & str , answer : & str ) {
60
+ fn check_str ( # [ rust_analyzer :: rust_fixture ] ra_fixture : & str , answer : & str ) {
58
61
check_answer ( ra_fixture, |b, mm| {
59
62
let addr = usize:: from_le_bytes ( b[ 0 ..b. len ( ) / 2 ] . try_into ( ) . unwrap ( ) ) ;
60
63
let size = usize:: from_le_bytes ( b[ b. len ( ) / 2 ..] . try_into ( ) . unwrap ( ) ) ;
@@ -71,7 +74,10 @@ fn check_str(ra_fixture: &str, answer: &str) {
71
74
}
72
75
73
76
#[ track_caller]
74
- fn check_answer ( ra_fixture : & str , check : impl FnOnce ( & [ u8 ] , & MemoryMap ) ) {
77
+ fn check_answer (
78
+ #[ rust_analyzer:: rust_fixture] ra_fixture : & str ,
79
+ check : impl FnOnce ( & [ u8 ] , & MemoryMap ) ,
80
+ ) {
75
81
let ( db, file_ids) = TestDB :: with_many_files ( ra_fixture) ;
76
82
let file_id = * file_ids. last ( ) . unwrap ( ) ;
77
83
let r = match eval_goal ( & db, file_id) {
0 commit comments