Skip to content
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

WIP Introduce ConstValue::ScalarPair #115915

Closed
wants to merge 3 commits into from

Conversation

cjgillot
Copy link
Contributor

Both the interpreter and codegen have dedicated paths for scalar pairs. Having one in ConstValue makes is able to represent all "immediate" values.

In order to mitigate the increase in the size of the ConstValue struct, a first commit interns it.

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2023

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 17, 2023
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 17, 2023
@bors
Copy link
Contributor

bors commented Sep 17, 2023

⌛ Trying commit b07c1b4 with merge ade2871...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2023
WIP Replace ConstValue::Slice by ConstValue::ScalarPair

Both the interpreter and codegen have dedicated paths for scalar pairs. Having one in ConstValue makes is able to represent all "immediate" values.

In order to mitigate the increase in the size of the ConstValue struct, a first commit interns it.
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 17, 2023

⌛ Trying commit e91604e with merge 5b77e18...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2023
WIP Replace ConstValue::Slice by ConstValue::ScalarPair

Both the interpreter and codegen have dedicated paths for scalar pairs. Having one in ConstValue makes is able to represent all "immediate" values.

In order to mitigate the increase in the size of the ConstValue struct, a first commit interns it.
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 17, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2023
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 17, 2023

⌛ Trying commit a8c8dea with merge f827ada...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2023
WIP Replace ConstValue::Slice by ConstValue::ScalarPair

Both the interpreter and codegen have dedicated paths for scalar pairs. Having one in ConstValue makes is able to represent all "immediate" values.

In order to mitigate the increase in the size of the ConstValue struct, a first commit interns it.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 17, 2023

☀️ Try build successful - checks-actions
Build commit: f827ada (f827ada2a4e577838d39570f4ee84e2bfe45c172)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f827ada): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.4%, 1.2%] 2
Regressions ❌
(secondary)
2.4% [0.2%, 12.7%] 15
Improvements ✅
(primary)
-0.5% [-0.6%, -0.5%] 2
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) 0.1% [-0.6%, 1.2%] 4

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.2% [1.8%, 14.8%] 14
Improvements ✅
(primary)
-3.0% [-3.2%, -2.8%] 3
Improvements ✅
(secondary)
-4.4% [-9.9%, -1.4%] 25
All ❌✅ (primary) -3.0% [-3.2%, -2.8%] 3

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
7.5% [3.0%, 29.8%] 17
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.8%, -3.8%] 6
All ❌✅ (primary) - - 0

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 0.6%] 43
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.0%, 0.6%] 43

Bootstrap: 636.351s -> 636.345s (-0.00%)
Artifact size: 318.44 MiB -> 318.48 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 17, 2023
@cjgillot cjgillot changed the title WIP Replace ConstValue::Slice by ConstValue::ScalarPair WIP Introduce ConstValue::ScalarPair Sep 17, 2023
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 17, 2023
@bors
Copy link
Contributor

bors commented Sep 17, 2023

⌛ Trying commit a255de8 with merge 1b3ed3e...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2023
WIP Introduce ConstValue::ScalarPair

Both the interpreter and codegen have dedicated paths for scalar pairs. Having one in ConstValue makes is able to represent all "immediate" values.

In order to mitigate the increase in the size of the ConstValue struct, a first commit interns it.
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=cjgillot
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_8e80109e-7da9-42ec-9066-625957e14f37
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=e39b5541545156ab2497408af708690ed094ea34
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_8e80109e-7da9-42ec-9066-625957e14f37
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_8e80109e-7da9-42ec-9066-625957e14f37
GITHUB_TRIGGERING_ACTOR=cjgillot
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/115915/merge
GITHUB_WORKFLOW_SHA=e39b5541545156ab2497408af708690ed094ea34
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_18_X64=/opt/hostedtoolcache/go/1.18.10/x64
---
tests/ui/manual_strip.rs FAILED:
command: CLIPPY_CONF_DIR="/checkout/src/tools/clippy/tests" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-f6e1eb189b211467.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-75959e315c9ff2fe.rlib" "--extern=derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-cf1fe18d496b0b3a.so" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-ff96843d80cd8d4a.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-08c5e3ddca11c9d5.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9aed67eaa870cd55.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-0d09972064e7da7b.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-5afd1bb919dc4480.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-5aefc6c5bb8b6fc1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-9a3b80bce0dc30d0.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-a7b2e5101e0f873f.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-7a72a9ecddcd16d5.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b072c5f1d078f0c8.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test" "tests/ui/manual_strip.rs" "--edition" "2021"

actual output differed from expected
Execute `cargo uibless` to update `tests/ui/manual_strip.stderr` to the actual output
--- tests/ui/manual_strip.stderr
 error: stripping a prefix manually
   --> $DIR/manual_strip.rs:7:24
... 78 lines skipped ...
    |
    |
 
thread 'main' panicked at src/tools/clippy/tests/compile-test.rs:187:6:
called `Result::unwrap()` on an `Err` value: tests failed
-error: stripping a prefix manually
##[error]+error: internal compiler error: compiler/rustc_middle/src/mir/interpret/value.rs:202:17: `try_get_slice_bytes` on non-slice constant
Location:
    /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.20.0/src/lib.rs:362:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test compile-test`
error: test failed, to rerun pass `--test compile-test`
 
-error: stripping a prefix manually
+thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1651:9:
-  --> $DIR/manual_strip.rs:49:24
+Box<dyn Any>
-   |
+stack backtrace:
-LL |         str::to_string(&TARGET[prefix.len()..]);
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^
+   1:     0x7f9832ecd4a7 - core::fmt::write::hcef150d106485850
-   |
+   2:     0x7f9832e546f5 - std::io::Write::write_fmt::hacf79126fbd3f4e3
+   2:     0x7f9832e546f5 - std::io::Write::write_fmt::hacf79126fbd3f4e3
-note: the prefix was tested here
+   3:     0x7f9832e606b4 - std::sys_common::backtrace::print::hd139263e5040ed4e
-  --> $DIR/manual_strip.rs:48:5
+   4:     0x7f9832e63b4f - std::panicking::panic_hook_with_disk_dump::{{closure}}::h022e991f489106d5
-   |
+   5:     0x7f9832e6386c - std::panicking::panic_hook_with_disk_dump::h24fdc557c10d6abf
-LL |     if TARGET.starts_with(prefix) {
+   6:     0x7f9833aba890 - rustc_driver_impl[86da527d19563f01]::install_ice_hook::{closure#0}
+   7:     0x7f9832e6431c - std::panicking::rust_panic_with_hook::ha7e459ebc5a9ef3c
-help: try using the `strip_prefix` method
-help: try using the `strip_prefix` method
+   8:     0x7f983693b2f6 - std[4eefe5286562bb6b]::panicking::begin_panic::<rustc_errors[5c6564bb40596ae4]::ExplicitBug>::{closure#0}
-   |
+   9:     0x7f9836928a86 - std[4eefe5286562bb6b]::sys_common::backtrace::__rust_end_short_backtrace::<std[4eefe5286562bb6b]::panicking::begin_panic<rustc_errors[5c6564bb40596ae4]::ExplicitBug>::{closure#0}, !>
-LL ~     if let Some(<stripped>) = TARGET.strip_prefix(prefix) {
+  10:     0x7f9833a1e046 - std[4eefe5286562bb6b]::panicking::begin_panic::<rustc_errors[5c6564bb40596ae4]::ExplicitBug>
-LL ~         str::to_string(<stripped>);
+  11:     0x7f983697e307 - <rustc_errors[5c6564bb40596ae4]::HandlerInner>::bug::<alloc[d16a71c072250b05]::string::String>
-   |
+  12:     0x7f983697e1a9 - <rustc_errors[5c6564bb40596ae4]::Handler>::bug::<alloc[d16a71c072250b05]::string::String>
-error: stripping a prefix manually
-error: stripping a prefix manually
+note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
-error: stripping a prefix manually
-error: stripping a prefix manually
+warning: the ICE couldn't be written to `/checkout/src/tools/clippy/rustc-ice-2023-09-17T21:01:44.329890735Z-36213.txt`: Read-only file system (os error 30)
-error: aborting due to 8 previous errors
+note: rustc 1.74.0-nightly (e39b55415 2023-09-17) running on x86_64-unknown-linux-gnu
 
+note: compiler flags: -Z ui-testing
---
+error: aborting due to 5 previous errors
+


error: substring `stripping a prefix manually` not found in stderr output
   |
   |
42 |         //~^ ERROR: stripping a prefix manually
   |


error: substring `stripping a prefix manually` not found in stderr output
   |
   |
50 |         //~^ ERROR: stripping a prefix manually
   |


error: substring `stripping a prefix manually` not found in stderr output
   |
   |
57 |         //~^ ERROR: stripping a prefix manually
   |


error: substring `stripping a prefix manually` not found in stderr output
   |
   |
88 |         //~^ ERROR: stripping a prefix manually
   |

full stderr:
error: stripping a prefix manually
error: stripping a prefix manually
##[error]  --> tests/ui/manual_strip.rs:7:24
   |
LL |         str::to_string(&s["ab".len()..]);
   |
note: the prefix was tested here
  --> tests/ui/manual_strip.rs:6:5
   |
   |
LL |     if s.starts_with("ab") {
   = note: `-D clippy::manual-strip` implied by `-D warnings`
   = note: `-D clippy::manual-strip` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_strip)]`
help: try using the `strip_prefix` method
   |
LL ~     if let Some(<stripped>) = s.strip_prefix("ab") {
LL ~         str::to_string(<stripped>);
LL |
LL ~         <stripped>.to_string();
LL | 
LL ~         str::to_string(<stripped>);
LL ~         <stripped>.to_string();

error: stripping a suffix manually
##[error]  --> tests/ui/manual_strip.rs:16:24
   |
   |
LL |         str::to_string(&s[..s.len() - "bc".len()]);
   |
note: the suffix was tested here
  --> tests/ui/manual_strip.rs:15:5
   |
   |
LL |     if s.ends_with("bc") {
help: try using the `strip_suffix` method
   |
   |
LL ~     if let Some(<stripped>) = s.strip_suffix("bc") {
LL ~         str::to_string(<stripped>);
LL |
LL ~         <stripped>.to_string();
LL | 
LL ~         str::to_string(<stripped>);
LL ~         <stripped>.to_string();

error: stripping a prefix manually
##[error]  --> tests/ui/manual_strip.rs:26:24
   |
   |
LL |         str::to_string(&s[1..]);
   |
note: the prefix was tested here
  --> tests/ui/manual_strip.rs:25:5
   |
   |
LL |     if s.starts_with('a') {
help: try using the `strip_prefix` method
   |
   |
LL ~     if let Some(<stripped>) = s.strip_prefix('a') {
LL ~         str::to_string(<stripped>);
LL |
LL ~         <stripped>.to_string();

error: stripping a prefix manually
##[error]  --> tests/ui/manual_strip.rs:34:24
   |
   |
LL |         str::to_string(&s[prefix.len()..]);
   |
note: the prefix was tested here
  --> tests/ui/manual_strip.rs:33:5
   |
   |
LL |     if s.starts_with(prefix) {
help: try using the `strip_prefix` method
   |
   |
LL ~     if let Some(<stripped>) = s.strip_prefix(prefix) {
LL ~         str::to_string(<stripped>);

##[error]error: internal compiler error: compiler/rustc_middle/src/mir/interpret/value.rs:202:17: `try_get_slice_bytes` on non-slice constant

thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1651:9:
thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1651:9:
Box<dyn Any>
stack backtrace:
   0:     0x7f9832e608cc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h385b13f8d75d969a
   1:     0x7f9832ecd4a7 - core::fmt::write::hcef150d106485850
   2:     0x7f9832e546f5 - std::io::Write::write_fmt::hacf79126fbd3f4e3
   3:     0x7f9832e606b4 - std::sys_common::backtrace::print::hd139263e5040ed4e
   4:     0x7f9832e63b4f - std::panicking::panic_hook_with_disk_dump::{{closure}}::h022e991f489106d5
   5:     0x7f9832e6386c - std::panicking::panic_hook_with_disk_dump::h24fdc557c10d6abf
   6:     0x7f9833aba890 - rustc_driver_impl[86da527d19563f01]::install_ice_hook::{closure#0}
   7:     0x7f9832e6431c - std::panicking::rust_panic_with_hook::ha7e459ebc5a9ef3c
   8:     0x7f983693b2f6 - std[4eefe5286562bb6b]::panicking::begin_panic::<rustc_errors[5c6564bb40596ae4]::ExplicitBug>::{closure#0}
   9:     0x7f9836928a86 - std[4eefe5286562bb6b]::sys_common::backtrace::__rust_end_short_backtrace::<std[4eefe5286562bb6b]::panicking::begin_panic<rustc_errors[5c6564bb40596ae4]::ExplicitBug>::{closure#0}, !>
  10:     0x7f9833a1e046 - std[4eefe5286562bb6b]::panicking::begin_panic::<rustc_errors[5c6564bb40596ae4]::ExplicitBug>
  11:     0x7f983697e307 - <rustc_errors[5c6564bb40596ae4]::HandlerInner>::bug::<alloc[d16a71c072250b05]::string::String>
  12:     0x7f983697e1a9 - <rustc_errors[5c6564bb40596ae4]::Handler>::bug::<alloc[d16a71c072250b05]::string::String>
  14:     0x7f9836a5987c - rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_opt::<rustc_middle[1dfaf9182ebf16c3]::util::bug::opt_span_bug_fmt<rustc_span[d2fa94cd69a0b05e]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7f9836a5987c - rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_opt::<rustc_middle[1dfaf9182ebf16c3]::util::bug::opt_span_bug_fmt<rustc_span[d2fa94cd69a0b05e]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:     0x7f9836a59025 - rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_context_opt::<rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_opt<rustc_middle[1dfaf9182ebf16c3]::util::bug::opt_span_bug_fmt<rustc_span[d2fa94cd69a0b05e]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  17:     0x7f9836a4f45d - <rustc_middle[1dfaf9182ebf16c3]::mir::interpret::value::ConstValue>::try_get_slice_bytes_for_diagnostics
  18:     0x5638ae8e82c2 - clippy_utils[4732b0d0bf0f4d4a]::consts::miri_to_const
  19:     0x5638ae8e6da4 - <clippy_utils[4732b0d0bf0f4d4a]::consts::ConstEvalLateContext>::expr
  19:     0x5638ae8e6da4 - <clippy_utils[4732b0d0bf0f4d4a]::consts::ConstEvalLateContext>::expr
  20:     0x5638ae8d8a55 - <clippy_utils[4732b0d0bf0f4d4a]::hir_utils::HirEqInterExpr>::eq_expr
  21:     0x5638ae8dbbf7 - clippy_utils[4732b0d0bf0f4d4a]::hir_utils::eq_expr_value
  22:     0x5638ae4f3acb - <clippy_lints[2934bc846dd61370]::manual_strip::find_stripping::StrippingFinder as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_expr
  23:     0x5638ae74aacd - rustc_hir[3ef26d66c173b93c]::intravisit::walk_expr::<clippy_lints[2934bc846dd61370]::manual_strip::find_stripping::StrippingFinder>
  24:     0x5638ae74ad0a - rustc_hir[3ef26d66c173b93c]::intravisit::walk_expr::<clippy_lints[2934bc846dd61370]::manual_strip::find_stripping::StrippingFinder>
  25:     0x5638ae4f3923 - clippy_lints[2934bc846dd61370]::manual_strip::find_stripping
  26:     0x5638ae4f348f - <clippy_lints[2934bc846dd61370]::manual_strip::ManualStrip as rustc_lint[c664e53a80c96c0b]::passes::LateLintPass>::check_expr
  27:     0x7f98362bbdb3 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_expr::{closure#0}
  28:     0x7f98362bc989 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_stmt
  29:     0x7f98362c3edc - rustc_hir[3ef26d66c173b93c]::intravisit::walk_block::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  30:     0x7f98362d25d6 - rustc_hir[3ef26d66c173b93c]::intravisit::walk_expr::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  31:     0x7f98362bbdc7 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_expr::{closure#0}
  32:     0x7f98362d1e0f - rustc_hir[3ef26d66c173b93c]::intravisit::walk_body::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  33:     0x7f98362ba395 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_nested_body
  34:     0x7f98362d4c48 - rustc_hir[3ef26d66c173b93c]::intravisit::walk_item::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  35:     0x7f98362b2415 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_nested_item
  36:     0x7f98362b14fc - <core[d252deeaa14cf837]::panic::unwind_safe::AssertUnwindSafe<rustc_lint[c664e53a80c96c0b]::late::check_crate::{closure#0}> as core[d252deeaa14cf837]::ops::function::FnOnce<()>>::call_once
  37:     0x7f98362dcdc3 - rustc_data_structures[a3521702772f2f44]::sync::parallel::disabled::join::<rustc_lint[c664e53a80c96c0b]::late::check_crate::{closure#0}, rustc_lint[c664e53a80c96c0b]::late::check_crate::{closure#1}, (), ()>
  38:     0x7f98362c1d60 - rustc_lint[c664e53a80c96c0b]::late::check_crate
  39:     0x7f9833d11487 - <rustc_session[ce7e456a01059aa6]::session::Session>::time::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}::{closure#0}::{closure#2}::{closure#0}>
  40:     0x7f9833cfdd3b - <rustc_data_structures[a3521702772f2f44]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}::{closure#0}::{closure#2}>
  41:     0x7f9833cbd41f - <core[d252deeaa14cf837]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}> as core[d252deeaa14cf837]::ops::function::FnOnce<()>>::call_once
  42:     0x7f9833cfe57c - <rustc_data_structures[a3521702772f2f44]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}>
  43:     0x7f9833d12949 - <rustc_session[ce7e456a01059aa6]::session::Session>::time::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}>
  44:     0x7f9833ce1501 - rustc_interface[ed34ba9701d89baa]::passes::analysis
  45:     0x7f98355b7be5 - rustc_query_impl[dcd7c727611cfc64]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dcd7c727611cfc64]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1dfaf9182ebf16c3]::query::erase::Erased<[u8; 1usize]>>
  46:     0x7f98356cd5c5 - <rustc_query_impl[dcd7c727611cfc64]::query_impl::analysis::dynamic_query::{closure#2} as core[d252deeaa14cf837]::ops::function::FnOnce<(rustc_middle[1dfaf9182ebf16c3]::ty::context::TyCtxt, ())>>::call_once
  47:     0x7f98358b5e2e - rustc_query_system[109596352755400c]::query::plumbing::try_execute_query::<rustc_query_impl[dcd7c727611cfc64]::DynamicConfig<rustc_query_system[109596352755400c]::query::caches::SingleCache<rustc_middle[1dfaf9182ebf16c3]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[dcd7c727611cfc64]::plumbing::QueryCtxt, false>
  48:     0x7f983578c341 - rustc_query_impl[dcd7c727611cfc64]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  49:     0x7f9833ac8412 - <rustc_middle[1dfaf9182ebf16c3]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}::{closure#2}::{closure#6}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>
  50:     0x7f9833ad8d35 - <scoped_tls[213fb574df523243]::ScopedKey<rustc_span[d2fa94cd69a0b05e]::SessionGlobals>>::set::<rustc_interface[ed34ba9701d89baa]::interface::run_compiler<core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>, rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}>::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>
  51:     0x7f9833b1b429 - std[4eefe5286562bb6b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[ed34ba9701d89baa]::util::run_in_thread_with_globals<rustc_interface[ed34ba9701d89baa]::interface::run_compiler<core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>, rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}>::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>
  52:     0x7f9833b1b86b - <<std[4eefe5286562bb6b]::thread::Builder>::spawn_unchecked_<rustc_interface[ed34ba9701d89baa]::util::run_in_thread_with_globals<rustc_interface[ed34ba9701d89baa]::interface::run_compiler<core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>, rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}>::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>::{closure#1} as core[d252deeaa14cf837]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  54:     0x7f9832b02b43 - <unknown>
  55:     0x7f9832b94a00 - <unknown>
  56:                0x0 - <unknown>


note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

warning: the ICE couldn't be written to `/checkout/src/tools/clippy/rustc-ice-2023-09-17T21:01:44.329890735Z-36213.txt`: Read-only file system (os error 30)
note: rustc 1.74.0-nightly (e39b55415 2023-09-17) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z ui-testing

---
tests/ui/regex.rs FAILED:
command: CLIPPY_CONF_DIR="/checkout/src/tools/clippy/tests" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-f6e1eb189b211467.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-75959e315c9ff2fe.rlib" "--extern=derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-cf1fe18d496b0b3a.so" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-ff96843d80cd8d4a.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-08c5e3ddca11c9d5.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9aed67eaa870cd55.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-0d09972064e7da7b.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-5afd1bb919dc4480.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-5aefc6c5bb8b6fc1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-9a3b80bce0dc30d0.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-a7b2e5101e0f873f.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-7a72a9ecddcd16d5.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b072c5f1d078f0c8.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test" "tests/ui/regex.rs" "--edition" "2021"

actual output differed from expected
Execute `cargo uibless` to update `tests/ui/regex.stderr` to the actual output
--- tests/ui/regex.stderr
 error: trivial regex
   --> $DIR/regex.rs:18:45
... 29 lines skipped ...
    |                                     ^^^
    |                                     ^^^
 
-error: regex parse error:
##[error]+error: internal compiler error: compiler/rustc_middle/src/mir/interpret/value.rs:202:17: `try_get_slice_bytes` on non-slice constant
-error: trivial regex
+thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1651:9:
-  --> $DIR/regex.rs:30:53
+Box<dyn Any>
+Box<dyn Any>
-   |
+stack backtrace:
-LL |     let binary_pipe_in_wrong_position = BRegex::new("|");
-   |                                                     ^^^
+   1:     0x7fef6c1f34a7 - core::fmt::write::hcef150d106485850
-   |
+   2:     0x7fef6c17a6f5 - std::io::Write::write_fmt::hacf79126fbd3f4e3
+   2:     0x7fef6c17a6f5 - std::io::Write::write_fmt::hacf79126fbd3f4e3
-   = help: the regex is unlikely to be useful as it is
+   3:     0x7fef6c1866b4 - std::sys_common::backtrace::print::hd139263e5040ed4e
 
-error: regex parse error:
+note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
-error: regex parse error:
-error: regex parse error:
+warning: the ICE couldn't be written to `/checkout/src/tools/clippy/rustc-ice-2023-09-17T21:01:45.996155826Z-37113.txt`: Read-only file system (os error 30)
-error: regex parse error:
+note: rustc 1.74.0-nightly (e39b55415 2023-09-17) running on x86_64-unknown-linux-gnu
 
-error: regex parse error:
---
+end of query stack
-       error: unrecognized escape sequence
+note: Clippy version: clippy 0.1.74 (e39b5541 2023-09-17)
 
-error: regex syntax error: duplicate flag
 
 
-error: regex syntax error: pattern can match invalid UTF-8
-   |
-   |
-LL |     let invalid_utf8_should_lint = Regex::new("(?-u).");
-
-error: trivial regex
-  --> $DIR/regex.rs:66:33
-   |
-   |
-LL |     let trivial_eq = Regex::new("^foobar$");
-   |
-   |
-   = help: consider using `==` on `str`s
-error: trivial regex
-  --> $DIR/regex.rs:69:48
-   |
-   |
-LL |     let trivial_eq_builder = RegexBuilder::new("^foobar$");
-   |
-   |
-   = help: consider using `==` on `str`s
-error: trivial regex
-  --> $DIR/regex.rs:72:42
-   |
-   |
-LL |     let trivial_starts_with = Regex::new("^foobar");
-   |
-   = help: consider using `str::starts_with`
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:75:40
-   |
-LL |     let trivial_ends_with = Regex::new("foobar$");
-   |
-   = help: consider using `str::ends_with`
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:78:39
-   |
-LL |     let trivial_contains = Regex::new("foobar");
-   |
-   = help: consider using `str::contains`
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:81:39
-   |
-LL |     let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
-   |
-   = help: consider using `str::contains`
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:84:40
-   |
-LL |     let trivial_backslash = Regex::new("a\\.b");
-   |
-   = help: consider using `str::contains`
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:88:36
-   |
-LL |     let trivial_empty = Regex::new("");
-   |
-   = help: the regex is unlikely to be useful as it is
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:91:36
-   |
-LL |     let trivial_empty = Regex::new("^");
-   |
-   = help: the regex is unlikely to be useful as it is
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:94:36
-   |
-LL |     let trivial_empty = Regex::new("^$");
-   |
-   = help: consider using `str::is_empty`
-
-error: trivial regex
-error: trivial regex
-  --> $DIR/regex.rs:97:44
-   |
-LL |     let binary_trivial_empty = BRegex::new("^$");
-   |
-   = help: consider using `str::is_empty`
-
-error: aborting due to 24 previous errors
-error: aborting due to 24 previous errors
-


error: substring `trivial regex` not found in stderr output
   |
   |
31 |     //~^ ERROR: trivial regex
   |


error: substring `regex syntax error: duplicate flag` not found in stderr output
   |
   |
56 |     //~^ ERROR: regex syntax error: duplicate flag
   |


error: substring `regex syntax error: pattern can match invalid UTF-8` not found in stderr output
   |
   |
62 |     //~^ ERROR: regex syntax error: pattern can match invalid UTF-8
   |


error: substring `trivial regex` not found in stderr output
   |
   |
67 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
70 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
73 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
76 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
79 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
82 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
85 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
89 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
92 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
95 |     //~^ ERROR: trivial regex
   |


error: substring `trivial regex` not found in stderr output
   |
   |
98 |     //~^ ERROR: trivial regex
   |

full stderr:
error: trivial regex
error: trivial regex
##[error]  --> tests/ui/regex.rs:18:45
   |
LL |     let pipe_in_wrong_position = Regex::new("|");
   |
   = help: the regex is unlikely to be useful as it is
   = note: `-D clippy::trivial-regex` implied by `-D warnings`
   = note: `-D clippy::trivial-regex` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::trivial_regex)]`
error: trivial regex
##[error]  --> tests/ui/regex.rs:20:60
   |
   |
LL |     let pipe_in_wrong_position_builder = RegexBuilder::new("|");
   |
   = help: the regex is unlikely to be useful as it is


error: regex syntax error: invalid character class range, the start must be <= the end
   |
   |
LL |     let wrong_char_ranice = Regex::new("[z-a]");
   |
   = note: `-D clippy::invalid-regex` implied by `-D warnings`
   = note: `-D clippy::invalid-regex` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::invalid_regex)]`

error: regex syntax error: invalid character class range, the start must be <= the end
   |
   |
LL |     let some_unicode = Regex::new("[é-è]");

##[error]error: internal compiler error: compiler/rustc_middle/src/mir/interpret/value.rs:202:17: `try_get_slice_bytes` on non-slice constant

thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1651:9:
thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1651:9:
Box<dyn Any>
stack backtrace:
   0:     0x7fef6c1868cc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h385b13f8d75d969a
   1:     0x7fef6c1f34a7 - core::fmt::write::hcef150d106485850
   2:     0x7fef6c17a6f5 - std::io::Write::write_fmt::hacf79126fbd3f4e3
   3:     0x7fef6c1866b4 - std::sys_common::backtrace::print::hd139263e5040ed4e
   4:     0x7fef6c189b4f - std::panicking::panic_hook_with_disk_dump::{{closure}}::h022e991f489106d5
   5:     0x7fef6c18986c - std::panicking::panic_hook_with_disk_dump::h24fdc557c10d6abf
   6:     0x7fef6cde0890 - rustc_driver_impl[86da527d19563f01]::install_ice_hook::{closure#0}
   7:     0x7fef6c18a31c - std::panicking::rust_panic_with_hook::ha7e459ebc5a9ef3c
   8:     0x7fef6fc612f6 - std[4eefe5286562bb6b]::panicking::begin_panic::<rustc_errors[5c6564bb40596ae4]::ExplicitBug>::{closure#0}
   9:     0x7fef6fc4ea86 - std[4eefe5286562bb6b]::sys_common::backtrace::__rust_end_short_backtrace::<std[4eefe5286562bb6b]::panicking::begin_panic<rustc_errors[5c6564bb40596ae4]::ExplicitBug>::{closure#0}, !>
  10:     0x7fef6cd44046 - std[4eefe5286562bb6b]::panicking::begin_panic::<rustc_errors[5c6564bb40596ae4]::ExplicitBug>
  11:     0x7fef6fca4307 - <rustc_errors[5c6564bb40596ae4]::HandlerInner>::bug::<alloc[d16a71c072250b05]::string::String>
  12:     0x7fef6fca41a9 - <rustc_errors[5c6564bb40596ae4]::Handler>::bug::<alloc[d16a71c072250b05]::string::String>
  14:     0x7fef6fd7f87c - rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_opt::<rustc_middle[1dfaf9182ebf16c3]::util::bug::opt_span_bug_fmt<rustc_span[d2fa94cd69a0b05e]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7fef6fd7f87c - rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_opt::<rustc_middle[1dfaf9182ebf16c3]::util::bug::opt_span_bug_fmt<rustc_span[d2fa94cd69a0b05e]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:     0x7fef6fd7f025 - rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_context_opt::<rustc_middle[1dfaf9182ebf16c3]::ty::context::tls::with_opt<rustc_middle[1dfaf9182ebf16c3]::util::bug::opt_span_bug_fmt<rustc_span[d2fa94cd69a0b05e]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  17:     0x7fef6fd7545d - <rustc_middle[1dfaf9182ebf16c3]::mir::interpret::value::ConstValue>::try_get_slice_bytes_for_diagnostics
  18:     0x563ed8eec2c2 - clippy_utils[4732b0d0bf0f4d4a]::consts::miri_to_const
  19:     0x563ed8eeada4 - <clippy_utils[4732b0d0bf0f4d4a]::consts::ConstEvalLateContext>::expr
  20:     0x563ed8ee9b8a - clippy_utils[4732b0d0bf0f4d4a]::consts::constant
  20:     0x563ed8ee9b8a - clippy_utils[4732b0d0bf0f4d4a]::consts::constant
  21:     0x563ed8c6d6e4 - clippy_lints[2934bc846dd61370]::regex::check_regex
  22:     0x563ed8c6cc17 - <clippy_lints[2934bc846dd61370]::regex::Regex as rustc_lint[c664e53a80c96c0b]::passes::LateLintPass>::check_expr
  23:     0x7fef6f5e1db3 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_expr::{closure#0}
  24:     0x7fef6f5e4c18 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_local
  25:     0x7fef6f5e299f - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_stmt
  26:     0x7fef6f5e9edc - rustc_hir[3ef26d66c173b93c]::intravisit::walk_block::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  27:     0x7fef6f5f85d6 - rustc_hir[3ef26d66c173b93c]::intravisit::walk_expr::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  28:     0x7fef6f5e1dc7 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_expr::{closure#0}
  29:     0x7fef6f5f7e0f - rustc_hir[3ef26d66c173b93c]::intravisit::walk_body::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  30:     0x7fef6f5e0395 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_nested_body
  31:     0x7fef6f5fac48 - rustc_hir[3ef26d66c173b93c]::intravisit::walk_item::<rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass>>
  32:     0x7fef6f5d8415 - <rustc_lint[c664e53a80c96c0b]::late::LateContextAndPass<rustc_lint[c664e53a80c96c0b]::late::RuntimeCombinedLateLintPass> as rustc_hir[3ef26d66c173b93c]::intravisit::Visitor>::visit_nested_item
  33:     0x7fef6f5d74fc - <core[d252deeaa14cf837]::panic::unwind_safe::AssertUnwindSafe<rustc_lint[c664e53a80c96c0b]::late::check_crate::{closure#0}> as core[d252deeaa14cf837]::ops::function::FnOnce<()>>::call_once
  34:     0x7fef6f602dc3 - rustc_data_structures[a3521702772f2f44]::sync::parallel::disabled::join::<rustc_lint[c664e53a80c96c0b]::late::check_crate::{closure#0}, rustc_lint[c664e53a80c96c0b]::late::check_crate::{closure#1}, (), ()>
  35:     0x7fef6f5e7d60 - rustc_lint[c664e53a80c96c0b]::late::check_crate
  36:     0x7fef6d037487 - <rustc_session[ce7e456a01059aa6]::session::Session>::time::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}::{closure#0}::{closure#2}::{closure#0}>
  37:     0x7fef6d023d3b - <rustc_data_structures[a3521702772f2f44]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}::{closure#0}::{closure#2}>
  38:     0x7fef6cfe341f - <core[d252deeaa14cf837]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}> as core[d252deeaa14cf837]::ops::function::FnOnce<()>>::call_once
  39:     0x7fef6d02457c - <rustc_data_structures[a3521702772f2f44]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}::{closure#1}::{closure#0}>
  40:     0x7fef6d038949 - <rustc_session[ce7e456a01059aa6]::session::Session>::time::<(), rustc_interface[ed34ba9701d89baa]::passes::analysis::{closure#6}>
  41:     0x7fef6d007501 - rustc_interface[ed34ba9701d89baa]::passes::analysis
  42:     0x7fef6e8ddbe5 - rustc_query_impl[dcd7c727611cfc64]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[dcd7c727611cfc64]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1dfaf9182ebf16c3]::query::erase::Erased<[u8; 1usize]>>
  43:     0x7fef6e9f35c5 - <rustc_query_impl[dcd7c727611cfc64]::query_impl::analysis::dynamic_query::{closure#2} as core[d252deeaa14cf837]::ops::function::FnOnce<(rustc_middle[1dfaf9182ebf16c3]::ty::context::TyCtxt, ())>>::call_once
  44:     0x7fef6ebdbe2e - rustc_query_system[109596352755400c]::query::plumbing::try_execute_query::<rustc_query_impl[dcd7c727611cfc64]::DynamicConfig<rustc_query_system[109596352755400c]::query::caches::SingleCache<rustc_middle[1dfaf9182ebf16c3]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[dcd7c727611cfc64]::plumbing::QueryCtxt, false>
  45:     0x7fef6eab2341 - rustc_query_impl[dcd7c727611cfc64]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  46:     0x7fef6cdee412 - <rustc_middle[1dfaf9182ebf16c3]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}::{closure#2}::{closure#6}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>
  47:     0x7fef6cdfed35 - <scoped_tls[213fb574df523243]::ScopedKey<rustc_span[d2fa94cd69a0b05e]::SessionGlobals>>::set::<rustc_interface[ed34ba9701d89baa]::interface::run_compiler<core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>, rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}>::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>
  48:     0x7fef6ce41429 - std[4eefe5286562bb6b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[ed34ba9701d89baa]::util::run_in_thread_with_globals<rustc_interface[ed34ba9701d89baa]::interface::run_compiler<core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>, rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}>::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>
  49:     0x7fef6ce4186b - <<std[4eefe5286562bb6b]::thread::Builder>::spawn_unchecked_<rustc_interface[ed34ba9701d89baa]::util::run_in_thread_with_globals<rustc_interface[ed34ba9701d89baa]::interface::run_compiler<core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>, rustc_driver_impl[86da527d19563f01]::run_compiler::{closure#1}>::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d252deeaa14cf837]::result::Result<(), rustc_span[d2fa94cd69a0b05e]::ErrorGuaranteed>>::{closure#1} as core[d252deeaa14cf837]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  51:     0x7fef6be28b43 - <unknown>
  52:     0x7fef6bebaa00 - <unknown>
  53:                0x0 - <unknown>


note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

warning: the ICE couldn't be written to `/checkout/src/tools/clippy/rustc-ice-2023-09-17T21:01:45.996155826Z-37113.txt`: Read-only file system (os error 30)
note: rustc 1.74.0-nightly (e39b55415 2023-09-17) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z ui-testing

@bors
Copy link
Contributor

bors commented Sep 17, 2023

☀️ Try build successful - checks-actions
Build commit: 1b3ed3e (1b3ed3e27bc00fdfbb50d763367efb036537cfce)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1b3ed3e): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.2%, 1.0%] 5
Improvements ✅
(primary)
-0.5% [-0.6%, -0.4%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-0.6%, -0.4%] 3

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
4.0% [2.7%, 5.5%] 5
Improvements ✅
(primary)
-3.9% [-3.9%, -3.9%] 1
Improvements ✅
(secondary)
-2.4% [-7.0%, -1.0%] 22
All ❌✅ (primary) -0.7% [-3.9%, 2.5%] 2

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.5% [2.6%, 5.2%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-3.1%, -2.3%] 6
All ❌✅ (primary) - - 0

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 1

Bootstrap: 634.064s -> 635.805s (0.27%)
Artifact size: 318.47 MiB -> 318.52 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 17, 2023
@RalfJung
Copy link
Member

RalfJung commented Sep 18, 2023

We had ConstValue::ScalarPair many years ago and got rid of it. I see no reason to bring it back. ConstValue and interpret::Operand are different types for different purposes and trying to get them to have the same shape is IMO misguided.

I have laid down my vision for how ConstValue should be changed in #115877.

/// Represents a constant value in Rust. `Scalar` and `Slice` are optimizations for
/// array length computations, enum discriminants and the pattern matching logic.
#[derive(Copy, Clone, Debug, Eq, PartialEq, TyEncodable, TyDecodable, Hash)]
#[derive(HashStable, Lift)]
pub enum ConstValue<'tcx> {
pub enum ConstValueKind<'tcx> {
/// Used for types with `layout::abi::Scalar` ABI.
///
/// Not using the enum `Value` to encode that this must not be `Uninit`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder which enum this refers to... I think it's just a very outdated comment.^^

@@ -50,7 +57,7 @@ pub enum ConstValue<'tcx> {

/// A value not representable by the other variants; needs to be stored in-memory.
///
/// Must *not* be used for scalars or ZST, but having `&str` or other slices in this variant is fine.
/// Must *not* be used for scalars, scalar pairs or ZST.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your const_to_op violates this rule for scalar pairs. Either the comment or const_to_op need to be updated.

@@ -65,35 +72,48 @@ pub enum ConstValue<'tcx> {
}

#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
static_assert_size!(ConstValue<'_>, 32);
static_assert_size!(ConstValue<'_>, 8);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't seem like a useful assertion, it's an interned pointer now...

/// Used for types with `layout::abi::ScalarPair` ABI.
///
/// Not using the enum `Value` to encode that this must not be `Uninit`.
ScalarPair(Scalar, Scalar),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely don't want to have ScalarPair and Slice. Why would that make sense?

@Dylan-DPC
Copy link
Member

Closing this as it is WIP and heavily bitrotted

@Dylan-DPC Dylan-DPC closed this Nov 7, 2023
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants