-
Notifications
You must be signed in to change notification settings - Fork 35
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
Automated pull from upstream master
#711
Conversation
Previously, `Tree::from_enum`'s implementation branched into three disjoint cases: 1. enums that uninhabited 2. enums for which all but one variant is uninhabited 3. enums with multiple inhabited variants This branching (incorrectly) did not differentiate between variantful and variantless uninhabited enums. In both cases, we assumed (and asserted) that uninhabited enums are zero-sized types. This assumption is false for enums like: enum Uninhabited { A(!, u128) } ...which, currently, has the same size as `u128`. This faulty assumption manifested as the ICE reported in #126460. In this PR, we revise the first case of `Tree::from_enum` to consider only the narrow category of "enums that are uninhabited ZSTs". These enums, whose layouts are described with `Variants::Single { index }`, are special in their layouts otherwise resemble the `!` type and cannot be descended into like typical enums. This first case captures uninhabited enums like: enum Uninhabited { A(!, !), B(!) } The second case is revised to consider the broader category of "enums that defer their layout to one of their variants"; i.e., enums whose layouts are described with `Variants::Single { index }` and that do have a variant at `index`. This second case captures uninhabited enums that are not ZSTs, like: enum Uninhabited { A(!, u128) } ...which represent their variants with `Variants::Single`. Finally, the third case is revised to cover the broader category of "enums with multiple variants", which captures uninhabited, non-ZST enums like: enum Uninhabited { A(u8, !), B(!, u32) } ...which represent their variants with `Variants::Multiple`. This PR also adds a comment requested by RalfJung in his review of #126358 to `compiler/rustc_const_eval/src/interpret/discriminant.rs`. Fixes #126460
When set, this flag skips the code that normally extracts coverage spans from MIR statements and terminators. That sometimes makes it easier to debug branch coverage and MC/DC coverage, because the coverage output is less noisy. For internal debugging only. If other code changes would make it hard to keep supporting this flag, remove it.
This synchronizes the fuchsia test running code with the clang test runner. This brings with it: * Improved logging * Uses the fuchsia image from the SDK version * Caches the product bundle across test runs * Strips the binaries to reduce the data sent to the emulator
… in parse_precise_capturing_syntax
…=estebank,davidtwco Place tail expression behind terminating scope This PR implements #123739 so that we can do further experiments in nightly. A little rewrite has been applied to `for await` lowering. It was previously `unsafe { Pin::unchecked_new(into_async_iter(..)) }`. Under the edition 2024 rule, however, `into_async_iter` gets dropped at the end of the `unsafe` block. This presumably the first Edition 2024 migration rule goes by hoisting `into_async_iter(..)` into `match` one level above, so it now looks like the following. ```rust match into_async_iter($iter_expr) { ref mut iter => match unsafe { Pin::unchecked_new(iter) } { ... } } ```
Suggest using a standalone doctest for non-local impl defs This PR tweaks the lint output of the `non_local_definitions` lint to suggest using a standalone doctest instead of a moving the `impl` def to an impossible place as was already done with `macro_rules!` case in rust-lang/rust#124568. Fixes #126339 r? ```@fmease```
safe transmute: support non-ZST, variantful, uninhabited enums Previously, `Tree::from_enum`'s implementation branched into three disjoint cases: 1. enums that uninhabited 2. enums for which all but one variant is uninhabited 3. enums with multiple variants This branching (incorrectly) did not differentiate between variantful and variantless uninhabited enums. In both cases, we assumed (and asserted) that uninhabited enums are zero-sized types. This assumption is false for enums like: enum Uninhabited { A(!, u128) } ...which, currently, has the same size as `u128`. This faulty assumption manifested as the ICE reported in #126460. In this PR, we revise the first case of `Tree::from_enum` to consider only the narrow category of "enums that are uninhabited ZSTs". These enums, whose layouts are described with `Variants::Single { index }`, are special in their layouts otherwise resemble the `!` type and cannot be descended into like typical enums. This first case captures uninhabited enums like: enum Uninhabited { A(!, !), B(!) } The second case is revised to consider the broader category of "enums that defer their layout to one of their variants"; i.e., enums whose layouts are described with `Variants::Single { index }` and that do have a variant at `index`. This second case captures uninhabited enums that are not ZSTs, like: enum Uninhabited { A(!, u128) } ...which represent their variants with `Variants::Single`. Finally, the third case is revised to cover the broader category of "enums with multiple variants", which captures uninhabited enums like: enum Uninhabited { A(u8, !), B(!, u32) } ...which represent their variants with `Variants::Multiple`. This PR also adds a comment requested by ````@RalfJung```` in his review of #126358 to `compiler/rustc_const_eval/src/interpret/discriminant.rs`. Fixes #126460 r? ````@compiler-errors````
Sync fuchsia test runner with clang test runner This synchronizes the fuchsia test running code with the clang test runner. This brings with it: * Improved logging * Uses the fuchsia image from the SDK version * Caches the product bundle across test runs * Strips the binaries to reduce the data sent to the emulator r? ``@tmandry``
hir_typeck: be more conservative in making "note caller chooses ty param" note In rust-lang/rust#122195 I added a "caller chooses ty for type param" note for when the return expression type a.k.a. found type does not match the expected return type. #126547 found that this note was confusing when the found return type *contains* the expected type, e.g. ```rs fn f<T>(t: &T) -> T { t } ``` because the found return type `&T` will *always* be different from the expected return type `T`, so the note was needlessly redundant and confusing. This PR addresses that by not making the note if the found return type contains the expected return type. r? ``@fmease`` (since you reviewed the original PR) Fixes rust-lang/rust#126547
Add `rustc-ice*` to `.gitignore` I am a bit surprised this wasn't already here but there doesn't seem to be any reason not to add it. This will be nice to cut down on `git {add, diff, etc}` noise when debugging crashes.
…lstrieb Replace `move||` with `move ||` Edit from #126631 to revert changes in `tests/ui`. There are 18 instances of `move||` across 6 files in the repo: - `compiler/rustc_hir_typeck/src/typeck_root_ctxt.rs` - `library/core/src/sync/atomic.rs` - `library/std/src/sync/condvar.rs` - `library/std/src/sync/mpsc/mod.rs` - `library/std/src/sync/barrier.rs` - `library/std/src/thread/local.rs` I have replaced all such instances with `move ||` instead as it better adheres to modern formatting standards. Ideally, we would have this automated by rustfmt or some other tool, but I do not have the time to implement such a feature or tool. Nonetheless, I would encourage any effort invested into such a tool or feature.
Rollup of 10 pull requests Successful merges: - #124135 (delegation: Implement glob delegation) - #125078 (fix: break inside async closure has incorrect span for enclosing closure) - #125293 (Place tail expression behind terminating scope) - #126422 (Suggest using a standalone doctest for non-local impl defs) - #126493 (safe transmute: support non-ZST, variantful, uninhabited enums) - #126504 (Sync fuchsia test runner with clang test runner) - #126558 (hir_typeck: be more conservative in making "note caller chooses ty param" note) - #126586 (Add `@badboy` and `@BlackHoleFox` as Mac Catalyst maintainers) - #126615 (Add `rustc-ice*` to `.gitignore`) - #126632 (Replace `move||` with `move ||`) r? `@ghost` `@rustbot` modify labels: rollup
This commit is generated by `ferrocene/tools/pull-upstream/pull.sh`. The list of excluded files is defined in `.gitattributes`.
both run-make tests have been ported to the new rmake framework the test 'issue-64153' has been renamed and now has the more descriptive name 'lto-avoid-object-duplication'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
694: Adopt uv for venv purposes r=pietroalbini a=Hoverbear Adopt `uv` and set up a `venv` so local users don't need to set up a python environment beyond `python`/`pip` (eg, no `boto`, no `pyyaml`, etc). As a consequence, the way we build our docker images has changed, as they need to have access to `requirements.txt`. This PR, surprisingly, needs no documentation updates, as it does not impact and customer facing procedures yet. 711: Automated pull from upstream `master` r=Dajamante a=github-actions[bot] This PR pulls the following changes from the upstream repository: * `126655`: [Rollup of 10 pull requests](https://www.github.com/rust-lang/rust/issues/126655) * `126632`: [Replace `move||` with `move ||`](https://www.github.com/rust-lang/rust/issues/126632) * `126615`: [Add `rustc-ice*` to `.gitignore`](https://www.github.com/rust-lang/rust/issues/126615) * `126586`: [Add `@badboy` and `@BlackHoleFox` as Mac Catalyst maintainers](https://www.github.com/rust-lang/rust/issues/126586) * `126558`: [hir_typeck: be more conservative in making "note caller chooses ty param" note](https://www.github.com/rust-lang/rust/issues/126558) * `126504`: [Sync fuchsia test runner with clang test runner](https://www.github.com/rust-lang/rust/issues/126504) * `126493`: [safe transmute: support non-ZST, variantful, uninhabited enums](https://www.github.com/rust-lang/rust/issues/126493) * `126422`: [Suggest using a standalone doctest for non-local impl defs](https://www.github.com/rust-lang/rust/issues/126422) * `125293`: [Place tail expression behind terminating scope](https://www.github.com/rust-lang/rust/issues/125293) * `125078`: [fix: break inside async closure has incorrect span for enclosing closure](https://www.github.com/rust-lang/rust/issues/125078) * `124135`: [delegation: Implement glob delegation](https://www.github.com/rust-lang/rust/issues/124135) * `126607`: [Rewrite `separate-link`, `separate-link-fail` and `allocator-shim-circular-deps` `run-make` tests to `ui` or `rmake`](https://www.github.com/rust-lang/rust/issues/126607) * `126614`: [Uplift next trait solver to `rustc_next_trait_solver`](https://www.github.com/rust-lang/rust/issues/126614) * `126623`: [Replace all `&DiagCtxt` with a `DiagCtxtHandle<'_>` wrapper type](https://www.github.com/rust-lang/rust/issues/126623) * `126630`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/126630) * `126621`: [More thorough status-quo tests for `#[coverage(..)]`](https://www.github.com/rust-lang/rust/issues/126621) * `126587`: [coverage: Add debugging flag `-Zcoverage-options=no-mir-spans`](https://www.github.com/rust-lang/rust/issues/126587) * `126583`: [interpret: better error when we ran out of memory](https://www.github.com/rust-lang/rust/issues/126583) * `126500`: [Migrate `error-found-staticlib-instead-crate`, `output-filename-conflicts-with-directory`, `output-filename-overwrites-input`, `native-link-modifier-verbatim-rustc` and `native-link-verbatim-linker` `run-make` tests to `rmake.rs` format](https://www.github.com/rust-lang/rust/issues/126500) * `125988`: [Migrate `run-make/used` to `rmake.rs`](https://www.github.com/rust-lang/rust/issues/125988) * `126437`: [Migrate `issue-64153`, `invalid-staticlib` and `no-builtins-lto` `run-make` tests to `rmake`](https://www.github.com/rust-lang/rust/issues/126437) * `126049`: [Rework `feature(precise_capturing)` to represent `use<...>` as a syntactical bound](https://www.github.com/rust-lang/rust/issues/126049) * `126330`: [Return opaque type from PanicInfo::message()](https://www.github.com/rust-lang/rust/issues/126330) * `126591`: [[perf] More span update benchmarking](https://www.github.com/rust-lang/rust/issues/126591) * `126490`: [Migrate `extern-flag-fun`, `incremental-debugger-visualiser` and `incremental-session-fail` `run-make` tests to `rmake.rs`](https://www.github.com/rust-lang/rust/issues/126490) Co-authored-by: Ana Hobden <[email protected]> Co-authored-by: Lin Yihai <[email protected]> Co-authored-by: Oneirical <[email protected]> Co-authored-by: Vadim Petrochenkov <[email protected]> Co-authored-by: Jack Wrenn <[email protected]> Co-authored-by: Urgau <[email protected]> Co-authored-by: Guillaume Gomez <[email protected]> Co-authored-by: Ralf Jung <[email protected]> Co-authored-by: Mads Marquart <[email protected]> Co-authored-by: Zalathar <[email protected]> Co-authored-by: Erick Tryzelaar <[email protected]> Co-authored-by: Mara Bos <[email protected]> Co-authored-by: Ding Xiang Fei <[email protected]> Co-authored-by: Michael Goulet <[email protected]>
Build failed (retrying...): |
711: Automated pull from upstream `master` r=Dajamante a=github-actions[bot] This PR pulls the following changes from the upstream repository: * `126655`: [Rollup of 10 pull requests](https://www.github.com/rust-lang/rust/issues/126655) * `126632`: [Replace `move||` with `move ||`](https://www.github.com/rust-lang/rust/issues/126632) * `126615`: [Add `rustc-ice*` to `.gitignore`](https://www.github.com/rust-lang/rust/issues/126615) * `126586`: [Add `@badboy` and `@BlackHoleFox` as Mac Catalyst maintainers](https://www.github.com/rust-lang/rust/issues/126586) * `126558`: [hir_typeck: be more conservative in making "note caller chooses ty param" note](https://www.github.com/rust-lang/rust/issues/126558) * `126504`: [Sync fuchsia test runner with clang test runner](https://www.github.com/rust-lang/rust/issues/126504) * `126493`: [safe transmute: support non-ZST, variantful, uninhabited enums](https://www.github.com/rust-lang/rust/issues/126493) * `126422`: [Suggest using a standalone doctest for non-local impl defs](https://www.github.com/rust-lang/rust/issues/126422) * `125293`: [Place tail expression behind terminating scope](https://www.github.com/rust-lang/rust/issues/125293) * `125078`: [fix: break inside async closure has incorrect span for enclosing closure](https://www.github.com/rust-lang/rust/issues/125078) * `124135`: [delegation: Implement glob delegation](https://www.github.com/rust-lang/rust/issues/124135) * `126607`: [Rewrite `separate-link`, `separate-link-fail` and `allocator-shim-circular-deps` `run-make` tests to `ui` or `rmake`](https://www.github.com/rust-lang/rust/issues/126607) * `126614`: [Uplift next trait solver to `rustc_next_trait_solver`](https://www.github.com/rust-lang/rust/issues/126614) * `126623`: [Replace all `&DiagCtxt` with a `DiagCtxtHandle<'_>` wrapper type](https://www.github.com/rust-lang/rust/issues/126623) * `126630`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/126630) * `126621`: [More thorough status-quo tests for `#[coverage(..)]`](https://www.github.com/rust-lang/rust/issues/126621) * `126587`: [coverage: Add debugging flag `-Zcoverage-options=no-mir-spans`](https://www.github.com/rust-lang/rust/issues/126587) * `126583`: [interpret: better error when we ran out of memory](https://www.github.com/rust-lang/rust/issues/126583) * `126500`: [Migrate `error-found-staticlib-instead-crate`, `output-filename-conflicts-with-directory`, `output-filename-overwrites-input`, `native-link-modifier-verbatim-rustc` and `native-link-verbatim-linker` `run-make` tests to `rmake.rs` format](https://www.github.com/rust-lang/rust/issues/126500) * `125988`: [Migrate `run-make/used` to `rmake.rs`](https://www.github.com/rust-lang/rust/issues/125988) * `126437`: [Migrate `issue-64153`, `invalid-staticlib` and `no-builtins-lto` `run-make` tests to `rmake`](https://www.github.com/rust-lang/rust/issues/126437) * `126049`: [Rework `feature(precise_capturing)` to represent `use<...>` as a syntactical bound](https://www.github.com/rust-lang/rust/issues/126049) * `126330`: [Return opaque type from PanicInfo::message()](https://www.github.com/rust-lang/rust/issues/126330) * `126591`: [[perf] More span update benchmarking](https://www.github.com/rust-lang/rust/issues/126591) * `126490`: [Migrate `extern-flag-fun`, `incremental-debugger-visualiser` and `incremental-session-fail` `run-make` tests to `rmake.rs`](https://www.github.com/rust-lang/rust/issues/126490) Co-authored-by: Lin Yihai <[email protected]> Co-authored-by: Oneirical <[email protected]> Co-authored-by: Vadim Petrochenkov <[email protected]> Co-authored-by: Jack Wrenn <[email protected]> Co-authored-by: Urgau <[email protected]> Co-authored-by: Guillaume Gomez <[email protected]> Co-authored-by: Ralf Jung <[email protected]> Co-authored-by: Mads Marquart <[email protected]> Co-authored-by: Zalathar <[email protected]> Co-authored-by: Erick Tryzelaar <[email protected]> Co-authored-by: Mara Bos <[email protected]> Co-authored-by: Ding Xiang Fei <[email protected]> Co-authored-by: Michael Goulet <[email protected]>
Build failed: |
//@ revisions: edition2021 edition2024 | ||
//@ ignore-wasm no panic or subprocess support | ||
//@ [edition2024] compile-flags: -Zunstable-options | ||
//@ [edition2024] edition: 2024 | ||
//@ run-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is failing as this test needs unwinding support and upstream forgot to add a //@ needs-unwind
directive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
submitted rust-lang/rust#126740 upstream
the `tail-expr-lock-poisoning` UI test uses the `panic::catch_unwind` API so it relies on unwinding being implemented. this test ought not to run on targets that do not support unwinding. add the `needs-unwind` attribute to signal this
bors merge |
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
bors retry |
Build succeeded:
|
This PR pulls the following changes from the upstream repository:
126655
: Rollup of 10 pull requests126632
: Replacemove||
withmove ||
126615
: Addrustc-ice*
to.gitignore
126586
: Add @badboy and @BlackHoleFox as Mac Catalyst maintainers126558
: hir_typeck: be more conservative in making "note caller chooses ty param" note126504
: Sync fuchsia test runner with clang test runner126493
: safe transmute: support non-ZST, variantful, uninhabited enums126422
: Suggest using a standalone doctest for non-local impl defs125293
: Place tail expression behind terminating scope125078
: fix: break inside async closure has incorrect span for enclosing closure124135
: delegation: Implement glob delegation126607
: Rewriteseparate-link
,separate-link-fail
andallocator-shim-circular-deps
run-make
tests toui
orrmake
126614
: Uplift next trait solver torustc_next_trait_solver
126623
: Replace all&DiagCtxt
with aDiagCtxtHandle<'_>
wrapper type126630
: Rollup of 5 pull requests126621
: More thorough status-quo tests for#[coverage(..)]
126587
: coverage: Add debugging flag-Zcoverage-options=no-mir-spans
126583
: interpret: better error when we ran out of memory126500
: Migrateerror-found-staticlib-instead-crate
,output-filename-conflicts-with-directory
,output-filename-overwrites-input
,native-link-modifier-verbatim-rustc
andnative-link-verbatim-linker
run-make
tests tormake.rs
format125988
: Migraterun-make/used
tormake.rs
126437
: Migrateissue-64153
,invalid-staticlib
andno-builtins-lto
run-make
tests tormake
126049
: Reworkfeature(precise_capturing)
to representuse<...>
as a syntactical bound126330
: Return opaque type from PanicInfo::message()126591
: [perf] More span update benchmarking126490
: Migrateextern-flag-fun
,incremental-debugger-visualiser
andincremental-session-fail
run-make
tests tormake.rs