Skip to content

Commit 95e047e

Browse files
committed
Auto merge of rust-lang#16248 - Veykril:proc-macro-test, r=lnicola
internal: Add proc-macro-test crate back to the main workspace Should fix rust-lang/rust-analyzer#16194
2 parents 8356bc9 + 751d9d1 commit 95e047e

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
members = ["xtask/", "lib/*", "crates/*"]
3-
exclude = ["crates/proc-macro-srv/proc-macro-test/"]
3+
exclude = ["crates/proc-macro-srv/proc-macro-test/imp"]
44
resolver = "2"
55

66
[workspace.package]
@@ -138,4 +138,4 @@ dashmap = { version = "=5.5.3", features = ["raw-api"] }
138138
collapsible_if = "allow"
139139
needless_pass_by_value = "allow"
140140
nonminimal_bool = "allow"
141-
redundant_pattern_matching = "allow"
141+
redundant_pattern_matching = "allow"

crates/hir/src/attrs.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ pub fn resolve_doc_path_on(
101101
link: &str,
102102
ns: Option<Namespace>,
103103
) -> Option<DocLinkDef> {
104-
// AttrDefId::FieldId(it) => it.parent.resolver(db.upcast()),
105-
// AttrDefId::EnumVariantId(it) => it.parent.resolver(db.upcast()),
106-
107104
resolve_doc_path_on_(db, link, def.attr_id(), ns)
108105
}
109106

@@ -267,14 +264,10 @@ fn resolve_impl_trait_item(
267264
method_resolution::VisibleFromModule::None,
268265
Some(name),
269266
&mut |assoc_item_id| {
270-
let assoc_item: AssocItem = assoc_item_id.into();
271-
272-
debug_assert_eq!(assoc_item.name(db).as_ref(), Some(name));
273-
274267
// If two traits in scope define the same item, Rustdoc links to no specific trait (for
275268
// instance, given two methods `a`, Rustdoc simply links to `method.a` with no
276269
// disambiguation) so we just pick the first one we find as well.
277-
result = as_module_def_if_namespace_matches(assoc_item, ns);
270+
result = as_module_def_if_namespace_matches(assoc_item_id.into(), ns);
278271

279272
if result.is_some() {
280273
ControlFlow::Break(())

crates/proc-macro-srv/proc-macro-test/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ doctest = false
1313
cargo_metadata = "0.18.1"
1414

1515
# local deps
16-
toolchain = { path = "../../toolchain", version = "0.0.0" }
16+
toolchain.workspace = true
1717

1818
[features]
1919
sysroot-abi = []

0 commit comments

Comments
 (0)