File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1244,6 +1244,7 @@ use mac::fn_macro;
1244
1244
fn_macro$0!();
1245
1245
1246
1246
//- /mac.rs crate:mac
1247
+ #![crate_type="proc-macro"]
1247
1248
#[proc_macro]
1248
1249
fn fn_macro() {}
1249
1250
//^^^^^^^^
Original file line number Diff line number Diff line change @@ -1501,16 +1501,15 @@ fn f() {
1501
1501
check (
1502
1502
r#"
1503
1503
//- proc_macros: identity
1504
-
1505
1504
#[proc_macros::identity]
1506
1505
fn func$0() {
1507
1506
func();
1508
1507
}
1509
1508
"# ,
1510
1509
expect ! [ [ r#"
1511
- func Function FileId(0) 26..51 29..33
1510
+ func Function FileId(0) 25..50 28..32
1512
1511
1513
- FileId(0) 42..46
1512
+ FileId(0) 41..45
1514
1513
"# ] ] ,
1515
1514
)
1516
1515
}
@@ -1555,11 +1554,12 @@ fn func() {}
1555
1554
) ;
1556
1555
check (
1557
1556
r#"
1557
+ #![crate_type="proc-macro"]
1558
1558
#[proc_macro_attribute]
1559
1559
fn func$0() {}
1560
1560
"# ,
1561
1561
expect ! [ [ r#"
1562
- func Attribute FileId(0) 0..36 27..31
1562
+ func Attribute FileId(0) 28..64 55..59
1563
1563
1564
1564
(no references)
1565
1565
"# ] ] ,
@@ -1604,11 +1604,12 @@ struct Foo;
1604
1604
) ;
1605
1605
check (
1606
1606
r#"
1607
+ #![crate_type="proc-macro"]
1607
1608
#[proc_macro_derive(Derive, attributes(x))]
1608
1609
pub fn deri$0ve(_stream: TokenStream) -> TokenStream {}
1609
1610
"# ,
1610
1611
expect ! [ [ r#"
1611
- derive Derive FileId(0) 0..97 51..57
1612
+ derive Derive FileId(0) 28..125 79..85
1612
1613
1613
1614
(no references)
1614
1615
"# ] ] ,
You can’t perform that action at this time.
0 commit comments