Rollup of 23 pull requests#159903
Closed
GuillaumeGomez wants to merge 91 commits into
Closed
Conversation
Expose the internal `requires_caller_location` query through rustc_public so tools can detect when an instance has an implicit extra `&'static Location<'static>` argument in its ABI that is not present in the MIR body signature. Fixes rust-lang/rustc_public#123
Add an API to construct the `&'static Location<'static>` constant that must be passed as the implicit extra argument when calling a `#[track_caller]` function. Users provide the span of the call site (or the callee's definition span for reify shim fallback). Fixes rust-lang/rustc_public#62
The `test_dir_remove_file` test currently fails under Windows 7 on:
```
thread 'fs::tests::test_dir_remove_file' (2028) panicked at library/std/src/fs/tests.rs:2590:5:
dir.remove_file("foo.txt") failed with: The parameter is incorrect. (os error 87)
```
Looking into it, this is because the `FILE_DISPOSITION_INFO_EX` variant
of the `SetFileInformationByHandle` API is used while it is only
available starting from Windows 10 1607. However,
`FILE_DISPOSITION_INFO` is still available since Vista.
This is therefore fixed by introducing a fallback to the latter API if
the former fails. This is achieved by re-using some logic that is
already available through `File::delete` and that does exactly this.
Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
Add a method Body::caller_location that resolves the correct caller location constant for a call to a #[track_caller] function, walking inlined source scopes to handle MIR inlining correctly. Body now stores source scope data as a public field. Body::new populates it with empty entries (no inlining info); bodies obtained from the compiler have full scope data populated. Span::as_caller_location is now pub(crate) since users should use Body::caller_location instead, which handles inlining correctly.
Keeping up-to-date
also add a test for cross-crate static initializers
The string `#[target_features]` is used in various error messages as well as the compiler's code. But there is no such attribute, which I found very confusing. I think it means "one or more target features", e.g. covering both `#[target_feature(foo)]` and `#[target_feature(foo, bar, baz)]`. We already use `#[target_feature(..)]` for that meaning in several places. So this commit changes all `#[target_features]` occurrences to `#[target_feature(..)]`. It also changes a few `#[target_feature]` (no plural) occurrences to `#[target_feature(..)]` for consistency with other mentions nearby in error messages.
PoisonError::new is defined twice, once under #[cfg(panic = "unwind")] and once under its negation, so exactly one definition exists in any given build. rustdoc's auto_cfg only sees whichever cfg survived expansion and tags the method as available under that cfg only, even though it is callable in every configuration - it just panics under panic=abort instead of returning. Disable auto_cfg on both variants so the portability note stops implying the method doesn't exist elsewhere. The doc comment already explains the panic=abort behavior in prose, so the cfg doesn't need to leak into the generated badge. Add a minimal regression test.
Revert "Export `derive` at `core::derive` and `std::derive`" This reverts commit fec0998. Temporarily addresses rust-lang#159856 until we get the stability attribute to actually work...
bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest` During the bootstrap stage0 redesign, `compiletest-use-stage0-libtest` was needed as a workaround for big regressions in compiletest build times, due to compiletest's dependency on libtest or `#![feature(internal_output_capture)]`. As of rust-lang#146929, compiletest has no dependency on libtest or any unstable features, and is always built with the stage0 compiler. Since then, `compiletest-use-stage0-libtest` has had no effect, and was retained only to avoid breaking people's builds if they had that option set. Several months later, it should be fine to remove the option entirely. r? jieyouxu (or bootstrap)
Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide Related issue: rust-lang#159751 Updates the expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide.
…uwer Split multiline derives into std/rustc macros Misc cleanup
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@f5333a6. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Member
Author
|
@bors r+ p=5 rollup=never |
Contributor
Contributor
|
⌛ Testing commit fdf73ec with merge 91fd797... Workflow: https://github.com/rust-lang/rust/actions/runs/30161618020 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
Rollup of 23 pull requests Successful merges: - #159720 (document #[global_allocator] constraints) - #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled) - #159738 (implement `CovariantUnsafeCell`) - #159740 (reuse regular exported_non_generic_symbols logic in Miri) - #159780 (check `extern "custom"` function pointers) - #159786 (rustdoc-js: ignore editor temp files in test folder discovery) - #159819 (std::sync::poison: disable auto_cfg on PoisonError::new) - #155388 (stepping into where-clauses during normalization may be productive) - #155914 (when bailing on ambiguity, don't force other results to ambig) - #159204 (Add support to caller_location to rustc_public) - #159411 ([rustdoc] Correctly handle output options with --show-coverage) - #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`) - #159676 (Update wasm-component-ld to 0.5.27) - #159730 (allow accessing the contents of UnsafeCell without going through get) - #159809 (Avoid `#[target_features]`) - #159810 (Add tuple never coercion collection regression test) - #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate) - #159853 (Updated expect messages for `CString` struct and method documentation) - #159877 (Revert "Export `derive` at `core::derive` and `std::derive`") - #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`) - #159882 (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide) - #159891 (Split multiline derives into std/rustc macros) - #159895 (rustc-dev-guide subtree update)
Contributor
|
PR #159877, which is a member of this rollup, was unapproved. This rollup was thus unapproved. Auto build was cancelled due to unapproval. Cancelled workflows: |
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:
CovariantUnsafeCell#159738 (implementCovariantUnsafeCell)extern "custom"function pointers #159780 (checkextern "custom"function pointers)Dir::remove_file#159439 (Fix(lib/fs/win): Fall back on Win32 delete forDir::remove_file)#[target_features]#159809 (Avoid#[target_features])#[rustc_paren_sugar]feature gate #159826 (Remove redundant#[rustc_paren_sugar]feature gate)CStringstruct and method documentation #159853 (Updated expect messages forCStringstruct and method documentation)deriveatcore::deriveandstd::derive" #159877 (Revert "Exportderiveatcore::deriveandstd::derive")build.compiletest-use-stage0-libtest#159878 (bootstrap: Remove obsolete optionbuild.compiletest-use-stage0-libtest)r? @ghost
Create a similar rollup