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

Make Ty::builtin_deref just return a Ty #124957

Merged
merged 1 commit into from
May 10, 2024

Conversation

compiler-errors
Copy link
Member

Nowhere in the compiler are we using the mutability part of the TyAndMut that we used to return.

@rustbot
Copy link
Collaborator

rustbot commented May 10, 2024

r? @michaelwoerister

rustbot has assigned @michaelwoerister.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added 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. labels May 10, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 10, 2024

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@@ -1483,10 +1483,9 @@ fn suggest_ampmut<'tcx>(
} else {
// otherwise, suggest that the user annotates the binding; we provide the
// type of the local.
let ty_mut = decl_ty.builtin_deref(true).unwrap();
assert_eq!(ty_mut.mutbl, hir::Mutability::Not);
Copy link
Member Author

Choose a reason for hiding this comment

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

Only usage of this mutability remaining in the compiler is this assertion that's in diagnostics. I don't think it's necessary.

@rust-log-analyzer

This comment has been minimized.

@michaelwoerister
Copy link
Member

Nice cleanup, thanks @compiler-errors!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 10, 2024

📌 Commit d50c2b0 has been approved by michaelwoerister

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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 10, 2024
…ichaelwoerister

Make `Ty::builtin_deref` just return a `Ty`

Nowhere in the compiler are we using the mutability part of the `TyAndMut` that we used to return.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#124615 (coverage: Further simplify extraction of mapping info from MIR)
 - rust-lang#124778 (Fix parse error message for meta items)
 - rust-lang#124807 (Migrate `run-make/rustdoc-io-error` to `rmake.rs`)
 - rust-lang#124957 (Make `Ty::builtin_deref` just return a `Ty`)

Failed merges:

 - rust-lang#124888 (Migrate `run-make/rustdoc-output-path` to rmake)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#124615 (coverage: Further simplify extraction of mapping info from MIR)
 - rust-lang#124778 (Fix parse error message for meta items)
 - rust-lang#124797 (Refactor float `Primitive`s to a separate `Float` type)
 - rust-lang#124888 (Migrate `run-make/rustdoc-output-path` to rmake)
 - rust-lang#124957 (Make `Ty::builtin_deref` just return a `Ty`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9a9ec90 into rust-lang:master May 10, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2024
Rollup merge of rust-lang#124957 - compiler-errors:builtin-deref, r=michaelwoerister

Make `Ty::builtin_deref` just return a `Ty`

Nowhere in the compiler are we using the mutability part of the `TyAndMut` that we used to return.
@rustbot rustbot added this to the 1.80.0 milestone May 10, 2024
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request May 13, 2024
…ichaelwoerister

Make `Ty::builtin_deref` just return a `Ty`

Nowhere in the compiler are we using the mutability part of the `TyAndMut` that we used to return.
tautschnig pushed a commit to model-checking/kani that referenced this pull request May 15, 2024
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 17, 2024
…ichaelwoerister

Make `Ty::builtin_deref` just return a `Ty`

Nowhere in the compiler are we using the mutability part of the `TyAndMut` that we used to return.
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request Jul 10, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#124615 (coverage: Further simplify extraction of mapping info from MIR)
 - rust-lang#124778 (Fix parse error message for meta items)
 - rust-lang#124797 (Refactor float `Primitive`s to a separate `Float` type)
 - rust-lang#124888 (Migrate `run-make/rustdoc-output-path` to rmake)
 - rust-lang#124957 (Make `Ty::builtin_deref` just return a `Ty`)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants