Rollup of 7 pull requests#97561
Closed
compiler-errors wants to merge 23 commits intorust-lang:masterfrom
Closed
Conversation
Made the fields of VecDeque's Iter private by creating a Iter::new(...) function to create a new instance of Iter and migrating usage to use Iter::new(...).
- `from_ptr_range` uses `#![feature(slice_from_ptr_range_const)]` - `from_mut_ptr_range` uses `#![feature(slice_from_mut_ptr_range_const)]`
At first I was confused why `std::slice::from_ptr_range` didn't work :D
This is in line with other `const fn` features.
To render the message of a Fluent attribute, the identifier of the Fluent message must be known. `DiagnosticMessage::FluentIdentifier` contains both the message's identifier and optionally the identifier of an attribute. Generated constants for each attribute would therefore need to be named uniquely (amongst all error messages) or be able to refer to only the attribute identifier which will be combined with a message identifier later. In this commit, the latter strategy is implemented as part of the `Diagnostic` type's functions for adding subdiagnostics of various kinds. Signed-off-by: David Wood <david.wood@huawei.com>
…han a line number
…e, r=oli-obk refactor: VecDeques Iter fields to private Made the fields of VecDeque's Iter private by creating a Iter::new(...) function to create a new instance of Iter and migrating usage to use Iter::new(...).
…r-errors
Optimize the diagnostic generation for `extern unsafe`
This PR does the following about diagnostic generation when parsing foreign mod:
1. Fixes the FIXME about avoiding depending on the error message text.
2. Continue parsing when `unsafe` is followed by `{` (just like `unsafe extern {...}`).
3. Add test case.
…ped-subdiagnostic-simplification, r=oli-obk errors: simplify referring to fluent attributes To render the message of a Fluent attribute, the identifier of the Fluent message must be known. `DiagnosticMessage::FluentIdentifier` contains both the message's identifier and optionally the identifier of an attribute. Generated constants for each attribute would therefore need to be named uniquely (amongst all error messages) or be able to refer to only the attribute identifier which will be combined with a message identifier later. In this commit, the latter strategy is implemented as part of the `Diagnostic` type's functions for adding subdiagnostics of various kinds. r? `@oli-obk`
Miri call ABI check: ensure type size+align stay the same We should almost certainly not accept calls where caller and callee disagree on the size or alignment of the type. The checks we do *almost* imply that, except that `ScalarPair` types can have `repr(align)` and thus differ in size/align even when they are pairs of the same primitive type. r? `@oli-obk`
…r=oli-obk
Make `from{,_mut}_ptr_range` const
This PR makes the following APIs `const`:
```rust
// core::slice
pub const unsafe fn from_ptr_range<'a, T>(range: Range<*const T>) -> &'a [T];
pub const unsafe fn from_mut_ptr_range<'a, T>(range: Range<*mut T>) -> &'a mut [T];
```
Tracking issue: rust-lang#89792.
Feature for `from_ptr_range` as a `const fn`: `slice_from_ptr_range_const`.
Feature for `from_mut_ptr_range` as a `const fn`: `slice_from_mut_ptr_range_const`.
r? `@oli-obk`
…=notriddle Source code page: line number click adds `NaN` When you click on the parent element of the line numbers in the source code pages, it'll add `NaN` (like in https://doc.rust-lang.org/nightly/src/alloc/lib.rs.html#NaN). This PR fixes this bug. cc `@jsha` r? `@notriddle`
Fix typos in comment Just two typos in HashingControls' description.
Contributor
Author
|
@bors r+ rollup=never p=7 |
Collaborator
|
📌 Commit fd24358 has been approved by |
Collaborator
|
⌛ Testing commit fd24358 with merge 91fae5f28eaffe13700eaa9004b9165cdf910d8a... |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
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:
extern unsafe#97172 (Optimize the diagnostic generation forextern unsafe)from{,_mut}_ptr_rangeconst #97419 (Makefrom{,_mut}_ptr_rangeconst)NaN#97555 (Source code page: line number click addsNaN)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup