Add a comment why extern crate is necessary for rustdoc#76728
Merged
bors merged 2 commits intorust-lang:masterfrom Sep 16, 2020
Merged
Add a comment why extern crate is necessary for rustdoc#76728bors merged 2 commits intorust-lang:masterfrom
extern crate is necessary for rustdoc#76728bors merged 2 commits intorust-lang:masterfrom
Conversation
src/librustdoc/lib.rs
Outdated
|
|
||
| // N.B. these need `extern crate` even in 2018 edition | ||
| // because they're loaded implicitly from the sysroot. | ||
| // Dependencies listed in Cargo.toml do not need extern crate. |
Contributor
There was a problem hiding this comment.
So the question now is why does rustdoc have to search dependencies in sysroot rather than specify them in Cargo.toml.
Member
There was a problem hiding this comment.
I think it's because we don't build it in the rustc cargo directory, in part because that gives us finer-grained deleting. That means if we specified things in Cargo.toml, we'd end up rebuilding rustc crates.
Member
Author
There was a problem hiding this comment.
I updated the comment to mention why rustdoc uses the sysroot instead of cargo.toml.
Contributor
|
👍 |
Collaborator
|
📌 Commit b93a831 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 16, 2020
Add a comment why `extern crate` is necessary for rustdoc r? @ehuss From rust-lang#74293 (comment).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 16, 2020
Rollup of 16 pull requests Successful merges: - rust-lang#75026 (Add array_windows fn) - rust-lang#76642 (Do not lint ignored private doc tests) - rust-lang#76719 (Change error message for ty param in const) - rust-lang#76721 (Use intra-doc links in `core::mem`) - rust-lang#76728 (Add a comment why `extern crate` is necessary for rustdoc) - rust-lang#76735 (Remove unnecessary `clone()`s in bootstrap) - rust-lang#76741 (Avoid printing dry run timings) - rust-lang#76747 (Add missing code examples in libcore) - rust-lang#76756 (fix a couple of stylistic clippy warnings) - rust-lang#76758 ([fuchsia] Propagate the userspace UTC clock) - rust-lang#76759 (Fix stabilization marker for future_readiness_fns) - rust-lang#76760 (don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations)) - rust-lang#76764 (Update books) - rust-lang#76775 (Strip a single leading tab when rendering dataflow diffs) - rust-lang#76778 (Simplify iter fuse struct doc) - rust-lang#76794 (Make graphviz font configurable) Failed merges: r? `@ghost`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r? @ehuss
From #74293 (comment).