| Age | Commit message (Collapse) | Author | Lines |
|
Rollup of 4 pull requests
Successful merges:
- #126588 (Added more scenarios where comma to be removed in the function arg)
- #131728 (bootstrap: extract builder cargo to its own module)
- #131968 (Rip out old effects var handling code from traits)
- #131981 (Remove the `BoundConstness::NotConst` variant)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
|
|
|
|
Before this change, adding a lint was a difficult matter
because it always had some overhead involved. This was
because all lints would run, no matter their default level,
or if the user had #![allow]ed them. This PR changes that
|
|
|
|
clippy-subtree-update
|
|
|
|
ismailarilik:handle-potential-query-instability-lint-for-clippy, r=xFrednet
Handle `clippy` cases of `rustc::potential_query_instability` lint
This PR removes `#![allow(rustc::potential_query_instability)]` line from [`src/tools/clippy/clippy_lints/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/src/tools/clippy/clippy_lints/src/lib.rs#L30) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.
A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
|
|
Don't warn on proc macro generated code in `needless_return`
Fixes #13458
Fixes #13457
Fixes #13467
Fixes #13479
Fixes #13481
Fixes #13526
Fixes #13486
The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`.
The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context.
"Hide whitespace" helps a bit for reviewing the proc macro detection change
changelog: none
|
|
|
|
Make opaque types regular HIR nodes
Having opaque types as HIR owner introduces all sorts of complications. This PR proposes to make them regular HIR nodes instead.
I haven't gone through all the test changes yet, so there may be a few surprises.
Many thanks to `@camelid` for the first draft.
Fixes https://github.com/rust-lang/rust/issues/129023
Fixes #129099
Fixes #125843
Fixes #119716
Fixes #121422
|
|
|
|
|
|
Stabilize the `map`/`value` methods on `ControlFlow`
And fix the stability attribute on the `pub use` in `core::ops`.
libs-api in https://github.com/rust-lang/rust/issues/75744#issuecomment-2231214910 seemed reasonably happy with naming for these, so let's try for an FCP.
Summary:
```rust
impl<B, C> ControlFlow<B, C> {
pub fn break_value(self) -> Option<B>;
pub fn map_break<T>(self, f: impl FnOnce(B) -> T) -> ControlFlow<T, C>;
pub fn continue_value(self) -> Option<C>;
pub fn map_continue<T>(self, f: impl FnOnce(C) -> T) -> ControlFlow<B, T>;
}
```
Resolves #75744
``@rustbot`` label +needs-fcp +t-libs-api -t-libs
---
Aside, in case it keeps someone else from going down the same dead end: I looked at the `{break,continue}_value` methods and tried to make them `const` as part of this, but that's disallowed because of not having `const Drop`, so put it back to not even unstably-const.
|
|
Refactoring to `OpaqueTyOrigin`
Pulled out of a larger PR that uses these changes to do cross-crate encoding of opaque origin, so we can use them for edition 2024 migrations. These changes should be self-explanatory on their own, tho 😄
|
|
clippy-subtree-update
|
|
|
|
|
|
|
|
Clippy subtree update
r? `@Manishearth`
Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier.
It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump.
Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
|
|
|
|
clippy-subtree-update
|
|
|
|
|
|
|
|
path
|
|
instead of path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
items instead of paths
|
|
|
|
|
|
of paths
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts the part of commit 19908ff7a37a9a431399bb6f2868efc22820f2b6 in
subdirectory src/tools/clippy/clippy_lints.
|
|
stabilize const_float_bits_conv
This stabilizes `const_float_bits_conv`, and thus fixes https://github.com/rust-lang/rust/issues/72447. With https://github.com/rust-lang/rust/pull/128596 having landed, this is entirely a libs-only question now.
```rust
impl f32 {
pub const fn to_bits(self) -> u32;
pub const fn from_bits(v: u32) -> Self;
pub const fn to_be_bytes(self) -> [u8; 4];
pub const fn to_le_bytes(self) -> [u8; 4]
pub const fn to_ne_bytes(self) -> [u8; 4];
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self;
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self;
pub const fn from_ne_bytes(bytes: [u8; 4]) -> Self;
}
impl f64 {
pub const fn to_bits(self) -> u64;
pub const fn from_bits(v: u64) -> Self;
pub const fn to_be_bytes(self) -> [u8; 8];
pub const fn to_le_bytes(self) -> [u8; 8]
pub const fn to_ne_bytes(self) -> [u8; 8];
pub const fn from_be_bytes(bytes: [u8; 8]) -> Self;
pub const fn from_le_bytes(bytes: [u8; 8]) -> Self;
pub const fn from_ne_bytes(bytes: [u8; 8]) -> Self;
}
````
Cc `@rust-lang/wg-const-eval` `@rust-lang/libs-api`
|