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

rustdoc: general cleanup #63453

Merged
merged 14 commits into from
Aug 11, 2019
Merged

Conversation

Mark-Simulacrum
Copy link
Member

Almost all commits stand alone; but all commits can be reviewed individually.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-11T11:29:40.9799604Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-11T11:29:40.9956448Z ##[command]git config gc.auto 0
2019-08-11T11:29:41.0036614Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-11T11:29:41.0100480Z ##[command]git config --get-all http.proxy
2019-08-11T11:29:41.0228395Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63453/merge:refs/remotes/pull/63453/merge
---
2019-08-11T11:30:15.2047788Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-11T11:30:15.2047993Z 
2019-08-11T11:30:15.2048422Z   git checkout -b <new-branch-name>
2019-08-11T11:30:15.2048600Z 
2019-08-11T11:30:15.2048916Z HEAD is now at 1f49db55f Merge 5972ab688f0d82b61ec6f21cfdb875acea947098 into ee36cfaff97116bcc6230408015dbeb3fb5e2bb9
2019-08-11T11:30:15.2242619Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-11T11:30:15.2246190Z ==============================================================================
2019-08-11T11:30:15.2246256Z Task         : Bash
2019-08-11T11:30:15.2246328Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-11T12:32:02.7259768Z .................................................................................................... 1300/8870
2019-08-11T12:32:09.3418362Z .................................................................................................... 1400/8870
2019-08-11T12:32:15.6992897Z .................................................................................................... 1500/8870
2019-08-11T12:32:26.5251701Z ....................................................................................i............... 1600/8870
2019-08-11T12:32:34.3243611Z i................................................................................................... 1700/8870
2019-08-11T12:32:41.1557238Z ...........................................................................iiiii.................... 1800/8870
2019-08-11T12:33:03.8318913Z .................................................................................................... 2000/8870
2019-08-11T12:33:06.3741427Z .................................................................................................... 2100/8870
2019-08-11T12:33:09.1297188Z .................................................................................................... 2200/8870
2019-08-11T12:33:16.9326127Z .................................................................................................... 2300/8870
---
2019-08-11T12:37:17.8628761Z .................................................................................................... 5300/8870
2019-08-11T12:37:25.2620475Z .....i.............................................................................................. 5400/8870
2019-08-11T12:37:30.5358937Z .................................................................................................... 5500/8870
2019-08-11T12:37:43.4673030Z .................................................................................................... 5600/8870
2019-08-11T12:37:57.8927781Z ii...i..ii...........i.............................................................................. 5700/8870
2019-08-11T12:38:13.0932621Z .................................................................................................... 5900/8870
2019-08-11T12:38:17.9084542Z .................................................................................................... 6000/8870
2019-08-11T12:38:17.9084542Z .................................................................................................... 6000/8870
2019-08-11T12:38:32.5216748Z .i..ii.............................................................................................. 6100/8870
2019-08-11T12:38:51.5880394Z ............................................i....................................................... 6300/8870
2019-08-11T12:38:53.7761831Z .................................................................................................... 6400/8870
2019-08-11T12:38:56.3415988Z ................i................................................................................... 6500/8870
2019-08-11T12:39:01.0338116Z .................................................................................................... 6600/8870
---
2019-08-11T12:43:49.6900312Z  finished in 23.122
2019-08-11T12:43:49.7099494Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T12:43:49.8901798Z 
2019-08-11T12:43:49.8902131Z running 146 tests
2019-08-11T12:43:53.2399898Z i....iii......iii..iiii....i............................i..i................i....i.........ii.i.i..i 100/146
2019-08-11T12:43:55.1847302Z iii..............i.........iii.i......ii......
2019-08-11T12:43:55.1847861Z 
2019-08-11T12:43:55.1899985Z  finished in 5.475
2019-08-11T12:43:55.2043955Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T12:43:55.3614832Z 
---
2019-08-11T12:43:57.4393738Z  finished in 2.234
2019-08-11T12:43:57.4573081Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T12:43:57.6144303Z 
2019-08-11T12:43:57.6144582Z running 9 tests
2019-08-11T12:43:57.6145458Z iiiiiiiii
2019-08-11T12:43:57.6145834Z 
2019-08-11T12:43:57.6145875Z  finished in 0.157
2019-08-11T12:43:57.6342195Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T12:43:57.8075422Z 
---
2019-08-11T12:44:16.3907983Z  finished in 18.756
2019-08-11T12:44:16.4112962Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T12:44:16.5744733Z 
2019-08-11T12:44:16.5745023Z running 122 tests
2019-08-11T12:44:41.5697712Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
2019-08-11T12:44:46.3779029Z .i.i......iii.i.....ii
2019-08-11T12:44:46.3781970Z 
2019-08-11T12:44:46.3786373Z  finished in 29.967
2019-08-11T12:44:46.3792456Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T12:44:46.3796044Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-08-11T12:59:12.7229651Z 
2019-08-11T12:59:12.7234941Z    Doc-tests core
2019-08-11T12:59:16.9251776Z 
2019-08-11T12:59:16.9252856Z running 2379 tests
2019-08-11T12:59:29.2808621Z ......iiiii......................................................................................... 100/2379
2019-08-11T12:59:41.5699908Z .........................................................................ii......................... 200/2379
2019-08-11T13:00:11.4416717Z .................................................................................................... 400/2379
2019-08-11T13:00:11.4416717Z .................................................................................................... 400/2379
2019-08-11T13:00:23.0734258Z ..............................i..i.................iiii............................................. 500/2379
2019-08-11T13:00:47.1340475Z .................................................................................................... 700/2379
2019-08-11T13:00:58.9372311Z .................................................................................................... 800/2379
2019-08-11T13:01:11.0474234Z .................................................................................................... 900/2379
2019-08-11T13:01:23.1392946Z .................................................................................................... 1000/2379
---
2019-08-11T13:06:49.2405496Z 
2019-08-11T13:06:49.2423623Z running 991 tests
2019-08-11T13:07:13.5939916Z i................................................................................................... 100/991
2019-08-11T13:07:27.1132236Z .................................................................................................... 200/991
2019-08-11T13:07:36.0558415Z .................iii......i......i...i......i....................................................... 300/991
2019-08-11T13:07:49.6407259Z ..................................i...i................................ii........................... 500/991
2019-08-11T13:07:56.9950304Z .................................................................................................... 600/991
2019-08-11T13:08:05.0725037Z .................................................................................................... 700/991
2019-08-11T13:08:05.0725037Z .................................................................................................... 700/991
2019-08-11T13:08:13.5673037Z .................iiii............................................................................... 800/991
2019-08-11T13:08:28.8954928Z .................................................................................................... 900/991
2019-08-11T13:08:36.8653492Z .......................................iiii................................................
2019-08-11T13:08:36.8654611Z 
2019-08-11T13:08:36.8847743Z  finished in 255.556
2019-08-11T13:08:36.8866576Z Testing unwind stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-11T13:08:37.0869622Z     Finished release [optimized] target(s) in 0.19s
---
2019-08-11T13:13:27.4044910Z    Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
2019-08-11T13:13:30.3407491Z error[E0308]: mismatched types
2019-08-11T13:13:30.3419184Z   --> src/librustdoc/html/markdown/tests.rs:77:69
2019-08-11T13:13:30.3424160Z    |
2019-08-11T13:13:30.3431661Z 77 |             input, &[], &mut map, ErrorCodes::Yes, DEFAULT_EDITION, None).to_string();
2019-08-11T13:13:30.3442296Z    |                                                                     |
2019-08-11T13:13:30.3446989Z    |                                                                     expected reference, found enum `std::option::Option`
2019-08-11T13:13:30.3446989Z    |                                                                     expected reference, found enum `std::option::Option`
2019-08-11T13:13:30.3452431Z    |                                                                     help: consider borrowing here: `&None`
2019-08-11T13:13:30.3457268Z    |
2019-08-11T13:13:30.3494817Z    = note: expected type `&std::option::Option<html::markdown::Playground>`
2019-08-11T13:13:30.3498464Z 
2019-08-11T13:13:30.3505633Z error[E0308]: mismatched types
2019-08-11T13:13:30.3513290Z    --> src/librustdoc/html/markdown/tests.rs:100:65
2019-08-11T13:13:30.3520200Z     |
2019-08-11T13:13:30.3520200Z     |
2019-08-11T13:13:30.3526983Z 100 |                               ErrorCodes::Yes, DEFAULT_EDITION, None).to_string();
2019-08-11T13:13:30.3584645Z     |                                                                 |
2019-08-11T13:13:30.3585401Z     |                                                                 expected reference, found enum `std::option::Option`
2019-08-11T13:13:30.3585401Z     |                                                                 expected reference, found enum `std::option::Option`
2019-08-11T13:13:30.3585814Z     |                                                                 help: consider borrowing here: `&None`
2019-08-11T13:13:30.3586086Z     |
2019-08-11T13:13:30.3586446Z     = note: expected type `&std::option::Option<html::markdown::Playground>`
2019-08-11T13:13:30.3586778Z 
2019-08-11T13:13:30.3616598Z error[E0308]: mismatched types
2019-08-11T13:13:30.3624152Z    --> src/librustdoc/html/markdown/tests.rs:138:69
2019-08-11T13:13:30.3632075Z     |
2019-08-11T13:13:30.3632075Z     |
2019-08-11T13:13:30.3639147Z 138 |                                   ErrorCodes::Yes, DEFAULT_EDITION, None).to_string();
2019-08-11T13:13:30.3652820Z     |                                                                     |
2019-08-11T13:13:30.3704221Z     |                                                                     expected reference, found enum `std::option::Option`
2019-08-11T13:13:30.3704221Z     |                                                                     expected reference, found enum `std::option::Option`
2019-08-11T13:13:30.3704650Z     |                                                                     help: consider borrowing here: `&None`
2019-08-11T13:13:30.3704898Z     |
2019-08-11T13:13:30.3705210Z     = note: expected type `&std::option::Option<html::markdown::Playground>`
2019-08-11T13:13:30.3705667Z 
2019-08-11T13:13:31.6434031Z error: aborting due to 3 previous errors
2019-08-11T13:13:31.6439978Z 
2019-08-11T13:13:31.6446769Z For more information about this error, try `rustc --explain E0308`.
2019-08-11T13:13:31.6446769Z For more information about this error, try `rustc --explain E0308`.
2019-08-11T13:13:31.7039242Z error: Could not compile `rustdoc`.
2019-08-11T13:13:31.7061320Z warning: build failed, waiting for other jobs to finish...
2019-08-11T13:15:49.0470415Z error: build failed
2019-08-11T13:15:49.0470625Z 
2019-08-11T13:15:49.0470801Z 
2019-08-11T13:15:49.0471447Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "2" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustdoc/Cargo.toml" "-p" "rustdoc:0.0.0" "--" "--quiet"
2019-08-11T13:15:49.0471638Z 
2019-08-11T13:15:49.0471679Z 
2019-08-11T13:15:49.0471833Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-08-11T13:15:49.0471899Z Build completed unsuccessfully in 1:39:13
2019-08-11T13:15:49.0471899Z Build completed unsuccessfully in 1:39:13
2019-08-11T13:15:49.5136079Z ##[error]Bash exited with code '1'.
2019-08-11T13:15:49.5183043Z ##[section]Starting: Checkout
2019-08-11T13:15:49.5184950Z ==============================================================================
2019-08-11T13:15:49.5185032Z Task         : Get sources
2019-08-11T13:15:49.5185085Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@JohnTitor JohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 11, 2019
tcx.crate_name is the appropriate way to retrieve the crate name.
This drops the parking_lot dependency; the ReentrantMutex type appeared
to be unused (at least, no compilation failures occurred).

This is technically a possible change in behavior of its users, as
lock() would wait on other threads releasing their guards, but since we
didn't actually remove any threading or such in this code, it appears
that we never used that behavior (the behavior change is only noticeable
if the type previously was used in two threads, in a single thread
ReentrantMutex is useless).
This is already a query so we're just needlessly copying the data
around.
These impls prevent ergonomic use of the config (e.g., forcing us to use
RefCell) despite all usecases for these structs only using their Display
impls once.
@Mark-Simulacrum Mark-Simulacrum force-pushed the rustdoc-clean-2 branch 2 times, most recently from 7977ada to 9a0b44e Compare August 11, 2019 14:38
@@ -27,7 +28,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {

debug!("get_blanket_impls({:?})", ty);
let mut impls = Vec::new();
for &trait_def_id in self.cx.all_traits.iter() {
for &trait_def_id in self.cx.tcx.all_traits(LOCAL_CRATE).iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this won't remove some auto impl discovering...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is (AFAICT) equivalent because queries once evaluated are always the same, and in this case we don't touch the all_traits vector except on creation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if tests pass then I guess nothing changed in the trait discovery so that's all good.

//! let html = format!("{}", Markdown(s, &[], RefCell::new(&mut id_map),
//! ErrorCodes::Yes, Edition::Edition2015, None));
//! let md = Markdown(s, &[], RefCell::new(&mut id_map),
//! ErrorCodes::Yes, Edition::Edition2015, None);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment is quite bad in this line...

@GuillaumeGomez
Copy link
Member

Thanks a lot, this is awesome! r=me once CI pass.

@Mark-Simulacrum
Copy link
Member Author

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Aug 11, 2019

📌 Commit 3b8a24d has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Aug 11, 2019
…GuillaumeGomez

rustdoc: general cleanup

Almost all commits stand alone; but all commits can be reviewed individually.
bors added a commit that referenced this pull request Aug 11, 2019
Rollup of 8 pull requests

Successful merges:

 - #61969 (Add #[repr(transparent)] for several types)
 - #63346 (Lint on some incorrect uses of mem::zeroed / mem::uninitialized)
 - #63433 (Miri shouldn't look at types)
 - #63440 (rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE)
 - #63441 (Derive Debug for CrateInfo)
 - #63442 (Add an example to show how to insert item to a sorted vec)
 - #63453 (rustdoc: general cleanup)
 - #63464 (Copy ty::Instance instead of passing by reference)

Failed merges:

r? @ghost
@bors bors merged commit 3b8a24d into rust-lang:master Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants