Closed
Conversation
Follow-up to rust-lang#117925
This also keeps the old `advance` method under `advance_unchecked` name. This makes pattern like `std::io::default_read_buf` safe to write.
…ers and Rust plans to set Windows 10 as the minimum supported OS for target x86_64-pc-windows-msvc, I have added the cmpxchg16b and sse3 feature (as CPUs that meet the Windows 10 64-bit requirement also support SSE3. See https://walbourn.github.io/directxmath-sse3-and-ssse3/ )
Fixed a bug where adding CMPXCHG16B would fail due to different names in Rustc and LLVM
As CMPXCHG16B is supported, I updated the max atomic width to 128-bits from 64-bits
Updated x86_64-uwp-windows-gnu to use CMPXCHG16B and SSE3
but right now all of them have zero const generic params
Turn `is_val_statically_known` into such an intrinsic to demonstrate. It is perfectly safe to call after all.
Help with common API confusion, like asking for `push` when the data structure really has `append`.
```
error[E0599]: no method named `size` found for struct `Vec<{integer}>` in the current scope
--> $DIR/rustc_confusables_std_cases.rs:17:7
|
LL | x.size();
| ^^^^
|
help: you might have meant to use `len`
|
LL | x.len();
| ~~~
help: there is a method with a similar name
|
LL | x.resize();
| ~~~~~~
```
rust-lang#59450
```
error[E0308]: mismatched types
--> $DIR/rustc_confusables_std_cases.rs:20:14
|
LL | x.append(42);
| ------ ^^ expected `&mut Vec<{integer}>`, found integer
| |
| arguments to this method are incorrect
|
= note: expected mutable reference `&mut Vec<{integer}>`
found type `{integer}`
note: method defined here
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
help: you might have meant to use `push`
|
LL | x.push(42);
| ~~~~
```
Do not provide a structured suggestion when the arguments don't match.
```
error[E0599]: no method named `test_mut` found for struct `Vec<{integer}>` in the current scope
--> $DIR/auto-ref-slice-plus-ref.rs:7:7
|
LL | a.test_mut();
| ^^^^^^^^
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `MyIter` defines an item `test_mut`, perhaps you need to implement it
--> $DIR/auto-ref-slice-plus-ref.rs:14:1
|
LL | trait MyIter {
| ^^^^^^^^^^^^
help: there is a method `get_mut` with a similar name, but with different arguments
--> $SRC_DIR/core/src/slice/mod.rs:LL:COL
```
Consider methods beyond inherent ones when suggesting typos.
```
error[E0599]: no method named `owned` found for reference `&dyn Foo` in the current scope
--> $DIR/object-pointer-types.rs:11:7
|
LL | fn owned(self: Box<Self>);
| --------- the method might not be found because of this arbitrary self type
...
LL | x.owned();
| ^^^^^ help: there is a method with a similar name: `to_owned`
```
Fix rust-lang#101013.
…, r=oli-obk Make `async Fn` trait kind errors better 1. Make it so that async closures with the wrong closurekind actually report a useful error 2. Explain why async closures can sometimes not implement `Fn`/`FnMut` (because they capture things) r? oli-obk
… r=nnethercote Fix closure kind docs I didn't review this close enough lol -- the old code snippet didn't use substs correctly, and had a malformed `if let`
…target-features, r=Amanieu Update aarch64 target feature docs to match LLVM rust-lang/stdarch#1432 rust-lang/stdarch#1527 r? ``@Amanieu``
…rms, r=estebank Only point out non-diverging arms for match suggestions Fixes rust-lang#121144 There is no reason to point at diverging arms, which will always coerce to whatever is the match block's evaluated type. This also removes the suggestion from rust-lang#106601, since as I pointed out in rust-lang#72634 (comment) the added suggestion is not firing in the right cases, but instead only when one of the match arms already *actually* evaluates to `()`. r? estebank
…errors Avoid debug logging entire MIR body If there is a need to examine the MIR body there is -Zmir-dump.
…lstrieb doc: add note about panicking examples for strict_overflow_ops The first commit adds a note before the panicking examples for strict_overflow_ops to make it clearer that the following examples should panic and why, without needing the reader to hover the mouse over the information icon. The second commit adds panicking examples for division by zero operations for strict division operations on unsigned numbers. The signed numbers already have two panicking examples each: one for division by zero and one for overflowing division (`MIN/-1`); this commit includes the division by zero examples for the unsigned numbers.
Contributor
Author
|
@bors r+ p=4 rollup=never |
Collaborator
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Member
|
@bors r- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
VecDeque::drainfor (half-)open ranges #118264 (OptimizeVecDeque::drainfor (half-)open ranges)NonZerointernally. #120486 (Use genericNonZerointernally.)NonZero::getgeneric. #120563 (MakeNonZero::getgeneric.)rustc_confusablesannotations #120730 (Provide suggestions throughrustc_confusablesannotations)io::BorrowedCursor::advancesafe #120741 (Makeio::BorrowedCursor::advancesafe)static_mut_ref#121034 (Improve wording ofstatic_mut_ref)async Fntrait kind errors better #121119 (Makeasync Fntrait kind errors better)Failed merges:
debug_assertionsintrinsic #121112 (Inline cfg(bootstrap) version ofdebug_assertionsintrinsic)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup