Skip to content

Swap defid fields #128325

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Closed

Conversation

aDotInTheVoid
Copy link
Member

Built on-top of #128323, to see if using new fxhash means we don't need to be carefull about where in the DefId we place the entropy

r? @ghost

This was implemented in rust-lang/rustc-hash#37
by Orson Peters and benchmarked in
rust-lang#125133.
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend 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 Jul 29, 2024
@aDotInTheVoid
Copy link
Member Author

@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 Jul 29, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 29, 2024
…try>

Swap defid fields

Built on-top of rust-lang#128323, to see if using new fxhash means we don't need to be carefull about where in the DefId we place the entropy

r? `@ghost`
@bors
Copy link
Collaborator

bors commented Jul 29, 2024

⌛ Trying commit 8cbf4b0 with merge 21a0f2e...

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.698 Building wheels for collected packages: reuse
#16 2.699   Building wheel for reuse (pyproject.toml): started
#16 2.946   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 2.947   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#16 2.947   Stored in directory: /tmp/pip-ephem-wheel-cache-8np9_dv9/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 2.950 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.344 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.344 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.4s
---
    Checking wasmparser v0.214.0
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:36:24
   |
36 |         DefId { krate: self, index: CRATE_DEF_INDEX }
   |                        ^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:36:37
   |
   |
36 |         DefId { krate: self, index: CRATE_DEF_INDEX }
   |                                     ^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:41:48
   |
   |
41 |         ModDefId::new_unchecked(DefId { krate: self, index: CRATE_DEF_INDEX })
   |                                                ^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:41:61
   |
   |
41 |         ModDefId::new_unchecked(DefId { krate: self, index: CRATE_DEF_INDEX })
   |                                                             ^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:267:24
    |
    |
267 |         DefId { krate: LOCAL_CRATE, index }
    |                        ^^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:267:37
    |
    |
267 |         DefId { krate: LOCAL_CRATE, index }
    |                                     ^^^^^ expected `CrateNum`, found `DefIndex`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:273:23
    |
    |
273 |         self.krate == LOCAL_CRATE
    |         ----------    ^^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
    |         expected because this is `DefIndex`

error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:278:63
   --> compiler/rustc_span/src/def_id.rs:278:63
    |
278 |         self.is_local().then(|| LocalDefId { local_def_index: self.index })
    |                                                               ^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:294:23
    |
294 |         self.index == CRATE_DEF_INDEX
294 |         self.index == CRATE_DEF_INDEX
    |         ----------    ^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
    |         |
    |         expected because this is `def_id::CrateNum`

error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:299:40
    |
299 |         self.is_crate_root().then_some(self.krate)
    |                              --------- ^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
    |                              arguments to this method are incorrect
    |
help: the return type of this call is `DefIndex` due to the type of the argument passed
   --> compiler/rustc_span/src/def_id.rs:299:9
   --> compiler/rustc_span/src/def_id.rs:299:9
    |
299 |         self.is_crate_root().then_some(self.krate)
    |                                        |
    |                                        this argument influences the return type of `then_some`
note: method defined here
   --> /checkout/library/core/src/bool.rs:33:12
   --> /checkout/library/core/src/bool.rs:33:12
    |
33  |     pub fn then_some<T>(self, t: T) -> Option<T> {

error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:362:24
    |
    |
362 |         DefId { krate: LOCAL_CRATE, index: self.local_def_index }
    |                        ^^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:362:44
    |
    |
362 |         DefId { krate: LOCAL_CRATE, index: self.local_def_index }
    |                                            ^^^^^^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
    Checking ryu v1.0.18
    Checking icu_locid_transform_data v1.5.0
    Checking icu_locid_transform v1.5.0
For more information about this error, try `rustc --explain E0308`.

@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)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
[RUSTC-TIMING] rustc_data_structures test:false 3.008
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:36:24
   |
36 |         DefId { krate: self, index: CRATE_DEF_INDEX }
   |                        ^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:36:37
   |
   |
36 |         DefId { krate: self, index: CRATE_DEF_INDEX }
   |                                     ^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:41:48
   |
   |
41 |         ModDefId::new_unchecked(DefId { krate: self, index: CRATE_DEF_INDEX })
   |                                                ^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
  --> compiler/rustc_span/src/def_id.rs:41:61
   |
   |
41 |         ModDefId::new_unchecked(DefId { krate: self, index: CRATE_DEF_INDEX })
   |                                                             ^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:267:24
    |
    |
267 |         DefId { krate: LOCAL_CRATE, index }
    |                        ^^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:267:37
    |
    |
267 |         DefId { krate: LOCAL_CRATE, index }
    |                                     ^^^^^ expected `CrateNum`, found `DefIndex`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:273:23
    |
    |
273 |         self.krate == LOCAL_CRATE
    |         ----------    ^^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
    |         expected because this is `DefIndex`

error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:278:63
   --> compiler/rustc_span/src/def_id.rs:278:63
    |
278 |         self.is_local().then(|| LocalDefId { local_def_index: self.index })
    |                                                               ^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:294:23
    |
294 |         self.index == CRATE_DEF_INDEX
294 |         self.index == CRATE_DEF_INDEX
    |         ----------    ^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
    |         |
    |         expected because this is `def_id::CrateNum`

error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:299:40
    |
299 |         self.is_crate_root().then_some(self.krate)
    |                              --------- ^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
    |                              arguments to this method are incorrect
    |
help: the return type of this call is `DefIndex` due to the type of the argument passed
   --> compiler/rustc_span/src/def_id.rs:299:9
   --> compiler/rustc_span/src/def_id.rs:299:9
    |
299 |         self.is_crate_root().then_some(self.krate)
    |                                        |
    |                                        this argument influences the return type of `then_some`
note: method defined here
   --> /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/library/core/src/bool.rs:33:12
   --> /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/library/core/src/bool.rs:33:12
    |
33  |     pub fn then_some<T>(self, t: T) -> Option<T> {

error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:362:24
    |
    |
362 |         DefId { krate: LOCAL_CRATE, index: self.local_def_index }
    |                        ^^^^^^^^^^^ expected `DefIndex`, found `CrateNum`
error[E0308]: mismatched types
   --> compiler/rustc_span/src/def_id.rs:362:44
    |
    |
362 |         DefId { krate: LOCAL_CRATE, index: self.local_def_index }
    |                                            ^^^^^^^^^^^^^^^^^^^^ expected `CrateNum`, found `DefIndex`
[RUSTC-TIMING] rustc_abi test:false 0.897
For more information about this error, try `rustc --explain E0308`.
[RUSTC-TIMING] rustc_span test:false 1.429
error: could not compile `rustc_span` (lib) due to 12 previous errors
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.86/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/exec.rs:78:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/exec.rs:179:9
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/main.rs:225:13
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/main.rs:225:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/main.rs:214:9
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/main.rs:214:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/main.rs:211:29
   8: opt_dist::main
             at /rustc/21a0f2eb7b3fbfd27ff88f5452d76c0b8b7d7b40/src/tools/opt-dist/src/main.rs:401:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/core/src/ops/function.rs:250:5
  10: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/sys_common/backtrace.rs:155:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/rt.rs:159:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
  13: std::panicking::try::do_call
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/panicking.rs:559:40
  14: std::panicking::try
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/panicking.rs:523:19

@bors
Copy link
Collaborator

bors commented Jul 29, 2024

💔 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 Jul 29, 2024
@bors
Copy link
Collaborator

bors commented Sep 26, 2024

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend 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-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.

5 participants