| Age | Commit message (Collapse) | Author | Lines |
|
Remove chunk size from each chunk in `ChunkedBitSet`.
Almost all chunks in a `ChunkedBitSet` have the same constant `CHUNK_SIZE`, except the last in a bitset which takes the remainder `domain_size % CHUNK_SIZE`.
r? `@ghost` for perf
|
|
Make sure to treat only param where clauses as inherent
See the description in the test file.
This PR fixes a bug introduced by rust-lang/rust#141333, where we considered non-`Param` where clauses to be "inherent" for the purpose of method probing, which leads to both changes in method ambiguity (see test) and also import usage linting (and thus fixes https://github.com/rust-lang/rust/issues/145185).
r? `@lcnr`
|
|
resolves https://github.com/rust-lang/rust-clippy/issues/8943
changelog: [`unnecessary_mut_passed`]: add structured suggestion
|
|
`missing_transmute_annotations` will suggest naming the origin and
destination types if they do not have explicit names already.
changelog: [`missing_transmute_annotations`]: suggest giving origin and
destination types a name in order to ascribe the `transmute` call
Fixes rust-lang/rust-clippy#14984
|
|
|
|
|
|
`TokenKind` now impls `Copy`, so we can store it directly rather than a
reference.
|
|
The `bitflags!` macro in the latest release has slightly streamlined
codegen. See https://github.com/bitflags/bitflags/pull/458 for details.
|
|
|
|
|
|
Add support for macro expansion in rustdoc source code pages
This is what it looks like:


You can test it [here](https://rustdoc.crud.net/imperio/macro-expansion/src/lib/lib.rs.html). In this case, I also enabled the `--generate-link-to-definition` to show that both options work well together.
Note: <del>There is a bug currently in firefox where the line numbers are not displayed correctly if they're inside the "macro expansion" span: https://bugzilla.mozilla.org/show_bug.cgi?id=1949948<del> Found a workaround around this bug.
r? `@notriddle`
|
|
`missing_transmute_annotations` will suggest naming the origin and
destination types if they do not have explicit names already.
Co-authored-by: Alejandra González <blyxyas@gmail.com>
|
|
Closes rust-lang/rust-clippy#15388
changelog: [`semicolon_inside_block`] fix FP when attribute over expr is
not enabled
|
|
|
|
r=GuillaumeGomez
rustdoc: render attributes in Field and Variants sections
Follow up to rust-lang/rust#145782.
Render attributes in Field and Variants sections.
Associated constants and methods are already rendered with attributes in their sections, so I figured out fields and variants should too.
(no change here)
<img width="378" height="265" alt="image" src="https://github.com/user-attachments/assets/b4f45c42-0146-486e-8881-138d2a7ad1c4" />
r? `@GuillaumeGomez`
---
Before (left) / after (right):
<img width="396" height="519" alt="image" src="https://github.com/user-attachments/assets/18288e13-09e7-448c-ba98-2023fa6df597" />
<img width="382" height="597" alt="image" src="https://github.com/user-attachments/assets/e624dc84-d169-41cc-bb89-7a1c2b2bb3e3" />
<img width="371" height="313" alt="image" src="https://github.com/user-attachments/assets/29833645-0b93-4900-80a8-c5a1e0b541b4" />
<img width="371" height="331" alt="image" src="https://github.com/user-attachments/assets/d5ce4b9e-f7f1-4f36-8ac0-08b0b5077e48" />
<img width="362" height="309" alt="image" src="https://github.com/user-attachments/assets/0436a51d-29a5-4403-a27c-7697524f807a" />
<img width="357" height="332" alt="image" src="https://github.com/user-attachments/assets/9a759fc5-30e7-4bbb-a88a-a3e3d1ed02aa" />
|
|
Previously it indicated a single version, regardless of their count.
Observed in: https://github.com/davidlattimore/wild/pull/1041
|
|
reading through the editorconfig spec, using `!` to negate
an entire glob is simply not a feature.
you can use `!` to negate a charachter class, but that's not
what was going on here.
|
|
Fix rust-analyzer-contributors reference
|
|
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
|
|
changelog: none
|
|
that's all it was doing
|
|
allows reusing numerous variables
|
|
|
|
This lint consists of two distinct cases: one for the `as` cast, and one
for `.cast()`. Splitting them in two separate functions allowed moving
the `as` one into the `if let ExprKind::Cast` branch of `casts/mod.rs`,
and reusing the variables created there
changelog: none
|
|
|
|
This avoids the need for `#![allow(non_upper_case_globals)]`.
|
|
|
|
Automatic Rustup
|
|
- Lint non-`impl` functions as well.
- Lint function calls in addition to method calls (such as
`Option::unwrap(…)`).
- Put the lint on the `unwrap` and `expect` node instead of the function
signature. This lets the user `#[allow]` specific `unwrap()` or
`expect()` calls.
- Do not lint inside closures, `const` and `static`.
- Do not mix warnings about `Option` and `Result`.
changelog: [`unwrap_in_result`]: issue lint on `.unwrap()` and
`.expect()` nodes instead of the function one
changelog: [`unwrap_in_result`]: also lint in functions outside
implementation blocks
changelog: [`unwrap_in_result`]: do not mix `Result` and `Option`
Fixes rust-lang/rust-clippy#15439
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
followup of https://github.com/rust-lang/rust/pull/141874
cc https://github.com/rust-lang/rust/issues/116909
changelog: check f16 and f128 in float_equality_without_abs
|
|
Suggest using `@bors try jobs=...`
|
|
|
|
As opposed to passing it around through Result.
|
|
Add more tests for the parallel rustc
At the moment, the parallel frontend test cases are severely lacking. Althought some reported issues have been resolved, they haven't been added into the tests.
This PR arranges the resolved ICE issues and adds tests for them.
Whether it is worthwhile to add a separate test suite for the paralel frontend still requires futher discussion. But we are trying coveraging issues being resolved through capability of the existing UI test suite.
Discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Proposal.20for.20a.20dedicated.20test.20suite.20for.20t.E2.80.A6.20compiler-team.23906)
Related issues:
- rust-lang/rust#120760
- rust-lang/rust#124423 fixed by rust-lang/rust#140358
- rust-lang/rust#127971 fxied by rust-lang/rust#140358
- rust-lang/rust#120601 fixed by rust-lang/rust#127311
cc `@jieyouxu`
|
|
changelog: none
|
|
|
|
|
|
fixes 134088, though it is a shame to lose some of this wonderful detail.
|
|
Avoids needless bounds checks (which almost definitely get optimized
away, but still). And saves some characters
|
|
Their default branches are even the same, which means that one of the
`map_or`s could've been replaced with an `and_then`, but since we have
access to let-chains, why not use that
Additionally:
- use `with_source_text` to avoid constructing a `SourceText` object
- use `BytePos::from_usize` to avoid `allow`ing the lint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use trait item's HirId when emitting lint at `check_item` level
Fixes rust-lang/rust-clippy#15491
changelog: [`missing_inline_in_public_items`]: fix trait item lint
emission
|
|
Before this change, the suggestion for
`Option.or(Some(vec![])).unwrap()` expanded the `vec!` macro which broke
the code, both in terms of readability, and because the expansion
references `$crate` which cannot be inlined.
changelog: [`or_then_unwrap`]: Preserve macro calls rather than
expanding them
Relates to rust-lang/rust-clippy#6851
|
|
Signed-off-by: houpo-bob <houpocun@outlook.com>
|