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 8 pull requests #92627

Merged
merged 21 commits into from
Jan 7, 2022
Merged

Rollup of 8 pull requests #92627

merged 21 commits into from
Jan 7, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lcnr and others added 21 commits November 19, 2021 22:18
This follows changes from rust-lang#67967 and converts remaining `span_bug`s into
delayed bugs, since for const items drop elaboration might be executed
on a MIR which failed borrowck.
Upstream LLVM change 9290ccc migrated attribute removal to use
AttributeMask instead of AttrBuilder, so we need to follow suit here.
A missing break statement lead to an infinite loop in bootstrap.py.
Avoids some extra conversions. Spotted by nikic during review.
Rename `CStore::item_attrs` -> `CStore::item_attrs_untracked` top follow conventions
By avoiding formatting and allocations in the no-ident case, and by making the span mandatory if the ident exists.

Use the optimized `opt_item_ident` to cleanup `fn each_child_of_item`
return the correct type for closures in `type_of`

A bit unhappy about the way `typeck::check_crate` works rn. Would have preferred to not change `CollectItemTypesVisitor` in this way.

r? ``@nikomatsakis``
… r=jackh726

Delay remaining `span_bug`s in drop elaboration

This follows changes from rust-lang#67967 and converts remaining `span_bug`s into
delayed bugs, since for const items drop elaboration might be executed
on a MIR which failed borrowck.

Fixes rust-lang#81708.
Fixes rust-lang#91816.
Fix spacing and ordering of words in pretty printed Impl

Follow-up to rust-lang#92238 fixing one of the FIXMEs.

```rust
macro_rules! repro {
    ($item:item) => {
        stringify!($item)
    };
}

fn main() {
    println!("{}", repro!(impl<T> Struct<T> {}));
    println!("{}", repro!(impl<T> const Trait for T {}));
}
```

Before:&ensp;`impl <T> Struct<T> {}`
After:&ensp;`impl<T> Struct<T> {}`

Before:&ensp;`impl const <T> Trait for T {}` 😿
After:&ensp;`impl<T> const Trait for T {}`
Exit nonzero on rustc -Wall

Previously `rustc -Wall /dev/null` would print a paragraph explaining that `-Wall` is not a thing in Rust, but would then exit 0. I believe exiting 0 is not the right behavior. For something like `rustc --version` or `rustc --help` or `rustc -C help` the user is requesting rustc to print some information; rustc prints that information and exits 0 because what the user requested has been accomplished. In the case of `rustc -Wall path/to/main.rs`, I don't find it correct to conceptualize this as "the user requested rustc to print information about the fact that Wall doesn't exist". The user requested a particular thing, and despite rustc knowing what they probably meant and informing them about that, the thing they requested has *not* been accomplished. Thus a nonzero exit code is needed.
RustWrapper: adapt to new AttributeMask API

Upstream LLVM change 9290ccc migrated attribute removal to use
AttributeMask instead of AttrBuilder, so we need to follow suit here.

r? ``@nagisa`` cc ``@nikic``
…lacrum

Break the loop

A missing break statement lead to an infinite loop in bootstrap.py.

I also added a short sleep so it's not constantly running at 100%. But I can remove that if it's not wanted.

Fixes rust-lang#76661
rustc_metadata: Some minor cleanups and optimizations

Mostly extracted from rust-lang#88679 (which is otherwise a rustdoc PR).
r? ``@cjgillot``
…t_struct, r=Mark-Simulacrum

Remove unused `ExtendDefault` struct

As noted in rust-lang#77850 (comment), this struct is no longer used.
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 6, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Jan 6, 2022

📌 Commit fcae1d6 has been approved by matthiaskrgr

@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 Jan 6, 2022
@bors
Copy link
Contributor

bors commented Jan 6, 2022

⌛ Testing commit fcae1d6 with merge e012a19...

@bors
Copy link
Contributor

bors commented Jan 7, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing e012a19 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 7, 2022
@bors bors merged commit e012a19 into rust-lang:master Jan 7, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e012a19): comparison url.

Summary: This change led to large relevant improvements 🎉 in compiler performance.

  • Large improvement in instruction counts (up to -2.9% on incr-unchanged builds of clap-rs)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@matthiaskrgr matthiaskrgr deleted the rollup-xmz0rib branch February 13, 2022 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.