-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #122854
Rollup of 11 pull requests #122854
Conversation
Suggested by @xFrednet and @matthiaskrgr.
Have the lint trigger even if `Self` has generic lifetime parameters. ```rs impl<'a> Foo<'a> { type Item = Foo<'a>; // Can be replaced with Self fn new() -> Self { Foo { // No lifetime, but they are inferred to be that of Self // Can be replaced as well ... } } // Don't replace `Foo<'b>`, the lifetime is different! fn eq<'b>(self, other: Foo<'b>) -> bool { .. } ``` Fixes rust-lang#12381
Add asm goto support to `asm!` Tracking issue: rust-lang#119364 This PR implements asm-goto support, using the syntax described in "future possibilities" section of [RFC2873](https://rust-lang.github.io/rfcs/2873-inline-asm.html#asm-goto). Currently I have only implemented the `label` part, not the `fallthrough` part (i.e. fallthrough is implicit). This doesn't reduce the expressive though, since you can use label-break to get arbitrary control flow or simply set a value and rely on jump threading optimisation to get the desired control flow. I can add that later if deemed necessary. r? ``@Amanieu`` cc ``@ojeda``
fix [`missing_docs_in_private_items`] on some proc macros fixes: rust-lang#12197 --- changelog: [`missing_docs_in_private_items`] support manually search for docs as fallback method
…enkov Refactor pre-getopts command line argument handling Rebased version of rust-lang#111658. I've also fixed the Windows CI failure (although I don't have access to Windows to test it myself).
Lint singleton gaps after exclusive ranges In the discussion to stabilize exclusive range patterns (rust-lang#37854), it has often come up that they're likely to cause off-by-one mistakes. We already have the `overlapping_range_endpoints` lint, so I [proposed](rust-lang#37854 (comment)) a lint to catch the complementary mistake. This PR adds a new `non_contiguous_range_endpoints` lint that catches likely off-by-one errors with exclusive range patterns. Here's the idea (see the test file for more examples): ```rust match x { 0..10 => ..., // WARN: this range doesn't match `10_u8` because `..` is an exclusive range 11..20 => ..., // this could appear to continue range `0_u8..10_u8`, but `10_u8` isn't matched by either of them _ => ..., } // help: use an inclusive range instead: `0_u8..=10_u8` ``` More precisely: for any exclusive range `lo..hi`, if `hi+1` is matched by another range but `hi` isn't, we suggest writing an inclusive range `lo..=hi` instead. We also catch `lo..T::MAX`.
New lint `const_is_empty` This lint detects calls to `.is_empty()` on an entity initialized from a string literal and flag them as suspicious. To avoid triggering on macros called from generated code, it checks that the `.is_empty()` receiver, the call itself and the initialization come from the same context. Fixes rust-lang#12307 changelog: [`const_is_empty`]: new lint
… `duplicated_attributes`
…iter, r=compiler-errors Implement `FusedIterator` for `gen` block cc rust-lang#117078
… r=clubby789 make failure logs less verbose Resolves rust-lang#122706 Logs without verbose flag: ![image](https://github.com/rust-lang/rust/assets/39852038/f2fc2d35-0954-44b0-bedc-045afedaabe8) Logs with verbose flag: ![image](https://github.com/rust-lang/rust/assets/39852038/b9308655-ad31-4527-a1be-5a62a78ac469) I decided to exclude command from the log since it's already included in verbose mode. cc ```@Nilstrieb```
…enkov add test for rust-lang#122549 Fixes rust-lang#122549
…ings-to-prevent-incremental-protests, r=matthiaskrgr Avoid noop rewrite of issues.txt Fixes rust-lang#122834 r? ```@matthiaskrgr```
add 2 more tests for issues fixed by rust-lang#122749 Fixes rust-lang#121807 Fixes rust-lang#122098
…r, r=compiler-errors Add a never type option to make diverging blocks `()` More experiments for ~~the blood god~~ T-lang! Usage example: ```rust #![allow(internal_features)] #![feature(never_type, rustc_attrs)] #![rustc_never_type_options(diverging_block_default = "unit")] fn main() { let _: u8 = { //~ error: expected `u8`, found `()` return; }; } ``` r? compiler-errors I'm not sure how I feel about parsing the attribute every time we create `FnCtxt`. There must be a better way to do this, right?
…m, r=compiler-errors add test for ice "cannot relate region: LUB(ReErased, ReError)" Fixes rust-lang#109178
…matthiaskrgr Clippy subtree update r? ``@Manishearth``
@bors r+ rollup=never p=11 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 0ad927c0c0 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (b57a10c): 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: 668.681s -> 671.782s (0.46%) |
Successful merges:
IntoIter
Iterate in Sorted by key Order #122817 (Doc Guarantee: BTree(Set|Map):IntoIter
Iterate in Sorted by key Order)FusedIterator
forgen
block #122829 (ImplementFusedIterator
forgen
block)unexpected inference var
#122549)type_flags(ReError) & HAS_ERROR
#122749)()
#122843 (Add a never type option to make diverging blocks()
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup