mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
minor
This commit is contained in:
parent
949a6ec469
commit
24262f9ff6
3 changed files with 34 additions and 44 deletions
|
@ -93,6 +93,39 @@ fn baz(s: S) {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn range_mapping_out_of_macros() {
|
||||
// FIXME: this is very wrong, but somewhat tricky to fix.
|
||||
check_fix(
|
||||
r#"
|
||||
fn some() {}
|
||||
fn items() {}
|
||||
fn here() {}
|
||||
|
||||
macro_rules! id { ($($tt:tt)*) => { $($tt)*}; }
|
||||
|
||||
fn main() {
|
||||
let _x = id![Foo { a: $042 }];
|
||||
}
|
||||
|
||||
pub struct Foo { pub a: i32, pub b: i32 }
|
||||
"#,
|
||||
r#"
|
||||
fn some(, b: () ) {}
|
||||
fn items() {}
|
||||
fn here() {}
|
||||
|
||||
macro_rules! id { ($($tt:tt)*) => { $($tt)*}; }
|
||||
|
||||
fn main() {
|
||||
let _x = id![Foo { a: 42 }];
|
||||
}
|
||||
|
||||
pub struct Foo { pub a: i32, pub b: i32 }
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_fill_struct_fields_empty() {
|
||||
check_fix(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue