Auto merge of #16248 - Veykril:proc-macro-test, r=lnicola

internal: Add proc-macro-test crate back to the main workspace

Should fix https://github.com/rust-lang/rust-analyzer/issues/16194
This commit is contained in:
bors 2024-01-04 11:00:33 +00:00
commit 95e047e4ac
3 changed files with 4 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[workspace] [workspace]
members = ["xtask/", "lib/*", "crates/*"] members = ["xtask/", "lib/*", "crates/*"]
exclude = ["crates/proc-macro-srv/proc-macro-test/"] exclude = ["crates/proc-macro-srv/proc-macro-test/imp"]
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]

View File

@ -101,9 +101,6 @@ pub fn resolve_doc_path_on(
link: &str, link: &str,
ns: Option<Namespace>, ns: Option<Namespace>,
) -> Option<DocLinkDef> { ) -> Option<DocLinkDef> {
// AttrDefId::FieldId(it) => it.parent.resolver(db.upcast()),
// AttrDefId::EnumVariantId(it) => it.parent.resolver(db.upcast()),
resolve_doc_path_on_(db, link, def.attr_id(), ns) resolve_doc_path_on_(db, link, def.attr_id(), ns)
} }
@ -267,14 +264,10 @@ fn resolve_impl_trait_item(
method_resolution::VisibleFromModule::None, method_resolution::VisibleFromModule::None,
Some(name), Some(name),
&mut |assoc_item_id| { &mut |assoc_item_id| {
let assoc_item: AssocItem = assoc_item_id.into();
debug_assert_eq!(assoc_item.name(db).as_ref(), Some(name));
// If two traits in scope define the same item, Rustdoc links to no specific trait (for // If two traits in scope define the same item, Rustdoc links to no specific trait (for
// instance, given two methods `a`, Rustdoc simply links to `method.a` with no // instance, given two methods `a`, Rustdoc simply links to `method.a` with no
// disambiguation) so we just pick the first one we find as well. // disambiguation) so we just pick the first one we find as well.
result = as_module_def_if_namespace_matches(assoc_item, ns); result = as_module_def_if_namespace_matches(assoc_item_id.into(), ns);
if result.is_some() { if result.is_some() {
ControlFlow::Break(()) ControlFlow::Break(())

View File

@ -13,7 +13,7 @@ doctest = false
cargo_metadata = "0.18.1" cargo_metadata = "0.18.1"
# local deps # local deps
toolchain = { path = "../../toolchain", version = "0.0.0" } toolchain.workspace = true
[features] [features]
sysroot-abi = [] sysroot-abi = []