Rollup of 25 pull requests#159920
Open
JonathanBrouwer wants to merge 92 commits into
Open
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
Since cfg_select is stable since 1.95, this can be enabled.
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
This is probably not what the user wants:
error: nested Markdown emphasis in HTML `style` tag
--> $DIR/invalid-html-tags-correct-script-style.rs:11:16
|
LL | /// One <style>*emph*</style>
| ^^^^^^ Markdown translates this into HTML, but the browser parses it as CSS
|
help: to turn off Markdown parsing, put the tag at the start of the line
|
LL ~ /// One
LL ~ /// <style>*emph*</style>
|
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.
In favor of passing raw pointers to inline asm.
Canonicalize and evaluate next-gen region constraints before query response canonicalization so equivalent constraints merge structurally.
Cover the dyn object supertrait case that used to leave equivalent next-gen region constraints in different shapes.
Keeping up-to-date
…e lint The new handling for non-local macros in `semicolon_in_expressions_from_macros` produces new deny-by-default lints on various existing crates, which have not previously received warnings because prior Rust versions suppressed them. Split those out into a new `semicolon_in_expressions_from_non_local_macros` lint, and make that one warn-by-default (and FCW warn-in-deps), rather than deny-by-default, to give the ecosystem time to adapt. This reintroduces the `is_local` tracking from commit 9192337.
…ros` The automatic mechanism to produce lint examples won't work, since this lint needs a separate crate, so add a `rust,ignore` example and manually provide the compiler output.
This is currently a no-op, but will be useful when const in `global_asm!` can be pointers.
Currently global_asm already have symbol names when using v0 scheme, this makes them obtain symbols with legacy scheme too.
This gives the asm-const code the basic ability to deal wiht pointer and provenances, which lays the ground work for asm_const_ptr. Note that `SymStatic` is not fully removed, a specialized is kept and renamed as `SymThreadLocalStatic`, for `#[thread_local]` statics where CTFE does not support naming. The `#[thread_local]` is unstable feature and it's not clear if we want to support this in `sym`, but removal of it should be a separate PR.
With the previous commit, now we can see there are some code duplication for the handling of `GlobalAlloc` inside backends. Do some clean up to unify them.
CTFE pointers created via type ID, `without_provenance` or pointers to const ZSTs can now be codegenned with all 3 backends. These pointers are generated in the same way as integers.
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
Rollup of 25 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-*
Contributor
Author
|
@bors treeopen |
Contributor
|
Tree is now open for merging. |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
…uwer Rollup of 25 pull requests Successful merges: - #138618 (Support using const pointers in asm `const` operand) - #157962 (Lower paths to functions in const args as ConstKind::Error) - #158404 (trait_solver: normalize next-gen region constraints) - #158709 (rustdoc: warn on improperly interleaved HTML/MD) - #159174 (Fix implicit_provenance_casts warnings on Xous) - #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group) - #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>) - #159673 (bootstrap: forward -fdebug-prefix-map when using cc) - #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint) - #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) - #159785 (Share _Unwind_Exception definition between native and wasm) - #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) - #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`) - #159676 (Update wasm-component-ld to 0.5.27) - #159695 (proc_macro: Fix cfg_attr inner attrs in file modules) - #159730 (allow accessing the contents of UnsafeCell without going through get) - #159809 (Avoid `#[target_features]`)
Contributor
|
💔 Test for 0ff608a failed: CI. Failed job:
|
Contributor
Author
|
@borsc retry |
Contributor
|
Unknown command "c". Run |
Contributor
Author
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
…uwer Rollup of 25 pull requests Successful merges: - #138618 (Support using const pointers in asm `const` operand) - #157962 (Lower paths to functions in const args as ConstKind::Error) - #158404 (trait_solver: normalize next-gen region constraints) - #158709 (rustdoc: warn on improperly interleaved HTML/MD) - #159174 (Fix implicit_provenance_casts warnings on Xous) - #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group) - #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>) - #159673 (bootstrap: forward -fdebug-prefix-map when using cc) - #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint) - #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) - #159785 (Share _Unwind_Exception definition between native and wasm) - #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) - #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`) - #159676 (Update wasm-component-ld to 0.5.27) - #159695 (proc_macro: Fix cfg_attr inner attrs in file modules) - #159730 (allow accessing the contents of UnsafeCell without going through get) - #159809 (Avoid `#[target_features]`)
Contributor
|
💔 Test for 0929f0f failed: CI. Failed job:
|
Contributor
Author
Contributor
|
Tree closed for PRs with priority less than 100. |
Contributor
|
⌛ Testing commit 1265202 with merge 2bae1f2... Workflow: https://github.com/rust-lang/rust/actions/runs/30174398636 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
…uwer Rollup of 25 pull requests Successful merges: - #138618 (Support using const pointers in asm `const` operand) - #157962 (Lower paths to functions in const args as ConstKind::Error) - #158404 (trait_solver: normalize next-gen region constraints) - #158709 (rustdoc: warn on improperly interleaved HTML/MD) - #159174 (Fix implicit_provenance_casts warnings on Xous) - #159179 (enable `unreachable_cfg_select_predicates` lint as part of `unused` lint group) - #159518 (iter: extend step_by specialization to cover StepBy<RangeIter<{integer}>>) - #159673 (bootstrap: forward -fdebug-prefix-map when using cc) - #159700 (Split non-local `semicolon_in_expressions_from_macros` into a separate lint) - #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) - #159785 (Share _Unwind_Exception definition between native and wasm) - #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) - #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`) - #159676 (Update wasm-component-ld to 0.5.27) - #159695 (proc_macro: Fix cfg_attr inner attrs in file modules) - #159730 (allow accessing the contents of UnsafeCell without going through get) - #159809 (Avoid `#[target_features]`)
Contributor
|
💔 Test for 39f1d7d failed: CI. Failed jobs:
|
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:
constoperand #138618 (Support using const pointers in asmconstoperand)unreachable_cfg_select_predicateslint as part ofunusedlint group #159179 (enableunreachable_cfg_select_predicateslint as part ofunusedlint group)semicolon_in_expressions_from_macrosinto a separate lint #159700 (Split non-localsemicolon_in_expressions_from_macrosinto a separate lint)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])r? @ghost
Create a similar rollup