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

Implement pattern types as the backing logic of rustc_scalar_valid_range attributes #107299

Closed
wants to merge 10 commits into from

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 25, 2023

Alternative to #103724

Some explanation of the three alternatives can be found on my blog

r? @BoxyUwU

cc @joshtriplett

This PR causes fields of types that use rustc_scalar_valid_range to be of a new TyKind: the Pat kind which at present has a nested type and a u128 range of valid values. This represents the status quo exactly, but before I rip out the old attribute checks and implement them on top of pattern types, I wanted to open this PR for discussion.

For now I added an inherently unsafe way to construct these types: you cast an arbitrary other type to them. So initializing NonNull works similar to NonNull { pointer: some_raw_ptr as _ }. The underscore figures our the right type, as right now there is no user visible syntax for these types.

As a next step I would like to remove the cast and instead implement it so that initialization of NonNull works like

match some_value {
    value @ 1.. => Some(NonZeroU8 { value }),
    _ => None,
}

where we teach pattern matching that the type of pointer is one of the new pattern types. The type of value is (*const T) is 1..

At this stage we would not support

match some_value {
    0 => None,
    value => Some(NonZeroU8 { value }),
}

because that requires reasoning across arms, which requires more work than just doing some local reasoning. The compiler already has this information for exhaustiveness checking, so we're not inventing anything new here, but we need to still fetch the information from exhaustiveness checking, so it seems best to start simple.

@rustbot
Copy link
Collaborator

rustbot commented Jan 25, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BoxyUwU (or someone else) soon.

Please see the contribution instructions for more information.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 26, 2023

☔ The latest upstream changes (presumably #107314) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 26, 2023
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Jan 26, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing src/librustdoc/json/conversions.rs; otherwise, make sure you bump the FORMAT_VERSION constant.

cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2023

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@@ -9,12 +9,24 @@ pub const UNIX_EPOCH: SystemTime = SystemTime { t: Timespec::zero() };
pub const TIMESPEC_MAX: libc::timespec =
libc::timespec { tv_sec: <libc::time_t>::MAX, tv_nsec: 1_000_000_000 - 1 };

#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Copy, Clone, Eq, Ord, Hash)]
Copy link
Member

Choose a reason for hiding this comment

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

This will lose StructuralPartialEq for SystemTime, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops yea, I'll fix that.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 27, 2023

Hmm... I cannot reproduce the CI failure locally, even with llvm built locally and with debug assertions on. Seems to be a LLVM 13 bug

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

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

bors commented Jan 27, 2023

⌛ Trying commit 32d11e6 with merge bfa3ec2e98602555e614e97839ef4ac24b82bf84...

@bors
Copy link
Contributor

bors commented Jan 27, 2023

💔 Test failed - checks-actions

@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr removed the WG-trait-system-refactor The Rustc Trait System Refactor Initiative label Jan 27, 2023
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Jan 27, 2023
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 27, 2023

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@bors
Copy link
Contributor

bors commented Jan 27, 2023

⌛ Trying commit a1c0a3e with merge eb5fc32d562d9e47e2e39272f7361bce86b65f51...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
Download action repository 'rust-lang/simpleinfra@master' (SHA:ece894d15649f0f9d7884f915dc821f00bd0418b)
Complete job name: PR (x86_64-gnu-llvm-13, false, ubuntu-20.04-xl)
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  CI_JOB_NAME: x86_64-gnu-llvm-13
---
   Compiling object v0.29.0
   Compiling hashbrown v0.12.3
   Compiling std_detect v0.1.5 (/checkout/library/stdarch/crates/std_detect)
   Compiling miniz_oxide v0.5.3
Invalid InsertValueInst operands!
  %17 = insertvalue { {}*, [3 x i64]* } %16, i64* %13, 1
LLVM ERROR: Broken module found, compilation aborted!
error: could not compile `panic_unwind`
warning: build failed, waiting for other jobs to finish...
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0x8ff2f3)[0x7f24877fc2f3]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f2486b47520]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm11PointerType3getEPNS_4TypeEj+0x20)[0x7f2481ac7bd0]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0xe400ac)[0x7f24819a10ac]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x1960c29)[0x7f24824c1c29]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x196025e)[0x7f24824c125e]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x1964e21)[0x7f24824c5e21]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x1965fbc)[0x7f24824c6fbc]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm15InstCombinePass3runERNS_8FunctionERNS_15AnalysisManagerIS1_JEEE+0x230)[0x7f24824c6b40]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x349f7fd)[0x7f24840007fd]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm11PassManagerINS_8FunctionENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x19e)[0x7f2481aaf61e]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x284937d)[0x7f24833aa37d]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm27ModuleToFunctionPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x1da)[0x7f2481ab31fa]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(+0x28491bd)[0x7f24833aa1bd]
/lib/x86_64-linux-gnu/libLLVM-13.so.1(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x19e)[0x7f2481aae35e]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xcaa3d5)[0x7f2487ba73d5]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xb5c68a)[0x7f2487a5968a]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xb5cc25)[0x7f2487a59c25]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xb78a79)[0x7f2487a75a79]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xc67316)[0x7f2487b64316]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xbe4aba)[0x7f2487ae1aba]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-557174ce2fd6a0af.so(+0xc3e2cf)[0x7f2487b3b2cf]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/libstd-2f96cead2d2eaf8f.so(rust_metadata_std_d2c56ec1bbb131e1+0xd440e)[0x7f2486e0640e]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7f2486b99b43]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a00)[0x7f2486c2ba00]
rustc exited with signal: 11 (SIGSEGV) (core dumped)
error: could not compile `gimli`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name gimli --edition=2018 /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.26.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="read"' --cfg 'feature="read-core"' --cfg 'feature="rustc-dep-of-std"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=ba2c5ffa1e4486e0 -C extra-filename=-ba2c5ffa1e4486e0 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-4f27673eda043c10.rmeta --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-83fa51bdee139e48.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-a842d6fd47d5c6b1.rmeta --cap-lints allow -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_os,"watchos")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","nvptx64","le32","xtensa")' '--check-cfg=values(dont_compile_me)' '--check-cfg=values(rustix_use_libc)' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Cembed-bitcode=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-23df797a2ec042c2/out` (exit status: 254)

@bors
Copy link
Contributor

bors commented Jan 27, 2023

💔 Test failed - checks-actions

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
[2023-01-27T18:51:01Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T18:51:01Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T18:51:01Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpDAXAbE#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T18:51:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-01-27T18:51:03Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpDAXAbE#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpDAXAbE/incremental-state"
[2023-01-27T18:51:06Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T18:51:06Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpDAXAbE#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpDAXAbE/incremental-state"
[2023-01-27T18:51:07Z DEBUG collector::execute] applying println to "/tmp/.tmpDAXAbE"
[2023-01-27T18:51:07Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:51:07Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:51:07Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpDAXAbE#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpDAXAbE/incremental-state"
Executing benchmark cargo-0.60.0 (2/8)
Preparing cargo-0.60.0
[2023-01-27T18:51:08Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2023-01-27T18:51:08Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
---
[2023-01-27T18:52:03Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T18:52:04Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-01-27T18:52:04Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpWdBj2V#[email protected]" "--profile" "check" "--lib" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T18:52:23Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-01-27T18:52:23Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpWdBj2V#[email protected]" "--profile" "check" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpWdBj2V/incremental-state"
[2023-01-27T18:52:47Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T18:52:47Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpWdBj2V#[email protected]" "--profile" "check" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpWdBj2V/incremental-state"
[2023-01-27T18:52:51Z DEBUG collector::execute] applying println to "/tmp/.tmpWdBj2V"
[2023-01-27T18:52:51Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:52:51Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:52:51Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpWdBj2V#[email protected]" "--profile" "check" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpWdBj2V/incremental-state"
[2023-01-27T18:52:55Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T18:52:56Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-01-27T18:52:56Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwAnIeN#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T18:53:45Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T18:53:45Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T18:53:45Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwAnIeN#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpwAnIeN/incremental-state"
[2023-01-27T18:54:46Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T18:54:46Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwAnIeN#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpwAnIeN/incremental-state"
[2023-01-27T18:54:56Z DEBUG collector::execute] applying println to "/tmp/.tmpwAnIeN"
[2023-01-27T18:54:56Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:54:56Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:54:56Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwAnIeN#[email protected]" "--lib" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpwAnIeN/incremental-state"
[2023-01-27T18:55:07Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T18:55:07Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T18:55:07Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp6rhHiT#[email protected]" "--release" "--lib" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T18:56:07Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
---
[2023-01-27T18:58:42Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T18:58:42Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-01-27T18:58:42Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpGwNMXD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T18:58:58Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-01-27T18:58:58Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpGwNMXD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpGwNMXD/incremental-state"
[2023-01-27T18:59:17Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T18:59:17Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpGwNMXD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpGwNMXD/incremental-state"
[2023-01-27T18:59:20Z DEBUG collector::execute] applying println to "/tmp/.tmpGwNMXD"
[2023-01-27T18:59:20Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:59:20Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T18:59:20Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpGwNMXD#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpGwNMXD/incremental-state"
[2023-01-27T18:59:24Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T18:59:24Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-01-27T18:59:24Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp9P3hSK#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T18:59:42Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
---
[2023-01-27T19:00:11Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:00:11Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T19:00:12Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp9NyTwI#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:00:30Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-01-27T19:00:30Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp9NyTwI#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp9NyTwI/incremental-state"
[2023-01-27T19:00:53Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:00:53Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp9NyTwI#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp9NyTwI/incremental-state"
[2023-01-27T19:00:57Z DEBUG collector::execute] applying println to "/tmp/.tmp9NyTwI"
[2023-01-27T19:00:57Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T19:00:57Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2023-01-27T19:00:57Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp9NyTwI#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp9NyTwI/incremental-state"
Executing benchmark externs (5/8)
Preparing externs
[2023-01-27T19:01:00Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2023-01-27T19:01:00Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=None, patch=None
---
[2023-01-27T19:01:03Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:03Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-01-27T19:01:03Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmphZKWw7#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:03Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmphZKWw7#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmphZKWw7/incremental-state"
[2023-01-27T19:01:04Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:01:04Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmphZKWw7#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmphZKWw7/incremental-state"
[2023-01-27T19:01:05Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:05Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T19:01:05Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpndPKRU#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:06Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
---
[2023-01-27T19:01:08Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:08Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-01-27T19:01:08Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp5JCToa#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:10Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:10Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp5JCToa#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp5JCToa/incremental-state"
[2023-01-27T19:01:14Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:01:14Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp5JCToa#[email protected]" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp5JCToa/incremental-state"
[2023-01-27T19:01:15Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:15Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-01-27T19:01:15Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmppfDKVX#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:17Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:17Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:17Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmppfDKVX#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmppfDKVX/incremental-state"
[2023-01-27T19:01:21Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:01:21Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmppfDKVX#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmppfDKVX/incremental-state"
[2023-01-27T19:01:22Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:22Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T19:01:22Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpQm6ql6#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:25Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
---
[2023-01-27T19:01:30Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:30Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2023-01-27T19:01:30Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpg7nwkQ#[email protected]" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:30Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:30Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpg7nwkQ#[email protected]" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpg7nwkQ/incremental-state"
[2023-01-27T19:01:31Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:01:31Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpg7nwkQ#[email protected]" "--profile" "check" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpg7nwkQ/incremental-state"
[2023-01-27T19:01:31Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:31Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-01-27T19:01:31Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpjsgHN8#[email protected]" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:31Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:31Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:31Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpjsgHN8#[email protected]" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpjsgHN8/incremental-state"
[2023-01-27T19:01:31Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:01:31Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpjsgHN8#[email protected]" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpjsgHN8/incremental-state"
[2023-01-27T19:01:32Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:32Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T19:01:32Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpP1LNBw#[email protected]" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:32Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
---
[2023-01-27T19:01:51Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:01:51Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2023-01-27T19:01:51Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpicMFCG#[email protected]" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:01:56Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2023-01-27T19:01:56Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpicMFCG#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpicMFCG/incremental-state"
[2023-01-27T19:02:02Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:02:02Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpicMFCG#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpicMFCG/incremental-state"
[2023-01-27T19:02:04Z DEBUG collector::execute] applying new row to "/tmp/.tmpicMFCG"
[2023-01-27T19:02:04Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2023-01-27T19:02:04Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2023-01-27T19:02:04Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpicMFCG#[email protected]" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpicMFCG/incremental-state"
[2023-01-27T19:02:10Z DEBUG collector::execute] Benchmark iteration 1/1
[2023-01-27T19:02:10Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2023-01-27T19:02:10Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmptXrgFu#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2023-01-27T19:02:15Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-01-27T19:02:15Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2023-01-27T19:02:15Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmptXrgFu#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmptXrgFu/incremental-state"
[2023-01-27T19:02:21Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2023-01-27T19:02:21Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmptXrgFu#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmptXrgFu/incremental-state"
[2023-01-27T19:02:22Z DEBUG collector::execute] applying new row to "/tmp/.tmptXrgFu"
[2023-01-27T19:02:22Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2023-01-27T19:02:22Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2023-01-27T19:02:22Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmptXrgFu#[email protected]" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmptXrgFu/incremental-state"
+ cd /checkout/obj
+ RUSTC_PROFILE_MERGED_FILE=/tmp/tmp-pgo/rustc-pgo.profdata
+ /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-profdata merge -o /tmp/tmp-pgo/rustc-pgo.profdata /tmp/tmp-pgo/rustc-pgo
+ echo 'Rustc PGO statistics'
---
[RUSTC-TIMING] tempfile test:false 0.499
error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:18
    |
25  | #[derive(Eq, PartialEq, Hash, Copy, Clone)]
...
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |                  ^^^ expected `u16`, found pattern `u16 is 61441..=65535`
   ::: /rustc/eb5fc32d562d9e47e2e39272f7361bce86b65f51/library/core/src/cmp.rs:236:1
    |
236 | pub macro PartialEq($item:item) {
236 | pub macro PartialEq($item:item) {
    | ------------------- in this expansion of `#[derive(PartialEq)]`
    = note:      expected type `u16`
    = note:      expected type `u16`
            found pattern type `u16 is 61441..=65535`
error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:18
    |
    |
25  | #[derive(Eq, PartialEq, Hash, Copy, Clone)]
...
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |                  ^^^ expected pattern `u16 is 61441..=65535`, found `u16`
   ::: /rustc/eb5fc32d562d9e47e2e39272f7361bce86b65f51/library/core/src/cmp.rs:236:1
    |
236 | pub macro PartialEq($item:item) {
236 | pub macro PartialEq($item:item) {
    | ------------------- in this expansion of `#[derive(PartialEq)]`
    |
    = note: expected pattern type `u16 is 61441..=65535`

error[E0308]: mismatched types
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:54:10
   |
   |
54 |         (self.0 as i16 as i32).wrapping_neg()
   |          |
   |          expected `i16`, found `u16`
   |          pattern type casts removing the pattern cannote also change the patterned type


error[E0308]: mismatched types
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:74:23
   |
74 |         unsafe { Self(encoded) }
   |                  ---- ^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
   |                  arguments to this function are incorrect
   |
   |
   = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
   |
30 | pub struct Errno(u16);
30 | pub struct Errno(u16);
   |            ^^^^^

error[E0308]: mismatched types
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:87:35
   |
87 |         return Err(unsafe { Errno(raw.decode_error_code()) });
   |                             ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
   |                             arguments to this struct are incorrect
   |
   |
   = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
   |
30 | pub struct Errno(u16);
30 | pub struct Errno(u16);
   |            ^^^^^

error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:102:35
    |
102 |         return Err(unsafe { Errno(raw.decode_error_code()) });
    |                             ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
    |                             arguments to this struct are incorrect
    |
    |
    = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
    |
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |            ^^^^^

error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:115:35
    |
115 |         return Err(unsafe { Errno(raw.decode_error_code()) });
    |                             ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
    |                             arguments to this struct are incorrect
    |
    |
    = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
    |
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |            ^^^^^

error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:130:35
    |
130 |         return Err(unsafe { Errno(raw.decode_error_code()) });
    |                             ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
    |                             arguments to this struct are incorrect
    |
    |
    = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
    |
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |            ^^^^^

error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:144:35
    |
144 |         return Err(unsafe { Errno(raw.decode_error_code()) });
    |                             ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
    |                             arguments to this struct are incorrect
    |
    |
    = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
    |
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |            ^^^^^

error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:174:26
    |
174 |         return Err(Errno(raw.decode_error_code()));
    |                    ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
    |                    arguments to this struct are incorrect
    |
    |
    = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
    |
30  | pub struct Errno(u16);
30  | pub struct Errno(u16);
    |            ^^^^^

error[E0308]: mismatched types
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:203:26
    |
203 |         return Err(Errno(raw.decode_error_code()));
    |                    ----- ^^^^^^^^^^^^^^^^^^^^^^^ expected pattern `u16 is 61441..=65535`, found `u16`
    |                    arguments to this struct are incorrect
    |
    |
    = note: expected pattern type `u16 is 61441..=65535`
note: tuple struct defined here
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.5/src/backend/linux_raw/io/errno.rs:30:12
    |
30  | pub struct Errno(u16);

@bors
Copy link
Contributor

bors commented Jan 28, 2023

☔ The latest upstream changes (presumably #101692) made this pull request unmergeable. Please resolve the merge conflicts.

@@ -565,6 +565,12 @@ pub enum Type {
type_: Box<Type>,
len: String,
},
/// u32 is 0..=100
Pat {
Copy link
Member

Choose a reason for hiding this comment

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

Could you bump the FORMAT_VERSION constant in the top of this file please.

Also, CI will fail unless you add a new case to

fn check_type(&mut self, x: &'a Type) {
match x {
Type::ResolvedPath(path) => self.check_path(path, PathKind::Type),

All it needs to do is recurse into the inner type.

#[inline(always)]
fn strip_pat_ty(mut self) -> Self {
let ty::Pat(raw_ptr_ty, _) = *self.layout.ty.kind() else {
bug!("NonNull must contain a pattern type, but had {}", self.layout.ty)
Copy link
Member

Choose a reason for hiding this comment

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

These assertions are confusing. The method name and doc comment to not talk about NonNull in any way.

@@ -83,6 +83,9 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>(
ty::Alias(..) | ty::Param(_) | ty::Placeholder(_) | ty::Infer(_) => {
throw_inval!(TooGeneric)
}
ty::Pat(..) => {
unimplemented!("pattern types need to calculate pattern from their pattern")
Copy link
Member

Choose a reason for hiding this comment

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

I can't parse this panic message... too many patterns?^^

Comment on lines +501 to +512
// Then check the extra pattern restrictions.
let scalar = self.read_immediate(&value, "initialized scalar value")?;
match (*scalar, value.layout.abi) {
(Immediate::Scalar(scalar), Abi::Scalar(s))
| (Immediate::ScalarPair(scalar, _), Abi::ScalarPair(s, _)) => {
self.visit_scalar(scalar, s)?
}
other => span_bug!(
self.ecx.cur_span(),
"invalid abi {other:?} for pattern type {ty:?}"
),
}
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this duplicating the scalar range check after this match?

I assume for now patterns are restricted to things that can be actually represented in the Scalar ABI? If 0 | 5 | 10 is accepted as a pattern then we should properly check it here...

@oli-obk oli-obk mentioned this pull request Feb 2, 2023
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 2, 2023

Closing in favor of #107606

@oli-obk oli-obk closed this Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.