| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
`None` is the fallback case anyway
|
|
avoids bounds checks
|
|
|
|
|
|
clippy-subtree-update
|
|
clippy-subtree-update
|
|
Letting rustbot assign a reviewer, so that someone can double check
9de86f40d7e1a2cbcc308e39fdbc7447d691c527.
changelog: none
|
|
|
|
|
|
|
|
|
|
|
|
Revise the extra `r: 'static` constraints added upon universe issues
to add an explanation, and use that explanation during constraint blame
search. This greatly simplifies the region inference logic, which
now does not need to reverse-engineer the event that caused a region
to outlive 'static.
|
|
Rewrite the new attribute argument parser
Fixes https://github.com/rust-lang/rust/issues/143940
This rewrites the parser, should improve performance and maintainability.
This can be reviewed commit by commit
|
|
|
|
directly
|
|
This variant doesn't appear to have ever been used.
There's a matching message in `rustc_resolve`, that used to have a FIXME
for porting it to the new diagnostic infrastructure, but that message is
using `feature_err`, which doesn't use buffered lints. Thus, even when
that does get ported, it won't use `BuiltinLintDiag`.
|
|
`convert_integer_literal` can only convert the first literal,
it is not reasonable to apply it when selected
Example
---
```rust
fn main() {
$01+1$0;
}
```
**Assist old outputs**:
```
Convert 1 to 0b1
Convert 1 to 0o1
Convert 1 to 0x1
Replace arithmetic with call to checked_*
Replace arithmetic with call to saturating_*
Replace arithmetic with call to wrapping_*
Extract into variable
Extract into constant
Extract into static
Extract into function
```
**Assist this PR outputs**:
```
Replace arithmetic with call to checked_*
Replace arithmetic with call to saturating_*
Replace arithmetic with call to wrapping_*
Extract into variable
Extract into constant
Extract into static
Extract into function
```
|
|
|
|
|
|
Lint buffering currently relies on a giant enum `BuiltinLintDiag`
containing all the lints that might potentially get buffered. In
addition to being an unwieldy enum in a central crate, this also makes
`rustc_lint_defs` a build bottleneck: it depends on various types from
various crates (with a steady pressure to add more), and many crates
depend on it.
Having all of these variants in a separate crate also prevents detecting
when a variant becomes unused, which we can do with a dedicated type
defined and used in the same crate.
Refactor this to use a dyn trait, to allow using `LintDiagnostic` types
directly.
This requires boxing, but all of this is already on the slow path
(emitting an error).
Because the existing `BuiltinLintDiag` requires some additional types in
order to decorate some variants, which are only available later in
`rustc_lint`, use an enum `DecorateDiagCompat` to handle both the `dyn
LintDiagnostic` case and the `BuiltinLintDiag` case.
|
|
add some ZST reborrow tests
|
|
Closes rust-lang/rust-clippy#14553
Closes rust-lang/rust-clippy#14554
changelog: [`unnecessary_safety_comment`] fix FN for the first line in
file
|
|
|
|
|
|
Fix panic in syntax_highlighting
|
|
|
|
Sort mono items by symbol name
Trying to claw back cycles/branch/cache miss losses from https://github.com/rust-lang/rust/pull/144722.
|
|
|
|
|
|
|
|
Automatic Rustup
|
|
remove redundant word in comment
changelog: none
|
|
Signed-off-by: xihuwenhua <xihuwenhua@outlook.com>
|
|
|
|
Signed-off-by: xihuwenhua <xihuwenhua@outlook.com>
|
|
|
|
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 8e3710ef31a0b2cdf5a1c2f3929b7735d1e28c20
Filtered ref: 3629e47f19f1c1c9710f45b80a31eb32d851baf6
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
|
|
|
|
This updates the rust-version file to 8e3710ef31a0b2cdf5a1c2f3929b7735d1e28c20.
|
|
rustc_expand: ensure stack in `InvocationCollector::visit_expr`
In Fedora, when we built rustc with PGO on ppc64le, we started failing
the test `issue-74564-if-expr-stack-overflow.rs`. This could also be
reproduced on other arches by setting a smaller `RUST_MIN_STACK`, so
it's probably just unlucky that ppc64le PGO created a large stack frame
somewhere in this recursion path. Adding an `ensure_sufficient_stack`
solves the stack overflow.
Historically, that test and its fix were added in rust-lang/rust#74708,
which was also an `ensure_sufficient_stack` in this area of code at the
time. However, the refactor in rust-lang/rust#92573 basically left that
to the general `MutVisitor`, and then rust-lang/rust#142240 removed even
that ensure call. It may be luck that our tier-1 tested targets did not
regress the original issue across those refactors.
|
|
Input:
```rust
fn main() {
match 92 {
x $0if true
&& true
&& true =>
{
{
false
}
},
_ => true
}
}
```
Old output:
```rust
fn main() {
match 92 {
x =>
if true
&& true
&& true {
{
{
false
}
}
},
_ => true
};
}
```
This PR fixed:
```rust
fn main() {
match 92 {
x => if true
&& true
&& true {
{
{
false
}
}
},
_ => true
}
}
```
|
|
|
|
|
|
|