File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
crates/ide-assists/src/handlers Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -1620,4 +1620,50 @@ mod foo {
1620
1620
"# ,
1621
1621
) ;
1622
1622
}
1623
+
1624
+ #[ test]
1625
+ fn preserve_raw_identifiers_strict ( ) {
1626
+ check_assist (
1627
+ auto_import,
1628
+ r"
1629
+ r#as$0
1630
+
1631
+ pub mod ffi_mod {
1632
+ pub fn r#as() {};
1633
+ }
1634
+ " ,
1635
+ r"
1636
+ use ffi_mod::r#as;
1637
+
1638
+ r#as
1639
+
1640
+ pub mod ffi_mod {
1641
+ pub fn r#as() {};
1642
+ }
1643
+ " ,
1644
+ ) ;
1645
+ }
1646
+
1647
+ #[ test]
1648
+ fn preserve_raw_identifiers_reserved ( ) {
1649
+ check_assist (
1650
+ auto_import,
1651
+ r"
1652
+ r#abstract$0
1653
+
1654
+ pub mod ffi_mod {
1655
+ pub fn r#abstract() {};
1656
+ }
1657
+ " ,
1658
+ r"
1659
+ use ffi_mod::r#abstract;
1660
+
1661
+ r#abstract
1662
+
1663
+ pub mod ffi_mod {
1664
+ pub fn r#abstract() {};
1665
+ }
1666
+ " ,
1667
+ ) ;
1668
+ }
1623
1669
}
You can’t perform that action at this time.
0 commit comments