Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #82688

Merged
merged 23 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9f1abe8
Run some rustc passes in rustdoc
GuillaumeGomez Feb 27, 2021
25e030b
Add test for rustdoc new check pass
GuillaumeGomez Feb 27, 2021
5ab4d46
Update rustdoc test to make it work with newly added rustc passes
GuillaumeGomez Feb 27, 2021
2f8fa01
Use identifier's span in unused lint
SkiFire13 Feb 28, 2021
6214ef8
Bless some tests
SkiFire13 Feb 28, 2021
65f0b25
Always compile rustdoc with debug logging enabled when `download-rust…
jyn514 Dec 28, 2020
6dc9934
Remove deleted pass from rustdoc test suite
jyn514 Mar 1, 2021
4d7a648
Remove the dummy cache in `DocContext`
jyn514 Feb 12, 2021
163b01a
Remove unused `RenderInfo` struct
jyn514 Feb 12, 2021
be069a6
Remove `krate.version`; fix `crate_version` in JSON
jyn514 Feb 25, 2021
3c63f67
Add regression test
SkiFire13 Feb 28, 2021
5a33f53
check that first arg to `panic!()` in const is `&str`
abonander Jan 5, 2021
bd51dea
Change twice used large const table to static
dtolnay Mar 1, 2021
b0b330f
Validate meta items used in \#\[doc(...)\]
GuillaumeGomez Mar 1, 2021
f6de130
Add tests for doc attribute check
GuillaumeGomez Mar 1, 2021
d20fd62
Add missing stability attributes in libstd
GuillaumeGomez Feb 27, 2021
865cf0c
Rollup merge of #80734 - abonander:ab/issue-66693, r=oli-obk
GuillaumeGomez Mar 1, 2021
22ebb86
Rollup merge of #81932 - jyn514:rustdoc-logging, r=Mark-Simulacrum
GuillaumeGomez Mar 1, 2021
b51272e
Rollup merge of #82018 - jyn514:no-dummy-cache, r=camelid,GuillaumeGomez
GuillaumeGomez Mar 1, 2021
5a82251
Rollup merge of #82598 - GuillaumeGomez:rustdoc-rustc-pass, r=jyn514
GuillaumeGomez Mar 1, 2021
d259d1d
Rollup merge of #82655 - SkiFire13:fix-issue-81314, r=estebank
GuillaumeGomez Mar 1, 2021
0c6b69a
Rollup merge of #82662 - GuillaumeGomez:doc-attr-check, r=jyn514
GuillaumeGomez Mar 1, 2021
9a0ac7c
Rollup merge of #82676 - dtolnay:powers, r=Mark-Simulacrum
GuillaumeGomez Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove krate.version; fix crate_version in JSON
Previously, `JsonRenderer::after_krate` called `krate.version.clone()`.
The problem was it did that after the version was already moved into the
cache, so it would always be None. The fix was to get the version from
the cache instead.
  • Loading branch information
jyn514 committed Mar 1, 2021
commit be069a687a4e1c231b8ae8c68ac0444fa6fee249
1 change: 0 additions & 1 deletion src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ thread_local!(crate static MAX_DEF_IDX: RefCell<FxHashMap<CrateNum, DefIndex>> =
#[derive(Clone, Debug)]
crate struct Crate {
crate name: Symbol,
crate version: Option<String>,
crate src: FileName,
crate module: Option<Item>,
crate externs: Vec<(CrateNum, ExternalCrate)>,
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ crate fn krate(cx: &mut DocContext<'_>) -> Crate {

Crate {
name,
version: None,
src,
module: Some(module),
externs,
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/formats/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ impl Cache {
dst: &Path,
) -> clean::Crate {
// Crawl the crate to build various caches used for the output
self.crate_version = krate.version.take();
debug!(?self.crate_version);
self.traits = krate.external_traits.take();
self.masked_crates = mem::take(&mut krate.masked_crates);
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {

fn after_krate(
&mut self,
krate: &clean::Crate,
_krate: &clean::Crate,
_diag: &rustc_errors::Handler,
) -> Result<(), Error> {
debug!("Done with crate");
Expand All @@ -210,7 +210,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
#[allow(rustc::default_hash_types)]
let output = types::Crate {
root: types::Id(String::from("0:0")),
crate_version: krate.version.clone(),
crate_version: self.cache.crate_version.clone(),
includes_private: self.cache.document_private,
index: index.into_iter().collect(),
paths: self
Expand Down
4 changes: 3 additions & 1 deletion src/test/rustdoc-json/nested.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// edition:2018
// compile-flags: --crate-version 1.0.0

// @is nested.json "$.index[*][?(@.name=='nested')].kind" \"module\"
// @is nested.json "$.crate_version" \"1.0.0\"
// @is - "$.index[*][?(@.name=='nested')].kind" \"module\"
// @is - "$.index[*][?(@.name=='nested')].inner.is_crate" true
// @count - "$.index[*][?(@.name=='nested')].inner.items[*]" 1

Expand Down