-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 7 pull requests #141707
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
Closed
Closed
Rollup of 7 pull requests #141707
Conversation
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
It uses the file metadata on Unix with a fallback for files incorrectly reported as zero-sized. It uses `GetFileSizeEx` on Windows. This reduces the number of syscalls needed for determining the file size of an open file from 3 to 1.
It can only describe the inner workings of the default implementation, other implementations might not be implemented using seeks at all.
The current default plain, tends to create non-uniform import blocks over time, some being relative, some being absolute. I believe we should encourage a different default here.
By removing the cache.
Previously only the open delimiter's span was set, and this caused... weird problems.
…egrated-benchmarks internal: fix `integrated_benchmarks` to make actual edits
fix: Correctly set the span of the proc_macro crate's Group delimiters
fix: Fix cache problems with lints level
minor: Support `transmute_unchecked` intrinsic for mir-eval
Remove rust-analyzer.vs from other editors
The implementation delegates to `<ByteStr as Display>::fmt`. Link: rust-lang/libs-team#550 Link: rust-lang#139984.
It wasn't inside the source, because there was no source map.
…rmation instead of syntactical hacks And rename it to `is_inside_macro_call()` accordingly.
fix: Properly implement `might_be_inside_macro_call()` using semantic information instead of syntactical hacks
…austiveness fix: Normalize when checking for uninhabited types for pattern exhaustiveness checking
fixes: ide-assists, generate_new indent loses
Change import prefix default to be by crate
…it-impl-indent fix: ide-assists, generate mut trait impl indent
…macro-hir fix: Fix IDE resolution of item macros
Use `cfg_attr_trace` in AST with a placeholder attribute for accurate suggestion In rust-lang#138515, we insert a placeholder attribute so that checks for attributes can still know about the placement of `cfg` attributes. When we suggest removing items with `cfg_attr`s (fix rust-lang#56328) and make them verbose. We tweak the wording of the existing "unused `extern crate`" lint. ``` warning: unused `extern crate` --> $DIR/removing-extern-crate.rs:9:1 | LL | extern crate removing_extern_crate as foo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused | note: the lint level is defined here --> $DIR/removing-extern-crate.rs:6:9 | LL | #![warn(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]` help: remove the unused `extern crate` | LL - #[cfg_attr(test, macro_use)] LL - extern crate removing_extern_crate as foo; | ``` r? `@petrochenkov`
…ross,bjorn3 Stabilize `repr128` ## Stabilisation report The `repr128` feature ([tracking issue](rust-lang#56071)) allows the use of `#[repr(u128)]` and `#[repr(i128)]` on enums in the same way that other primitive representations such as `#[repr(u64)]` can be used. For example: ```rust #[repr(u128)] enum Foo { One = 1, Two, Big = u128::MAX, } #[repr(i128)] enum Bar { HasThing(u16) = 42, HasSomethingElse(i64) = u64::MAX as i128 + 1, HasNothing, } ``` This is the final part of adding 128-bit integers to Rust ([RFC 1504](https://rust-lang.github.io/rfcs/1504-int128.html)); all other parts of 128-bit integer support were stabilised in rust-lang#49101 back in 2018. From a design perspective, `#[repr(u128)]`/`#[repr(i128)]` function like `#[repr(u64)]`/`#[repr(i64)]` but for 128-bit integers instead of 64-bit integers. The only differences are: - FFI safety: as `u128`/`i128` are not currently considered FFI safe, neither are `#[repr(u128)]`/`#[repr(i128)]` enums (I discovered this wasn't the case while drafting this stabilisation report, so I have submitted rust-lang#138282 to fix this). - Debug info: while none of the major debuggers currently support 128-bit integers, as of LLVM 20 `rustc` will emit valid debuginfo for both DWARF and PDB (PDB makes use of the same natvis that is also used for all enums with fields, whereas DWARF has native support). Tests for `#[repr(u128)]`/`#[repr(i128)]` enums include: - [ui/enum-discriminant/repr128.rs](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/ui/enum-discriminant/repr128.rs): checks that 128-bit enum discriminants have the correct values. - [debuginfo/msvc-pretty-enums.rs](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/debuginfo/msvc-pretty-enums.rs): checks the PDB debuginfo is correct. - [run-make/repr128-dwarf](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/run-make/repr128-dwarf/rmake.rs): checks the DWARF debuginfo is correct. Stabilising this feature does not require any changes to the Rust Reference as [the documentation on primitive representations](https://doc.rust-lang.org/nightly/reference/type-layout.html#r-layout.repr.primitive.intro) already includes `u128` and `i128`. Closes rust-lang#56071 Closes rust-lang/reference#1368 r? lang `@rustbot` label +I-lang-nominated +T-lang
add `CStr::display` The implementation delegates to `<ByteStr as Display>::fmt`. Link: rust-lang/libs-team#550 Link: rust-lang#139984. r? `@BurntSushi` cc `@Darksonn` `@tgross35` `@ojeda` `@joshtriplett`
Path::with_extension: show that it adds an extension where one did no… …t exist I think the times I encountered this, I had to check first if files without extensions were added, since all examples only had files with existing extensions. Also, this replaced example already has a similar example below.
clean up old rintf leftovers As usual stdarch needed special treatment due to rust-lang/stdarch#1655, and apparently I forgot to clean up these leftovers here. They can be removed now.
Subtree update of `rust-analyzer` r? ``@ghost``
@bors r+ rollup=never p=5 |
bors
added a commit
that referenced
this pull request
May 28, 2025
Rollup of 7 pull requests Successful merges: - #125087 (Optimize `Seek::stream_len` impl for `File`) - #133823 (Use `cfg_attr_trace` in AST with a placeholder attribute for accurate suggestion) - #138285 (Stabilize `repr128`) - #139994 (add `CStr::display`) - #141477 (Path::with_extension: show that it adds an extension where one did no…) - #141533 (clean up old rintf leftovers) - #141693 (Subtree update of `rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
A-rustdoc-json
Area: Rustdoc JSON backend
A-tidy
Area: The tidy tool
O-windows
Operating system: Windows
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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:
Seek::stream_len
impl forFile
#125087 (OptimizeSeek::stream_len
impl forFile
)cfg_attr_trace
in AST with a placeholder attribute for accurate suggestion #133823 (Usecfg_attr_trace
in AST with a placeholder attribute for accurate suggestion)repr128
#138285 (Stabilizerepr128
)CStr::display
#139994 (addCStr::display
)rust-analyzer
#141693 (Subtree update ofrust-analyzer
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup