-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[EXPERIMENT] Introduce TypingMode::Codegen
to avoid layout cycles
#145477
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
Conversation
@bors try @rust-timer queue
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Introduce `TypingMode::Codegen` to avoid layout cycles
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (34dd67f): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.4%, secondary 4.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.9%, secondary 4.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary -1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 469.562s -> 472.464s (0.62%) |
a35a84a
to
3f6e4db
Compare
@bors try @rust-timer queue
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Introduce `TypingMode::Codegen` to avoid layout cycles
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (4e9488c): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.7%, secondary 5.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary -1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 470.222s -> 472.094s (0.40%) |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #145469) made this pull request unmergeable. Please resolve the merge conflicts.
7bde1fe
to
bdb8bf2
Compare
The job x86_64-gnu-miri
failed! Check out the build log: (web) (plain enhanced) (plain)
Click to see the possible cause of the failure (guessed by this bot)
tests/fail/tree_borrows/reserved/int-protected-write.rs ... ok
tests/fail/tree_borrows/reserved/cell-protected-write.rs ... ok
FAILED TEST: tests/fail/layout_cycle.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-5icGRp" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/fail" "tests/fail/layout_cycle.rs" "--edition" "2021"
error: actual output differed from expected
Execute `./miri test --bless` to update `tests/fail/layout_cycle.stderr` to the actual output
--- tests/fail/layout_cycle.stderr
+++ <stderr output>
error[E0391]: cycle detected when computing layout of `S<S<()>>`
|
= note: ...which requires computing layout of `<S<()> as Tr>::I`...
= note: ...which again requires computing layout of `S<S<()>>`, completing the cycle
+ = note: cycle used when computing layout of `S<S<()>>`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
... 22 lines skipped ...
For more information about this error, try `rustc --explain E0391`.
Full unnormalized output:
error[E0391]: cycle detected when computing layout of `S<S<()>>`
|
= note: ...which requires computing layout of `<S<()> as Tr>::I`...
= note: ...which again requires computing layout of `S<S<()>>`, completing the cycle
= note: cycle used when computing layout of `S<S<()>>`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
error: post-monomorphization error: a cycle occurred during layout computation
##[error] --> /checkout/library/core/src/mem/mod.rs:335:5
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ post-monomorphization error occurred here
|
= note: BACKTRACE:
= note: inside `std::mem::size_of::<S<S<()>>>` at /checkout/library/core/src/mem/mod.rs:335:5: 335:31
note: inside `foo::<S<()>>`
--> tests/fail/layout_cycle.rs:23:5
|
LL | mem::size_of::<S<T>>()
| ^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
--> tests/fail/layout_cycle.rs:27:20
|
LL | println!("{}", foo::<S<()>>());
| ^^^^^^^^^^^^^^
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0391`.
full stderr:
error[E0391]: cycle detected when computing layout of `S<S<()>>`
|
= note: ...which requires computing layout of `<S<()> as Tr>::I`...
= note: ...which again requires computing layout of `S<S<()>>`, completing the cycle
= note: cycle used when computing layout of `S<S<()>>`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
error: post-monomorphization error: a cycle occurred during layout computation
##[error] --> /checkout/library/core/src/mem/mod.rs:335:5
|
LL | intrinsics::size_of::<T>()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ post-monomorphization error occurred here
|
= note: BACKTRACE:
= note: inside `std::mem::size_of::<S<S<()>>>` at /checkout/library/core/src/mem/mod.rs:335:5: 335:31
note: inside `foo::<S<()>>`
--> tests/fail/layout_cycle.rs:23:5
|
LL | mem::size_of::<S<T>>()
| ^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
--> tests/fail/layout_cycle.rs:27:20
|
LL | println!("{}", foo::<S<()>>());
| ^^^^^^^^^^^^^^
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: aborting due to 2 previous errors
---
Location:
/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ui_test-0.30.2/src/lib.rs:365
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: <color_eyre[cb5061225544f5ea]::config::EyreHook>::into_eyre_hook::{closure#0}<unknown>
at <unknown source file>:<unknown line>
2: eyre[ada77b62e15aacd9]::private::format_err<unknown>
at <unknown source file>:<unknown line>
3: ui_test[896b6ac6465d84c7]::run_tests_generic::<ui_test[896b6ac6465d84c7]::default_file_filter, ui[39799118c4203886]::run_tests::{closure#1}, alloc[325dcebcb1ca9745]::boxed::Box<dyn ui_test[896b6ac6465d84c7]::status_emitter::StatusEmitter>><unknown>
at <unknown source file>:<unknown line>
4: ui[39799118c4203886]::ui<unknown>
at <unknown source file>:<unknown line>
5: ui[39799118c4203886]::main<unknown>
at <unknown source file>:<unknown line>
6: std[dffd2cbf20fe557f]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[7a71f79551a57e0e]::result::Result<(), eyre[ada77b62e15aacd9]::Report>, core[7a71f79551a57e0e]::result::Result<(), eyre[ada77b62e15aacd9]::Report>><unknown>
at <unknown source file>:<unknown line>
7: std[dffd2cbf20fe557f]::rt::lang_start::<core[7a71f79551a57e0e]::result::Result<(), eyre[ada77b62e15aacd9]::Report>>::{closure#0}<unknown>
at <unknown source file>:<unknown line>
8: std[dffd2cbf20fe557f]::rt::lang_start_internal<unknown>
at <unknown source file>:<unknown line>
9: main<unknown>
at <unknown source file>:<unknown line>
10: __libc_start_main<unknown>
at <unknown source file>:<unknown line>
11: _start<unknown>
at <unknown source file>:<unknown line>
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test ui`
Caused by:
process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/ui-de637b1a885c82e4` (exit status: 1)
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo test --target x86_64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout --locked --color always --release --manifest-path /checkout/src/tools/miri/Cargo.toml -- [workdir=/checkout]` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:189:21
Executed at: src/bootstrap/src/core/build_steps/test.rs:644:19
Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test --stage 2 src/tools/miri src/tools/miri/cargo-miri`
Build completed unsuccessfully in 0:46:13
local time: Sat Aug 23 19:24:55 UTC 2025
network time: 2025年8月23日 19:24:55 GMT
##[error]Process completed with exit code 1.
☔ The latest upstream changes (presumably #145384) made this pull request unmergeable. Please resolve the merge conflicts.
r? @ghost