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

Rustup #6881

Merged
merged 31 commits into from
Mar 11, 2021
Merged

Rustup #6881

merged 31 commits into from
Mar 11, 2021

Conversation

flip1995
Copy link
Member

changelog: none

flip1995 and others added 30 commits February 25, 2021 11:25
…-obk

Bump optimization from mir_opt_level 2 to 3 and 3 to 4 and make "release" be level 2 by default

r? `@oli-obk`
Test the effect of shrinking the size of Rvalue by 16 bytes

r? `@ghost`
or-patterns: disallow in `let` bindings

~~Blocked on rust-lang/rust#81869

Disallows top-level or-patterns before type ascription. We want to reserve this syntactic space for possible future generalized type ascription.

r? ``@petrochenkov``
This updates all places where match branches check on StatementKind or UseContext.
This doesn't properly implement them, but adds TODOs where they are, and also adds some best
guesses to what they should be in some cases.
It was suggested to lower this in MIR instead of ssa, so do that instead.
Store HIR attributes in a side table

Same idea as #72015 but for attributes.
The objective is to reduce incr-comp invalidations due to modified attributes.
Notably, those due to modified doc comments.

Implementation:
- collect attributes during AST->HIR lowering, in `LocalDefId -> ItemLocalId -> &[Attributes]` nested tables;
- access the attributes through a `hir_owner_attrs` query;
- local refactorings to use this access;
- remove `attrs` from HIR data structures one-by-one.

Change in behaviour:
- the HIR visitor traverses all attributes at once instead of parent-by-parent;
- attribute arrays are sometimes duplicated: for statements and variant constructors;
- as a consequence, attributes are marked as used after unused-attribute lint emission to avoid duplicate lints.

~~Current bug: the lint level is not correctly applied in `std::backtrace_rs`, triggering an unused attribute warning on `#![no_std]`. I welcome suggestions.~~
@rust-highfive
Copy link

r? @phansch

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 11, 2021
@flip1995
Copy link
Member Author

Whoops forgot r? @ghost. Sorry 😅

@flip1995
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Mar 11, 2021

📌 Commit 9c1dd0c has been approved by flip1995

@bors
Copy link
Contributor

bors commented Mar 11, 2021

⌛ Testing commit 9c1dd0c with merge 99afc6e...

@bors
Copy link
Contributor

bors commented Mar 11, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 99afc6e to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.