mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-31 20:09:01 +00:00
Optimize pub(crate) visibility resolution
This commit is contained in:
parent
4b38ea5abd
commit
e129cdc202
12 changed files with 55 additions and 36 deletions
|
|
@ -144,6 +144,7 @@ pub fn print_variant_body_hir(db: &dyn DefDatabase, owner: VariantId, edition: E
|
|||
w!(p, "{}", interned.display(db, p.edition))
|
||||
}
|
||||
crate::item_tree::RawVisibility::Public => w!(p, "pub "),
|
||||
crate::item_tree::RawVisibility::PubCrate => w!(p, "pub(crate) "),
|
||||
}
|
||||
if *is_unsafe {
|
||||
w!(p, "unsafe ");
|
||||
|
|
|
|||
|
|
@ -457,7 +457,6 @@ fn foo() {
|
|||
#[test]
|
||||
fn is_visible_from_same_def_map() {
|
||||
// Regression test for https://github.com/rust-lang/rust-analyzer/issues/9481
|
||||
cov_mark::check!(is_visible_from_same_block_def_map);
|
||||
check_at(
|
||||
r#"
|
||||
fn outer() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue