about summary refs log tree commit diff
path: root/src/librustdoc/html/sources.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27Move `Error` and `RenderInfo` out of `html` moduleJoseph Ryan-1/+2
2020-07-14rustdoc: glue tokens before highlightingAndy Russell-5/+6
Fixes #72684. This commit also modifies the signature of `Classifier::new` to avoid copying the source being highlighted.
2020-07-12Clean up handling of style files in rustdocJarek Samic-1/+1
Disable all themes other than `light.css` to prevent rule conflicts
2020-06-09Fix more clippy warningsMatthias Krüger-1/+1
Fixes more of: clippy::unused_unit clippy::op_ref clippy::useless_format clippy::needless_return clippy::useless_conversion clippy::bind_instead_of_map clippy::into_iter_on_ref clippy::redundant_clone clippy::nonminimal_bool clippy::redundant_closure clippy::option_as_ref_deref clippy::len_zero clippy::iter_cloned_collect clippy::filter_next
2020-05-29Split payload of FileName::Real to track both real and virutalized paths.Felix S. Klock II-2/+2
Such splits arise from metadata refs into libstd. This way, we can (in a follow on commit) continue to emit the virtual name into things like the like the StableSourceFileId that ends up in incremetnal build artifacts, while still using the devirtualized file path when we want to access the file. Note that this commit is intended to be a refactoring; the actual fix to the bug in question is in a follow-on commit.
2020-04-08rustdoc: Don't try to load source files from external cratesOliver Middleton-2/+3
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-03-10Store `TokenStream` in `rmeta::MacroDef`.Mazdak Farrokhzad-1/+1
This removes a hack from `load_macro_untracked` in which parsing is used.
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-29/+30
2019-09-07Move Source to BufferMark Rousskov-14/+7
2019-09-07layout::render takes Print instead of fmt::DisplayMark Rousskov-1/+2
2019-09-07De-indent all fmt::Display impls for later replacement to functionsMark Rousskov-17/+17
2019-09-07Implement Print for FnOnce(&mut Buffer)Mark Rousskov-1/+1
This means that callers can pass in a closure like `|buf| some_function(..., &mut buf)` and pass in arbitrary arguments to that function without complicating the trait definition. We also keep the impl for str and String, since it's useful to be able to just pass in "" or format!("{}"...) results in some cases. This changes Print's definition to take self, instead of &self, because otherwise FnOnce cannot be called directly. We could instead take FnMut or even Fn, but that seems like it'd merely complicate matters -- most of the time, the FnOnce does not constrain us at all anyway. If it does, a custom Print impl for &'_ SomeStruct is not all that painful.
2019-09-07Move constant parameters to render to Layout structMark Rousskov-3/+1
2019-09-07Create buffers in top-level renderingMark Rousskov-4/+2
This avoids needlessly creating and threading the buffers through when we only use them once.
2019-09-07Migrate top-level rendering to BufferMark Rousskov-6/+4
2019-08-26Move source HTML generation to own moduleMark Rousskov-0/+187