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 #9447

Merged
merged 25 commits into from
Sep 8, 2022
Merged

Rustup #9447

merged 25 commits into from
Sep 8, 2022

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Sep 8, 2022

r? @ghost

changelog: none

tmiasko and others added 25 commits August 26, 2022 14:27
For consistency, and because it makes HIR measurement simpler and more
accurate.
For consistency, and because it makes HIR measurement simpler and more
accurate.
This reverts commit 3266460.

This is the revert against master, the beta revert was already done in #100538.
Strengthen invalid_value lint to forbid uninit primitives, adjust docs to say that's UB

For context: rust-lang/rust#66151 (comment)

This does not make it a FCW, but it does explicitly state in the docs that uninit integers are UB.

This also doesn't affect any runtime behavior, uninit u32's will still successfully be created through mem::uninitialized.
Rollup of 10 pull requests

Successful merges:

 - #100787 (Pretty printing give proper error message without panic)
 - #100838 (Suggest moving redundant generic args of an assoc fn to its trait)
 - #100844 (migrate rustc_query_system to use SessionDiagnostic)
 - #101140 (Update Clippy)
 - #101161 (Fix uintended diagnostic caused by `drain(..)`)
 - #101165 (Use more `into_iter` rather than `drain(..)`)
 - #101229 (Link “? operator” to relevant chapter in The Book)
 - #101230 (lint: avoid linting diag functions with diag lints)
 - #101236 (Avoid needless buffer zeroing in `std::sys::windows::fs`)
 - #101240 (Fix a typo on `wasm64-unknown-unknown` doc)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This shrinks the `PredicateS` type, which is instanted frequently.
Improve HIR stats

#100398 improve the AST stats collection done by `-Zhir-stats`. This PR does the same for HIR stats collection.

r? `@davidtwco`
…chenkov

Simplify `hir::PathSegment`

r? `@petrochenkov`
fix `ExprKind` static_assert_size

fix hir-stats
…ir, r=cjgillot

Separate the receiver from arguments in HIR

Related to #100232

cc `@cjgillot`
…gillot

`BindingAnnotation` refactor

* `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`)
* `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)`
* Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}`

One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`.

I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
@flip1995
Copy link
Member Author

flip1995 commented Sep 8, 2022

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Sep 8, 2022

📌 Commit df536c9 has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 8, 2022

⌛ Testing commit df536c9 with merge 32fa80d...

@bors
Copy link
Collaborator

bors commented Sep 8, 2022

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

@bors bors merged commit 32fa80d into rust-lang:master Sep 8, 2022
@@ -644,7 +644,7 @@ impl<'tcx> Count<'tcx> {
span,
values,
)?),
rpf::Count::CountIsParam(_) => {
rpf::Count::CountIsParam(_) | rpf::Count::CountIsStar(_) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jarcho I would like to split up these two use cases because the .* is more like an implied autonumbered position (similar to {}). I did the change as part of my PR 3ac6593 -- note that it now detects more cases because of that change. Please let me know if this is an ok approach.

cc: @flip1995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.