about summary refs log tree commit diff
path: root/src/librustdoc/docfs.rs
AgeCommit message (Collapse)AuthorLines
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2023-12-10remove redundant importssurechen-1/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-08-16Use more named format argsGuillaume Gomez-3/+3
2023-08-16Improve code readability by moving fmt args directly into the stringGuillaume Gomez-1/+1
2023-03-15Update docsfs module documentationGuillaume Gomez-1/+0
2023-03-14rustdoc: DocFS: Replace rayon with threadpool and enable it for all targetsGuillaume Gomez-6/+21
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-7/+7
2022-05-06rustdoc: don't build `rayon` for non-windows targetsklensy-1/+6
2021-10-28rustdoc: Remove a single-use macroNoah Lev-10/+1
I think the new code is simpler and easier to understand.
2021-08-26Remove unnecessary copies when using parallel IOJoshua Nelson-6/+6
Previously, rustdoc was making lots of copies of temporary owned values. Now, it uses the owned value wherever possible.
2020-11-15Make all rustdoc functions and structs crate-privateJoshua Nelson-7/+7
This gives warnings about dead code.
2020-08-07fix clippy::unit_arg: make it explicit that Ok(()) is being returnedMatthias Krüger-2/+2
2020-08-07fix clippy::expect_fun_call: use unwrap_or_else to prevent panic message ↵Matthias Krüger-3/+3
from always being evaluated
2020-07-29Pass by valueJoseph Ryan-2/+2
2020-07-29Refactor DocFS to fix error handling bugsJoseph Ryan-45/+16
2020-05-08Clean up rustdoc source codeGuillaume Gomez-1/+4
2020-04-15Fix clippy warningsMatthias Krüger-2/+2
clippy::{filter_next,single_char_pattern,unit_arg,identity_conversion,nonminimal_bool}
2020-03-05Don't always eval arguments inside .expect(), use unwrap_or_else and ↵Matthias Krüger-6/+6
closure. (clippy::expect_fun_call)
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-3/+1
2019-12-22Format the worldMark Rousskov-19/+13
2019-06-21Better handling of the sender channel part in rustdoc file writingGuillaume Gomez-6/+6
2019-06-21Handle fs errors through errors::Handler instead of eprintln and panicGuillaume Gomez-8/+47
2019-06-21Add DocFS layer to rustdocRobert Collins-0/+77
* Move fs::create_dir_all calls into DocFS to provide a clean extension point if async extension there is needed. * Convert callsites of create_dir_all to ensure_dir to reduce syscalls. * Convert fs::write usage to DocFS.write (which also removes a lot of try_err! usage for easier reading) * Convert File::create calls to use Vec buffers and then DocFS.write in order to consistently reduce syscalls as well, make deferring to threads cleaner and avoid leaving dangling content if writing to existing files.... * Convert OpenOptions usage similarly - I could find no discussion on the use of create_new for that one output file vs all the other files render creates, if link redirection attacks are a concern DocFS will provide a good central point to introduce systematic create_new usage. (fs::write/File::create is vulnerable to link redirection attacks). * DocFS::write defers to rayon for IO on Windows producing a modest speedup: before this patch on my development workstation: $ time cargo +mystg1 doc -p winapi:0.3.7 Documenting winapi v0.3.7 Finished dev [unoptimized + debuginfo] target(s) in 6m 11s real 6m11.734s Afterwards: $ time cargo +mystg1 doc -p winapi:0.3.7 Compiling winapi v0.3.7 Documenting winapi v0.3.7 Finished dev [unoptimized + debuginfo] target(s) in 49.53s real 0m49.643s I haven't measured how much time is in the compilation logic vs in the IO and outputting etc, but this takes it from frustating to tolerable for me, at least for now.