Skip to content

Normalize after substituting via field.ty() - #89441

Merged
bors merged 1 commit into
rust-lang:masterfrom
Nadrieril:fix-89393
Oct 2, 2021
Merged

Normalize after substituting via field.ty()#89441
bors merged 1 commit into
rust-lang:masterfrom
Nadrieril:fix-89393

Conversation

@Nadrieril

Copy link
Copy Markdown
Member

Back in #72476 I hadn't understood where the problem was coming from, and only worked around the issue. What happens is that calling field.ty() on a field of a generic struct substitutes the appropriate generics but doesn't normalize the resulting type.
As a consumer of types I'm surprised that one would substitute without normalizing, feels like a footgun, so I added a comment.

Fixes#89393.

@NadrierilNadrieril added the A-exhaustiveness-checking Relating to exhaustiveness / usefulness checking of patterns label Oct 1, 2021
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @davidtwco

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 1, 2021
@tmandry

Copy link
Copy Markdown
Member

r? @tmandry

@bors r+

@bors

bors commented Oct 1, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 68b76a4 has been approved by tmandry

@borsbors 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 Oct 1, 2021
@tmandry

Copy link
Copy Markdown
Member

@bors rollup

@ManishearthManishearth mentioned this pull request Oct 1, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2021
…arth
Rollup of 7 pull requests
Successful merges:
- rust-lang#85223 (rustdoc: Clarified the attribute which prompts the warning)
- rust-lang#88847 (platform-support.md: correct ARMv7+MUSL platform triple notes)
- rust-lang#88963 (Coerce const FnDefs to implement const Fn traits )
- rust-lang#89376 (Fix use after drop in self-profile with llvm events)
- rust-lang#89422 (Replace whitespaces in doctests' name with dashes)
- rust-lang#89440 (Clarify a sentence in the documentation of Vec (rust-lang#84488))
- rust-lang#89441 (Normalize after substituting via `field.ty()`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 5ab1245 into rust-lang:masterOct 2, 2021
@rustbotrustbot added this to the 1.57.0 milestone Oct 2, 2021
@Nadrieril
Nadrieril deleted the fix-89393 branch October 2, 2021 09:43
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 7, 2021
…arth
Rollup of 7 pull requests
Successful merges:
- rust-lang#85223 (rustdoc: Clarified the attribute which prompts the warning)
- rust-lang#88847 (platform-support.md: correct ARMv7+MUSL platform triple notes)
- rust-lang#88963 (Coerce const FnDefs to implement const Fn traits )
- rust-lang#89376 (Fix use after drop in self-profile with llvm events)
- rust-lang#89422 (Replace whitespaces in doctests' name with dashes)
- rust-lang#89440 (Clarify a sentence in the documentation of Vec (rust-lang#84488))
- rust-lang#89441 (Normalize after substituting via `field.ty()`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-exhaustiveness-checkingRelating to exhaustiveness / usefulness checking of patternsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: Failing to compile gfx-backend-metal: Unexpected type for constructor

6 participants

@Nadrieril@rust-highfive@tmandry@bors@davidtwco@rustbot