From f5ca02c334b2eaa6817c15d6e2c88ab98d2a2054 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Tue, 1 Feb 2022 20:30:32 +0800 Subject: [PATCH] proc_macro: Add a workaround for rustdoc --- Cargo.lock | 1 + library/proc_macro/Cargo.toml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index e3a9eb34936..fbc9ca7051f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2894,6 +2894,7 @@ dependencies = [ name = "proc_macro" version = "0.0.0" dependencies = [ + "core", "std", ] diff --git a/library/proc_macro/Cargo.toml b/library/proc_macro/Cargo.toml index db5e2e4e245..e54a50aa15c 100644 --- a/library/proc_macro/Cargo.toml +++ b/library/proc_macro/Cargo.toml @@ -5,3 +5,7 @@ edition = "2021" [dependencies] std = { path = "../std" } +# Workaround: when documenting this crate rustdoc will try to load crate named +# `core` when resolving doc links. Without this line a different `core` will be +# loaded from sysroot causing duplicate lang items and other similar errors. +core = { path = "../core" }