diff options
| author | bors <bors@rust-lang.org> | 2024-01-04 11:00:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-04 11:00:33 +0000 |
| commit | 95e047e4acfe440c11310f5f3a281e356a0c29f4 (patch) | |
| tree | 5a9eac63081e0173b1fd14ba5989024e6fee944d | |
| parent | 8356bc90089dbbff3e7ade7dfcf5da8ce498c681 (diff) | |
| parent | 751d9d11e0453cc57f03283847b41ee7b7a9ba3b (diff) | |
| download | rust-95e047e4acfe440c11310f5f3a281e356a0c29f4.tar.gz rust-95e047e4acfe440c11310f5f3a281e356a0c29f4.zip | |
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
| -rw-r--r-- | Cargo.toml | 4 | ||||
| -rw-r--r-- | crates/hir/src/attrs.rs | 9 | ||||
| -rw-r--r-- | crates/proc-macro-srv/proc-macro-test/Cargo.toml | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/Cargo.toml b/Cargo.toml index 7054020086e..4ee8064b5e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = ["xtask/", "lib/*", "crates/*"] -exclude = ["crates/proc-macro-srv/proc-macro-test/"] +exclude = ["crates/proc-macro-srv/proc-macro-test/imp"] resolver = "2" [workspace.package] @@ -138,4 +138,4 @@ dashmap = { version = "=5.5.3", features = ["raw-api"] } collapsible_if = "allow" needless_pass_by_value = "allow" nonminimal_bool = "allow" -redundant_pattern_matching = "allow" \ No newline at end of file +redundant_pattern_matching = "allow" diff --git a/crates/hir/src/attrs.rs b/crates/hir/src/attrs.rs index bc4d9b9be36..60ddc4aa86f 100644 --- a/crates/hir/src/attrs.rs +++ b/crates/hir/src/attrs.rs @@ -101,9 +101,6 @@ pub fn resolve_doc_path_on( link: &str, ns: Option<Namespace>, ) -> 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) } @@ -267,14 +264,10 @@ fn resolve_impl_trait_item( method_resolution::VisibleFromModule::None, Some(name), &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 // 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. - 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() { ControlFlow::Break(()) diff --git a/crates/proc-macro-srv/proc-macro-test/Cargo.toml b/crates/proc-macro-srv/proc-macro-test/Cargo.toml index 55be6bc23bb..90545bb5130 100644 --- a/crates/proc-macro-srv/proc-macro-test/Cargo.toml +++ b/crates/proc-macro-srv/proc-macro-test/Cargo.toml @@ -13,7 +13,7 @@ doctest = false cargo_metadata = "0.18.1" # local deps -toolchain = { path = "../../toolchain", version = "0.0.0" } +toolchain.workspace = true [features] sysroot-abi = [] |
