-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 11 pull requests #120852
Rollup of 11 pull requests #120852
Conversation
Return with a question mark was triggered in situations where the `?` desuraging was performing error conversion via `Into`/`From`. The desugared `?` produces a match over an expression with type `std::ops::ControlFlow<B,C>` with `B:Result<Infallible, E:Error>` and `C:Result<_, E':Error>`, and the arms perform the conversion. The patch adds another check in the lint that checks that `E == E'`. If `E == E'`, then the `?` is indeed unnecessary. changelog: False Positive: `needless_return_with_question_mark` when implicit Error Conversion occurs.
… lint emit warning
There are cases where the closure call is needed in some macros, this in particular occurs when the closure has parameters. To handle this case, we allow the lint when there are no parameters in the closure, or the closure is outside a macro invocation. fixes: rust-lang#11274, rust-lang#1553 changelog: FP: [`redundant_closure_call`] when closures with parameters are passed in macros.
`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string` becomes `unescape_mixed`. Because rfc3349 will mean that C string literals will no longer be the only mixed utf8 literals.
Add lint configuration for `modulo_arithmetic` Collect meta-data
remove StructuralEq trait The documentation given for the trait is outdated: *all* function pointers implement `PartialEq` and `Eq` these days. So the `StructuralEq` trait doesn't really seem to have any reason to exist any more. One side-effect of this PR is that we allow matching on some consts that do not implement `Eq`. However, we already allowed matching on floats and consts containing floats, so this is not new, it is just allowed in more cases now. IMO it makes no sense at all to allow float matching but also sometimes require an `Eq` instance. If we want to require `Eq` we should adjust rust-lang#115893 to check for `Eq`, and rule out float matching for good. Fixes rust-lang#115881
Avoid linting redundant closure when callee is marked `#[track_caller]` Fixes rust-lang#12199 Not sure if there's a nicer way to detect functions marked `#[track_caller]` other than by just looking at its attributes 🤔 changelog: [`redundant_closure`]: [`redundant_closure_for_method_calls`]: avoid linting closures where the function being called is marked `#[track_caller]`
Co-authored-by: y21 <30553356+y21@users.noreply.github.com>
…lyxyas Warn if an item coming from more recent version than MSRV is used Part of rust-lang/rust-clippy#6324. ~~Currently, the lint is not working for the simple reason that the `stable` attribute is not kept in dependencies. I'll send a PR to rustc to see if they'd be okay with keeping it.~~ EDIT: There was actually a `lookup_stability` function providing this information, so all good now! cc `@epage` changelog: create new [`incompatible_msrv`] lint
…1-dead RFC 3349 precursors Some cleanups I found while working on RFC 3349 that are worth landing separately. r? `@fee1-dead`
…Manishearth Clippy subtree update r? `@Manishearth` Closes rust-lang/rust-clippy#12148
@bors r+ rollup=never p=11 yolo |
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#120351 (Implement SystemTime for UEFI) - rust-lang#120354 (improve normalization of `Pointee::Metadata`) - rust-lang#120776 (Move path implementations into `sys`) - rust-lang#120790 (better error message on download CI LLVM failure) - rust-lang#120806 (Clippy subtree update) - rust-lang#120815 (Improve `Option::inspect` docs) - rust-lang#120822 (Emit more specific diagnostics when enums fail to cast with `as`) - rust-lang#120827 (Print image input file and checksum in CI only) - rust-lang#120836 (hide impls if trait bound is proven from env) - rust-lang#120844 (Build DebugInfo for async closures) - rust-lang#120851 (Remove duplicate release note) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry cranelift linkage error |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: f4cfd87202 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (d44e3b9): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 666.771s -> 666.679s (-0.01%) |
Successful merges:
Pointee::Metadata
#120354 (improve normalization ofPointee::Metadata
)sys
#120776 (Move path implementations intosys
)Option::inspect
docs #120815 (ImproveOption::inspect
docs)as
#120822 (Emit more specific diagnostics when enums fail to cast withas
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup