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

Rollup of 6 pull requests #123473

Closed
wants to merge 19 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Jules-Bertholet and others added 19 commits March 30, 2024 12:57
The original proposal allows reference patterns
with "compatible" mutability, however it's not clear
what that means so for now we require an exact match.

I don't know the type system code well, so if something
seems to not make sense it's probably because I made a
mistake
… r=Nadrieril

Match ergonomics: implement "`&`pat everywhere"

Implements the eat-two-layers (feature gate `and_pat_everywhere`, all editions) ~and the eat-one-layer (feature gate `and_eat_one_layer_2024`, edition 2024 only, takes priority on that edition when both feature gates are active)~ (EDIT: will be done in later PR) semantics.

cc rust-lang#123076

r? `@Nadrieril`

`@rustbot` label A-patterns A-edition-2024
…aethlin,onur-ozkan

Support running library tests in Miri

This adds a new bootstrap subcommand `./x.py miri` which can test libraries in Miri. This is in preparation for eventually doing that as part of bors CI, but this PR only adds the infrastructure, and doesn't enable it yet.

`@rust-lang/bootstrap` should this be `x.py test --miri library/core` or `x.py miri library/core`? The flag has the advantage that we don't have to copy all the arguments from `Subcommand::Test`. It has the disadvantage that most test steps just ignore `--miri` and still run tests the regular way. For clippy you went the route of making it a separate subcommand. ~~I went with a flag now as that seemed easier, but I can change this.~~ I made it a new subcommand. Note however that the regular cargo invocation would be `cargo miri test ...`, so `x.py` is still going to be different in that the `test` is omitted. That said, we could also make it `./x.py miri-test` to make that difference smaller -- that's in fact more consistent with the internal name of the command when bootstrap invokes cargo.

`@rust-lang/libs` ~~unfortunately this PR does some unholy things to the `lib.rs` files of our library crates.~~
`@m-ou-se` found a way that entirely avoids library-level hacks, except for some new small `lib.miri.rs` files that hopefully you will never have to touch. There's a new hack in cargo-miri but there it is in good company...
…BoxyUwU

change `NormalizesTo` to fully structurally normalize

notes in https://hackmd.io/wZ016dE4QKGIhrOnHLlThQ

need to also update the dev-guide once this PR lands. in short, the setup is now as follows:

`normalizes-to` internally implements one step normalization, applying that normalization to the `goal.predicate.term` causes the projected term to get recursively normalized. With this `normalizes-to` normalizes until the projected term is rigid, meaning that we normalize as many steps necessary, but at least 1.

To handle rigid aliases, we add another candidate only if the 1 to inf step normalization failed. With this `normalizes-to` is now full structural normalization. We can now change `AliasRelate` to simply emit `normalizes-to` goals for the rhs and lhs.

This avoids the concerns from rust-lang/trait-system-refactor-initiative#103 and generally feels cleaner
…omez

Add Description for cargo in rustdoc documentation

As most people use cargo now, I prioritised the description for cargo in rustdoc documentation.

I also added how to open the generated doc with cargo.

Btw, may I ask how to use `./x tidy`? It says `warning: `tidy` is not installed;`
hir: Use `ItemLocalId::ZERO` in a couple more places

Follow up to rust-lang#123415 and rust-lang#123419.
… r=compiler-errors

Cleanup: Rename `HAS_PROJECTIONS` to `HAS_ALIASES` etc.

The name of the bitflag `HAS_PROJECTIONS` and of its corresponding method `has_projections` is quite historical dating back to a time when projections were the only kind of alias type.

I think it's time to update it to clear up any potential confusion for newcomers and to reduce unnecessary friction during contributor onboarding.

r? types
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Apr 4, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Apr 4, 2024

📌 Commit 7dcc1da has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 4, 2024
@bors
Copy link
Contributor

bors commented Apr 4, 2024

⌛ Testing commit 7dcc1da with merge 4084b9d...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#123311 (Match ergonomics: implement "`&`pat everywhere")
 - rust-lang#123317 (Support running library tests in Miri)
 - rust-lang#123363 (change `NormalizesTo` to fully structurally normalize)
 - rust-lang#123417 (Add Description for cargo in rustdoc documentation)
 - rust-lang#123454 (hir: Use `ItemLocalId::ZERO` in a couple more places)
 - rust-lang#123464 (Cleanup: Rename `HAS_PROJECTIONS` to `HAS_ALIASES` etc.)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 928 filtered out

     Running tests\create_dir_all_bare.rs (build\x86_64-pc-windows-msvc\stage1-std\miri\x86_64-pc-windows-msvc\debug\deps\create_dir_all_bare-328c43255ff4aadc.exe)
thread 'rustc' panicked at src\tools\miri\src\helpers.rs:189:32:
failed to find required Rust item: ["std", "sys", "pal", "windows", "c", "ERROR_ENVVAR_NOT_FOUND"]
   0:     0x7ffba7c28d19 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h60b259135e2366e0
   1:     0x7ffba7c65dd2 - core::fmt::write::h886b5969c9db01e4
   2:     0x7ffba7c1f601 - <std::io::IoSlice as core::fmt::Debug>::fmt::h966a2f893ccaf5de
   3:     0x7ffba7c28a86 - std::sys_common::backtrace::lock::ha2d1e18060585a37
   3:     0x7ffba7c28a86 - std::sys_common::backtrace::lock::ha2d1e18060585a37
   4:     0x7ffba7c2c18f - std::panicking::default_hook::h503443eb57d852fb
   5:     0x7ffba7c2bdcb - std::panicking::default_hook::h503443eb57d852fb
   6:     0x7ffb9134ee7a - RNvXsM_NtCs8cbSRXgxj5i_5alloc5boxedINtB5_3BoxNCNvCsbpMyiBG4CxD_17rustc_driver_impl16install_ice_hook0EINtNtNtCs84N8RMMjDuo_4core3ops8function2FnTRDG0_IB1D_TRL1_INtNtNtB1J_5panic10panic_info9PanicInfoL0_EEEp6OutputuNtNtB1J_6marker4SyncNtB3s_4SendEL_RB2z_EE
   7:     0x7ffba7c2c81f - std::panicking::rust_panic_with_hook::hb2797da0d85180df
   8:     0x7ffba7c2c689 - <std::panicking::begin_panic_handler::StaticStrPayload as core::panic::PanicPayload>::take_box::hcf8d920cd33f53ef
  10:     0x7ffba7c2c388 - rust_begin_unwind
  11:     0x7ffba7c8f567 - core::panicking::panic_fmt::ha8f5e66a99f39b39
  12:     0x7ff7b6f3aa08 - <unknown>
  13:     0x7ff7b6fe44ec - <unknown>
  13:     0x7ff7b6fe44ec - <unknown>
  14:     0x7ff7b6f552a3 - <unknown>
  15:     0x7ff7b6f4dbcb - <unknown>
  16:     0x7ff7b6f05eb6 - <unknown>
  17:     0x7ff7b6f38af4 - <unknown>
  18:     0x7ff7b6dde1e8 - <unknown>
  19:     0x7ff7b6dafc98 - <unknown>
  20:     0x7ff7b6da5f18 - <unknown>
  21:     0x7ffb9131481a - RINvMs5_NtCseKQNnPF4NMf_15rustc_interface7queriesNtNtB8_9interface8Compiler5enterNCNCNvCsbpMyiBG4CxD_17rustc_driver_impl12run_compiler0s_0INtNtCs84N8RMMjDuo_4core6result6ResultINtNtB2h_6option6OptionNtB6_6LinkerENtCsh4klhBfJTgP_10rustc_span15ErrorGuarante
  22:     0x7ffb9133f2d7 - rustc_span[c6d296efe4ca1599]::set_source_map::<core[5e14d106d20688a2]::result::Result<(), rustc_span[c6d296efe4ca1599]::ErrorGuaranteed>, rustc_interface[abde50a6900044c5]::interface::run_compiler<core[5e14d106d20688a2]::result::Result<(), rustc_span[c6d296efe4ca1599]::ErrorGuaranteed>, rustc_driver_impl[84f7b0f6851f3e1f]::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
  23:     0x7ffb91341e29 - RINvCsh4klhBfJTgP_10rustc_span27create_session_globals_thenINtNtCs84N8RMMjDuo_4core6result6ResultuNtB2_15ErrorGuaranteedENCNCNCINvNtCseKQNnPF4NMf_15rustc_interface4util26run_in_thread_with_globalsNCINvB24_31run_in_thread_pool_with_globalsNCINvNtB26_9inter
  24:     0x7ffb912ed180 - std[5fff034ea71b4d2f]::panicking::try::<core[5e14d106d20688a2]::result::Result<(), rustc_span[c6d296efe4ca1599]::ErrorGuaranteed>, core[5e14d106d20688a2]::panic::unwind_safe::AssertUnwindSafe<rustc_driver_impl[84f7b0f6851f3e1f]::main::{closure#1}>>
  25:     0x7ffb912f51ac - RNCINvMNtCs7nkAhl82AAK_10rayon_core11thread_poolNtB5_10ThreadPool7installNCNCNCNCINvNtCseKQNnPF4NMf_15rustc_interface4util31run_in_thread_pool_with_globalsNCINvNtB1m_9interface12run_compilerINtNtCs84N8RMMjDuo_4core6result6ResultuNtCsh4klhBfJTgP_10rustc_sp
  27:     0x7ffbd8f47ac4 - BaseThreadInitThunk
  28:     0x7ffbd982a4e1 - RtlUserThreadStart

error: the compiler unexpectedly panicked. this is a bug.
error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/miri/issues/new

note: please attach the file at `C:\a\rust\rust\rustc-ice-2024-04-05T00_28_52-4912.txt` to your bug report

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -Z unstable-options -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C split-debuginfo=packed -C target-feature=+crt-static -C prefer-dynamic -Z inline-mir -C embed-bitcode=yes -C force-frame-pointers=yes -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z unstable-options
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
end of query stack
error: test failed, to rerun pass `-p std --test create_dir_all_bare`
Caused by:
Caused by:
  process didn't exit successfully: `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-tools-bin\cargo-miri.exe runner 'C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-std\miri\x86_64-pc-windows-msvc\debug\deps\create_dir_all_bare-328c43255ff4aadc.exe' notest -Z unstable-options --format json` (exit code: 0x80000003)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
  local time: Fri, Apr  5, 2024 12:28:53 AM
  network time: Fri, 05 Apr 2024 00:28:53 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Apr 5, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 5, 2024
@fmease fmease closed this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants