mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 09:48:10 +00:00
Merge #7546
7546: Add newline between block and crate maps r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
3ff2aa6d09
2 changed files with 11 additions and 0 deletions
|
@ -14,6 +14,7 @@ fn outer() {
|
|||
expect![[r#"
|
||||
block scope
|
||||
inner: v
|
||||
|
||||
crate
|
||||
inner: t
|
||||
outer: v
|
||||
|
@ -38,6 +39,7 @@ fn outer() {
|
|||
CrateStruct: t v
|
||||
SelfStruct: t v
|
||||
Struct: t v
|
||||
|
||||
crate
|
||||
Struct: t v
|
||||
outer: v
|
||||
|
@ -62,6 +64,7 @@ fn outer() {
|
|||
block scope
|
||||
imported: t v
|
||||
name: v
|
||||
|
||||
crate
|
||||
name: t
|
||||
outer: v
|
||||
|
@ -88,9 +91,11 @@ fn outer() {
|
|||
inner1: t
|
||||
inner2: v
|
||||
outer: v
|
||||
|
||||
block scope
|
||||
inner: v
|
||||
inner1: t
|
||||
|
||||
crate
|
||||
outer: v
|
||||
"#]],
|
||||
|
@ -113,6 +118,7 @@ struct Struct {}
|
|||
expect![[r#"
|
||||
block scope
|
||||
Struct: t
|
||||
|
||||
crate
|
||||
Struct: t
|
||||
module: t
|
||||
|
@ -143,6 +149,7 @@ fn f() {
|
|||
expect![[r#"
|
||||
block scope
|
||||
Hit: t
|
||||
|
||||
crate
|
||||
f: v
|
||||
"#]],
|
||||
|
@ -177,8 +184,10 @@ pub mod mark {
|
|||
expect![[r#"
|
||||
block scope
|
||||
Hit: t
|
||||
|
||||
block scope
|
||||
nested: v
|
||||
|
||||
crate
|
||||
f: v
|
||||
mark: t
|
||||
|
@ -210,6 +219,7 @@ fn f() {
|
|||
expect![[r#"
|
||||
block scope
|
||||
Def: t
|
||||
|
||||
crate
|
||||
module: t
|
||||
|
||||
|
|
|
@ -324,6 +324,7 @@ impl DefMap {
|
|||
let mut current_map = self;
|
||||
while let Some(block) = ¤t_map.block {
|
||||
go(&mut buf, current_map, "block scope", current_map.root);
|
||||
buf.push('\n');
|
||||
current_map = &*block.parent;
|
||||
}
|
||||
go(&mut buf, current_map, "crate", current_map.root);
|
||||
|
|
Loading…
Reference in a new issue