-
Notifications
You must be signed in to change notification settings - Fork 402
Automatic Rustup #4619
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
Merged
Merged
Automatic Rustup #4619
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
…uillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
Introduce debuginfo to statements in MIR The PR introduces support for debug information within dead statements. Currently, only the reference statement is supported, which is sufficient to fix rust-lang/rust#128081. I don't modify Stable MIR, as I don't think we need debug information when using it. This PR represents the debug information for the dead reference statement via `#dbg_value`. For example, `let _foo_b = &foo.b` becomes `#dbg_value(ptr %foo, !22, !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value), !26)`. You can see this here: https://rust.godbolt.org/z/d43js6adv. The general principle for handling debug information is to never provide less debug information than the optimized LLVM IR. The current rules for dropping debug information in this PR are: - If the LLVM IR cannot represent a reference address, it's replaced with poison or simply dropped. For example, see: https://rust.godbolt.org/z/shGqPec8W. I'm using poison in all such cases now. - All debuginfos is dropped when merging multiple successor BBs. An example is available here: https://rust.godbolt.org/z/TE1q3Wq6M. I doesn't drop debuginfos in `MatchBranchSimplification`, because LLVM also pick one branch for it.
Fix backtraces with `-C panic=abort` on linux; emit unwind tables by default The linux backtrace unwinder relies on unwind tables to work properly, and generating and printing a backtrace is done by for example the default panic hook. Begin emitting unwind tables by default again with `-C panic=abort` (see history below) so that backtraces work. Closes rust-lang/rust#81902 which is **regression-from-stable-to-stable** Closes rust-lang/rust#94815 ### History Backtraces with `-C panic=abort` used to work in Rust 1.22 but broke in Rust 1.23, because in 1.23 we stopped emitting unwind tables with `-C panic=abort` (see rust-lang/rust#45031 and rust-lang/rust#81902 (comment)). In 1.45 a workaround in the form of `-C force-unwind-tables=yes` was added (see rust-lang/rust#69984). `-C panic=abort` was added in [Rust 1.10](https://blog.rust-lang.org/2016/07/07/Rust-1.10/#what-s-in-1-10-stable) and the motivation was binary size and compile time. But given how confusing that behavior has turned out to be, it is better to make binary size optimization opt-in with `-C force-unwind-tables=no` rather than default since the current default breaks backtraces. Besides, if binary size is a primary concern, there are many other tricks that can be used that has a higher impact. # Release Note Entry Draft: ## Compatibility Notes * [Fix backtraces with `-C panic=abort` on Linux by generating unwind tables by default](rust-lang/rust#143613). Build with `-C force-unwind-tables=no` to keep omitting unwind tables. try-job: aarch64-apple try-job: armhf-gnu try-job: aarch64-msvc-1
ignore power alignment rule on unions fixes rust-lang/rust#147348 The power alignment rule only applies to the non-first field of a struct, and so should not apply to unions at all. The current code also does not consider enums (whose fields might be, morally, structs). Given that C does not actually have ADTs like this it's probably fine from a compatibility perspective, but I'll leave that to the powerpc folks. cc `@daltenty` `@gilamn5tr` r? compiler
test: Subtract code_offset from width for ui_testing `annotate-snippets` does not have a "UI test" mode like `rustc`, [where the code offset is not subtracted from the column width](https://github.com/rust-lang/rust/blob/f34ba774c78ea32b7c40598b8ad23e75cdac42a6/compiler/rustc_errors/src/emitter.rs#L1985-L1987). This makes it so `annotate-snippets` will shift the output for some very long tests 5 - 7 columns to the left. As part of my work to have `rustc` use `annotate-snippets`, and to reduce the test differences between the two, I figured it would be best if `rustc` started subtracting the code offset from the width as well. The first commit exists to keep the test output changes of adding a new line to a test separate from adding the `--diagnostic-width` flag in the second commit. This makes it easier to verify that adding the flag does not affect the test's output. [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/annotate-snippets.20hurdles)
…t-span, r=estebank Fix wrong span for hightlight for duplicated diff lines Fixes rust-lang/rust#147070 From comments: rust-lang/rust#147070 (comment) The lightlight row for diff must at least 2. r? `@estebank`
…ackh726 Improve diagnostics: update note and add help message I moved the content from the note to a help message, as it seemed more appropriate there, and then added new information to the note(`Modules are usually placed outside of blocks, at the top level of the file`)! resolve: rust-lang/rust#147314
…kobzol Fluent tidy improvements Follow-up of rust-lang/rust#147345 and of rust-lang/rust#147191. It uses `fluent_syntax` to parse `fluent` files (but not for blessing, not even sure how the current one works). I also added an `assert` to ensure we never go to previous situation where the `fluent` files were actually not checked at all. cc ``@Kivooeo`` r? kobzol
Update books ## rust-lang/reference 4 commits in e11adf6016a362766eea5a3f9832e193994dd0c8..8efb9805686722dba511b7b27281bb6b77d32130 2025-10-06 15:04:20 UTC to 2025-10-01 17:30:01 UTC - Clarify that "or it is dropped" is meant restrictively (rust-lang/reference#2035) - add lifetime extension tests for tuple struct temporaries (rust-lang/reference#2033) - Add `target_env = "macabi"` and `target_env = "sim"` (rust-lang/reference#1781) - Typo fixes for the Tokens page (additions -> editions) (rust-lang/reference#2031)
don't panic on extern with just multiple quotes in the name Continues rust-lang/rust#147377. That PR fixed ICE when the extern name was a single quote `"'"`, but multiple quotes like `"''"` cause the same problem. I had a random revelation that the trimming can remove more than one quote. r? ``@nnethercote``
Rollup of 7 pull requests Successful merges: - rust-lang/rust#145495 (Use declarative macro for `#[derive(TryFromU32)]`) - rust-lang/rust#147165 (test: Subtract code_offset from width for ui_testing) - rust-lang/rust#147354 (Fix wrong span for hightlight for duplicated diff lines) - rust-lang/rust#147395 (Improve diagnostics: update note and add help message) - rust-lang/rust#147396 (Fluent tidy improvements) - rust-lang/rust#147407 (Update books) - rust-lang/rust#147413 (don't panic on extern with just multiple quotes in the name) r? `@ghost` `@rustbot` modify labels: rollup
Prevent downstream `impl DerefMut for Pin<LocalType>` The safety requirements for [`PinCoerceUnsized`](https://doc.rust-lang.org/stable/std/pin/trait.PinCoerceUnsized.html) are essentially that the type does not have a malicious `Deref` or `DerefMut` impl. However, the `Pin` type is fundamental, so the end-user can provide their own implementation of `DerefMut` for `Pin<&SomeLocalType>`, so it's possible for `Pin` to have a malicious `DerefMut` impl. This unsoundness is known as rust-lang/rust#85099. Unfortunately, this means that the implementation of `PinCoerceUnsized` for `Pin` is currently unsound. To fix that, modify the impl so that it becomes impossible for downstream crates to provide their own implementation of `DerefMut` for `Pin` by abusing a hidden struct that is not fundamental. This PR is a breaking change, but it fixes rust-lang/rust#85099. The PR supersedes rust-lang/rust#144896. r? lcnr
This updates the rust-version file to 4fd31815524baba0bf368f151f757101f432e3de.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 4fd31815524baba0bf368f151f757101f432e3de Filtered ref: ee72bb0 Upstream diff: rust-lang/rust@3b8665c...4fd3181 This merge was created using https://github.com/rust-lang/josh-sync.
|
Thank you for contributing to Miri! |
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.
Merge ref '4fd31815524b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 4fd31815524baba0bf368f151f757101f432e3de
Filtered ref: ee72bb0
Upstream diff: rust-lang/rust@3b8665c...4fd3181
This merge was created using https://github.com/rust-lang/josh-sync.