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 7 pull requests #124960

Closed
wants to merge 31 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Swatinem and others added 30 commits May 1, 2024 09:54
In order to inform future perf improvements and prevent regressions,
lets add some benchmarks that stress `impl Debug for str`.
Also sort the features.
I tried simplifying `RegionCtxt`, which led me to finding that the
fields are printed in `sccs_info`.
The comment mentions that `ReBound` and `ReVar` aren't expected here.
Experimentation with the full test suite indicates this is true, and
that `ReErased` also doesn't occur. So the commit introduces `bug!` for
those cases. (If any of them show up later on, at least we'll have a
test case.)

The commit also remove the first sentence in the comment.
`RePlaceholder` is now handled in the match arm above this comment and
nothing is printed for it, so that sentence is just wrong. Furthermore,
issue rust-lang#13998 was closed some time ago.
xz crate consist of simple reexport of xz2 crate. Why? Idk.
The type name has changed.
The use of `Binder` was removed in the recent rust-lang#123900, but the comment
wasn't removed at the same time.
Thus eliminating a `FIXME` comment.
This requires exporting the interpreter macros so they can be used with
`use crate::interpret::*`.
Add benchmarks for `impl Debug for str`

In order to inform future perf improvements and prevent regressions, lets add some benchmarks that stress `impl Debug for str`.

---

As I am currently working on improving the perf in rust-lang#121150, its nice to have these benchmarks.

Writing them, I also saw that escapes are written out one char at a time, even though other parts of the code are already optimizing that via `as_str`, which I intend to do as well as a followup improvement.

r? `@cuviper`
☝🏻 as you were also assigned to rust-lang#121150, CC `@the8472` if you want to steal the review :-)
…middle, r=saethlin

Remove `#[macro_use] extern crate rustc middle` from numerous crates

Because explicit importing of macros via `use` items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. This PR mops up some cases I didn't get to in rust-lang#124511.

r? `@saethlin`
… r=bjorn3

`rustc_target` cleanups

Minor improvement I found while looking at this code.

r? ``@lqd``
Eliminate some `FIXME(lcnr)` comments

In some cases this involved changing code. In some cases the comment was able to removed or replaced.

r? `@lcnr`
opt-dist: use xz2 instead of xz crate

xz crate consist of simple reexport of xz2 crate. Why? Idk.

Totally not a backdoor.
analyse visitor: build proof tree in probe

see inline comments

fixes rust-lang#124791
fixes rust-lang#124702

r? ``@compiler-errors``
…errors

always use `GenericArgsRef`

r? ``@compiler-errors``
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-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 May 10, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented May 10, 2024

📌 Commit 3439a87 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2024
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 29.1s done
#16 DONE 41.9s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
   Compiling rustc_smir v0.0.0 (/checkout/compiler/rustc_smir)
error: cannot find macro `bug` in this scope
  --> compiler/rustc_infer/src/errors/note_and_explain.rs:73:17
   |
73 |                 bug!("unexpected region for DescriptionCtx: {:?}", region);
   |
help: consider importing this macro
   |
1  + use rustc_middle::bug;
1  + use rustc_middle::bug;
   |

error[E0308]: `match` arms have incompatible types
  --> compiler/rustc_infer/src/errors/note_and_explain.rs:73:17
   |
19 |           let (span, kind, arg) = match *region {
   |                                   ------------- `match` arms have incompatible types
...
29 | /                 if br.has_name() {
30 | |                     (Some(span), "as_defined", br.name.to_string())
31 | |                 } else {
32 | |                     (Some(span), "as_defined_anon", String::new())
33 | |                 }
   | |_________________- this is found to be of type `(std::option::Option<rustc_span::Span>, &str, std::string::String)`
...
36 | /                 if !fr.bound_region.is_named()
37 | |                     && let Some((ty, _)) = find_anon_type(tcx, region, &fr.bound_region)
38 | |                 {
39 | |                     (Some(ty.span), "defined_here", String::new())
64 | |                     }
65 | |                 }
65 | |                 }
   | |_________________- this is found to be of type `(std::option::Option<rustc_span::Span>, &str, std::string::String)`
...
68 |               ty::ReStatic => (alt_span, "restatic", String::new()),
   |                               ------------------------------------- this is found to be of type `(std::option::Option<rustc_span::Span>, &str, std::string::String)`
...
73 |                   bug!("unexpected region for DescriptionCtx: {:?}", region);
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(Option<Span>, &str, String)`, found `()`
   |
   = note:  expected tuple `(std::option::Option<rustc_span::Span>, &str, std::string::String)`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustc_infer` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@bors
Copy link
Contributor

bors commented May 10, 2024

⌛ Testing commit 3439a87 with merge ad31ee3...

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

Rollup of 7 pull requests

Successful merges:

 - rust-lang#124551 (Add benchmarks for `impl Debug for str`)
 - rust-lang#124914 (Remove `#[macro_use] extern crate rustc middle` from numerous crates)
 - rust-lang#124915 (`rustc_target` cleanups)
 - rust-lang#124918 (Eliminate some `FIXME(lcnr)` comments)
 - rust-lang#124927 (opt-dist: use xz2 instead of xz crate)
 - rust-lang#124936 (analyse visitor: build proof tree in probe)
 - rust-lang#124943 (always use `GenericArgsRef`)

Failed merges:

 - rust-lang#124955 (Use fewer origins when creating type variables.)

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

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_mir_dataflow v0.0.0 (/checkout/compiler/rustc_mir_dataflow)
error: cannot find macro `bug` in this scope
  --> compiler/rustc_infer/src/errors/note_and_explain.rs:73:17
   |
73 |                 bug!("unexpected region for DescriptionCtx: {:?}", region);
   |
help: consider importing this macro
   |
1  + use rustc_middle::bug;
1  + use rustc_middle::bug;
   |

[RUSTC-TIMING] nix test:false 3.011
   Compiling rustc_metadata v0.0.0 (/checkout/compiler/rustc_metadata)
error[E0308]: `match` arms have incompatible types
  --> compiler/rustc_infer/src/errors/note_and_explain.rs:73:17
   |
19 |           let (span, kind, arg) = match *region {
   |                                   ------------- `match` arms have incompatible types
...
29 | /                 if br.has_name() {
30 | |                     (Some(span), "as_defined", br.name.to_string())
31 | |                 } else {
32 | |                     (Some(span), "as_defined_anon", String::new())
33 | |                 }
   | |_________________- this is found to be of type `(std::option::Option<rustc_span::Span>, &str, std::string::String)`
...
36 | /                 if !fr.bound_region.is_named()
37 | |                     && let Some((ty, _)) = find_anon_type(tcx, region, &fr.bound_region)
38 | |                 {
39 | |                     (Some(ty.span), "defined_here", String::new())
64 | |                     }
65 | |                 }
65 | |                 }
   | |_________________- this is found to be of type `(std::option::Option<rustc_span::Span>, &str, std::string::String)`
...
68 |               ty::ReStatic => (alt_span, "restatic", String::new()),
   |                               ------------------------------------- this is found to be of type `(std::option::Option<rustc_span::Span>, &str, std::string::String)`
...
73 |                   bug!("unexpected region for DescriptionCtx: {:?}", region);
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(Option<Span>, &str, String)`, found `()`
   |
   = note:  expected tuple `(std::option::Option<rustc_span::Span>, &str, std::string::String)`

[RUSTC-TIMING] tracing_subscriber test:false 8.019
   Compiling rustc_pattern_analysis v0.0.0 (/checkout/compiler/rustc_pattern_analysis)
For more information about this error, try `rustc --explain E0308`.

@bors
Copy link
Contributor

bors commented May 10, 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 May 10, 2024
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) rollup A PR which is a rollup 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-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

8 participants