Avoid unconditional deps from doc links#158080
Conversation
|
r? @Kivooeo rustbot has assigned @Kivooeo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
||
| pub fn maybe_process_path_extern(&mut self, tcx: TyCtxt<'_>, name: Symbol) -> Option<CrateNum> { | ||
| self.maybe_resolve_crate(tcx, name, CrateDepKind::Unconditional, CrateOrigin::Extern).ok() | ||
| self.maybe_resolve_crate(tcx, name, CrateDepKind::Conditional, CrateOrigin::Extern).ok() |
There was a problem hiding this comment.
CrateDepKind::Conditional is currently only used for crates that are implicitly injected by the compiler like the panic runtime and profiler runtime.
In any case can you explain why this is actually correct? In that cases does maybe_process_path_extern get called without a later process_path_extern? Is there any risk that this will cause a crate actually referenced outside of a doc comment to be loaded as conditional?
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
Fixes #158078