summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2020-03-10Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnisonMazdak Farrokhzad-280/+7
Remove spotlight I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it. r? @kinnison cc @ollie27
2020-03-06fix various typosMatthias Krüger-2/+2
2020-03-05Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPCDylan DPC-14/+10
even more clippy cleanups * Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed) * Use more efficient &&str to String conversion (clippy::inefficient_to_string) * Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call) * Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg) * Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator) * Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes) * Remove redundant patterns when matching ( x @ _ to x) (clippy::redundant_pattern)
2020-03-05Use simple 'for i in x' loops instead of 'while let Some(x) = x.next()' ↵Matthias Krüger-6/+2
loops on iterators. (clippy::while_let_on_iterator)
2020-03-05Const items have by default a static lifetime, there's no need to annotate ↵Matthias Krüger-6/+6
it. (clippy::redundant_static_lifetimes)
2020-03-05Remove redundant patterns when matching ( x @ _ to x) ↵Matthias Krüger-2/+2
(clippy::redundant_pattern)
2020-03-04Use .as_deref() instead of .as_ref().map(Deref::deref) ↵Matthias Krüger-2/+2
(clippy::option_as_ref_deref)
2020-03-01Rollup merge of #69598 - ollie27:rustdoc_crate-version_escape, r=GuillaumeGomezDylan DPC-2/+3
rustdoc: HTML escape crate version As `--crate-version` accepts arbitrary strings they need to be escaped. r? @GuillaumeGomez
2020-03-01Auto merge of #69592 - petrochenkov:nosyntax, r=Centrilbors-3/+3
Rename `libsyntax` to `librustc_ast` This was the last rustc crate that wasn't following the `rustc_*` naming convention. Follow-up to https://github.com/rust-lang/rust/pull/67763.
2020-03-01rustdoc: HTML escape crate versionOliver Middleton-2/+3
As `--crate-version` accepts arbitrary strings they need to be escaped.
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-2/+2
2020-02-29Rollup merge of #69572 - matthiaskrgr:try_err_and_iter_on_ref, r=CentrilDylan DPC-3/+3
use .iter() instead of .into_iter() on references
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29use .iter() instead of .into_iter() on references.Matthias Krüger-3/+3
2020-02-29Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-SimulacrumDylan DPC-3/+3
use is_empty() instead of len() == x to determine if structs are empty.
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-3/+3
2020-02-27use char instead of &str for single char patternsMatthias Krüger-4/+4
2020-02-27Remove "important traits" featureGuillaume Gomez-280/+7
2020-02-24don't explicitly compare against true or falseMatthias Krüger-3/+3
2020-02-22Rename CodeMap to SourceMap follow upMaxim Zholobak-2/+2
2020-02-17Rename `FunctionRetTy` to `FnRetTy`Yuki Okushi-1/+1
2020-02-15Auto merge of #68668 - GuillaumeGomez:struct-variant-field-search, r=ollie27bors-24/+33
Struct variant field search Fixes #16017. Reopening of #64724. cc @tomjakubowski cc @ollie27 r? @kinnison
2020-02-14Update pulldown-cmark dependencyGuillaume Gomez-75/+95
2020-02-11[ImgBot] Optimize imagesImgBotApp-3/+3
*Total -- 10.65kb -> 8.44kb (20.82%) /src/etc/installer/gfx/rust-logo.png -- 5.71kb -> 3.82kb (33.11%) /src/librustdoc/html/static/down-arrow.svg -- 0.63kb -> 0.50kb (20.44%) /src/librustdoc/html/static/wheel.svg -- 3.86kb -> 3.68kb (4.66%) /src/librustdoc/html/static/brush.svg -- 0.47kb -> 0.44kb (4.61%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-02-04Rollup merge of #68818 - matthiaskrgr:misc_perf, r=Mark-SimulacrumDylan DPC-8/+1
fix couple of perf related clippy warnings librustc: don't clone a type that is copy librustc_incremental: use faster vector initialization librustc_typeck: don't clone a type that is copy librustdoc: don't create a vector where a slice will do
2020-02-04fix couple of perf related clipyp warningsMatthias Krüger-8/+1
librustc: don't clone a type that is copy librustc_incremental: use faster vector initialization librustc_typeck: don't clone a type that is copy librustdoc: don't create a vector where a slice will do
2020-02-04remove redundant imports (clippy::single_component_path_imports)Matthias Krüger-2/+0
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-1/+1
2020-02-011. move node_id to syntaxMazdak Farrokhzad-1/+1
2. invert rustc_session & syntax deps 3. drop rustc_session dep in rustc_hir
2020-01-30rustdoc: emit JS paths for struct-like variantsTom Jakubowski-8/+22
On the backend, rustdoc now emits `paths` entries to a crate's search index for struct-like enum variants, and index items of type structfield which belong to such variants point to their variant parents in the `paths` table, rather than their enum grandparents. The path entry for a variant is the fully qualified module path plus the enum name. On the frontend, the search code recognizes structfields belonging to structlike variants in the `paths` table and re-constructs the URL to the field's anchor on the enum documentation page. closes #16017
2020-01-30rustdoc: NodeId is now DefIdTom Jakubowski-16/+11
2020-01-29Rollup merge of #68598 - GuillaumeGomez:fix-null-synthetic_implementors, ↵Yuki Okushi-14/+16
r=ollie27 Fix null synthetic_implementors error Fixes #68584. r? @ollie27 cc @kinnison
2020-01-29Rollup merge of #68556 - ollie27:rustdoc_primitive_re-export, r=GuillaumeGomezYuki Okushi-5/+8
rustdoc: Fix re-exporting primitive types * Generate links to the primitive type docs for re-exports. * Don't ICE on cross crate primitive type re-exports. * Make primitive type re-exports show up cross crate. Fixes #67646 Closes #67972 r? @GuillaumeGomez
2020-01-28Fix null synthetic_implementors errorGuillaume Gomez-14/+16
2020-01-26rustdoc: Fix re-exporting primitive typesOliver Middleton-5/+8
* Generate links to the primitive type docs for re-exports. * Don't ICE on cross crate primitive type re-exports. * Make primitive type re-exports show up cross crate.
2020-01-26Fix run button positionning in case of scrollingGuillaume Gomez-8/+7
2020-01-22Auto merge of #68192 - GuillaumeGomez:remove-inlined-types, r=kinnisonbors-25/+50
Remove usage of global variable "inlined_types" r? @pietroalbini
2020-01-21Rollup merge of #68140 - ecstatic-morse:const-trait-bound-opt-out, r=oli-obkMazdak Farrokhzad-0/+1
Implement `?const` opt-out for trait bounds For now, such bounds are treated exactly the same as unprefixed ones in all contexts. [RFC 2632](https://github.com/rust-lang/rfcs/pull/2632) does not specify whether such bounds are forbidden outside of `const` contexts, so they are allowed at the moment. Prior to this PR, the constness of a trait bound/impl was stored in `TraitRef`. Now, the constness of an `impl` is stored in `ast::ItemKind::Impl` and the constness of a bound in `ast::TraitBoundModifer`. Additionally, constness of trait bounds is now stored in an additional field of `ty::Predicate::Trait`, and the combination of the constness of the item along with any `TraitBoundModifier` determines the constness of the bound in accordance with the RFC. Encoding the constness of impls at the `ty` level is left for a later PR. After a discussion in \#wg-grammar on Discord, it was decided that the grammar should not encode the mutual exclusivity of trait bound modifiers. The grammar for trait bound modifiers remains `[?const] [?]`. To encode this, I add a dummy variant to `ast::TraitBoundModifier` that is used when the syntax `?const ?` appears. This variant causes an error in AST validation and disappears during HIR lowering. cc #67794 r? @oli-obk
2020-01-20rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`sOliver Middleton-5/+5
2020-01-20Remove usage of global variable "inlined_types"Guillaume Gomez-25/+50
2020-01-20Add `MaybeConst` variant to `{ast,hir}::TraitBoundModifier`Dylan MacKenzie-0/+1
2020-01-20Rollup merge of #68326 - ollie27:rustdoc_hightlight_fatal_errors, ↵Dylan DPC-2/+3
r=GuillaumeGomez rustdoc: Catch fatal errors when syntax highlighting For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`. Fixes #56885 r? @GuillaumeGomez
2020-01-18Rollup merge of #68224 - GuillaumeGomez:prevent-urls-in-headings, r=ollie27Mazdak Farrokhzad-2/+5
Prevent urls in headings Fixes #68215. cc @pietroalbini @ollie27 r? @kinnison
2020-01-17Rollup merge of #68093 - GuillaumeGomez:fix-deref-impl-typedef, r=oli-obkTyler Mandry-14/+20
Fix deref impl typedef Fixes #35295. r? @kinnison
2020-01-17rustdoc: Catch fatal errors when syntax highlightingOliver Middleton-2/+3
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
2020-01-16Rollup merge of #68263 - ollie27:rustdoc_invalid_syntax_highlight_escape, ↵Dylan DPC-1/+1
r=GuillaumeGomez rustdoc: HTML escape codeblocks which fail syntax highlighting r? @GuillaumeGomez
2020-01-16Don't keep link title either, text is generated outside of the link tagGuillaume Gomez-2/+1
2020-01-15rustdoc: HTML escape codeblocks which fail syntax highlightingOliver Middleton-1/+1
2020-01-15Fix rendering on sidebar and update testsGuillaume Gomez-4/+4
2020-01-15Simplify deref impls for type aliasesGuillaume Gomez-37/+26