| Age | Commit message (Collapse) | Author | Lines |
|
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
|
|
|
|
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)
|
|
loops on iterators. (clippy::while_let_on_iterator)
|
|
it. (clippy::redundant_static_lifetimes)
|
|
(clippy::redundant_pattern)
|
|
(clippy::option_as_ref_deref)
|
|
rustdoc: HTML escape crate version
As `--crate-version` accepts arbitrary strings they need to be escaped.
r? @GuillaumeGomez
|
|
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.
|
|
As `--crate-version` accepts arbitrary strings they need to be escaped.
|
|
|
|
use .iter() instead of .into_iter() on references
|
|
|
|
|
|
use is_empty() instead of len() == x to determine if structs are empty.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Struct variant field search
Fixes #16017.
Reopening of #64724.
cc @tomjakubowski
cc @ollie27
r? @kinnison
|
|
|
|
*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>
|
|
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
|
|
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
|
|
|
|
|
|
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
|
|
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
|
|
|
|
r=ollie27
Fix null synthetic_implementors error
Fixes #68584.
r? @ollie27
cc @kinnison
|
|
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
|
|
|
|
* 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.
|
|
|
|
Remove usage of global variable "inlined_types"
r? @pietroalbini
|
|
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
|
|
|
|
|
|
|
|
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
|
|
Prevent urls in headings
Fixes #68215.
cc @pietroalbini @ollie27
r? @kinnison
|
|
Fix deref impl typedef
Fixes #35295.
r? @kinnison
|
|
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
|
|
r=GuillaumeGomez
rustdoc: HTML escape codeblocks which fail syntax highlighting
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
|