Skip to content

Fix issue #36036. #36281

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

Merged
merged 1 commit into from
Sep 5, 2016
Merged

Fix issue #36036. #36281

merged 1 commit into from
Sep 5, 2016

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Sep 5, 2016

Fix #36036.

We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@pnkfelix
Copy link
Member Author

pnkfelix commented Sep 5, 2016

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned nikomatsakis Sep 5, 2016
if pointee.is_sized(tcx, &infcx.parameter_environment, DUMMY_SP) {
Scalar { value: Pointer, non_zero: non_zero }
} else {
let pointee = normalize_associated_type(infcx, pointee);
Copy link
Member

Choose a reason for hiding this comment

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

Oh I didn't realize this line was already there, that makes the fix clearer.

@eddyb
Copy link
Member

eddyb commented Sep 5, 2016

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 5, 2016

📌 Commit 09e6a98 has been approved by eddyb

We were treating an associated type as unsized even when the concrete
instantiation was actually sized. Fix is to normalize before checking
if it is sized.
@bors
Copy link
Collaborator

bors commented Sep 5, 2016

⌛ Testing commit 09e6a98 with merge 38824d1...

bors added a commit that referenced this pull request Sep 5, 2016
Fix issue #36036.

Fix #36036.

We were treating an associated type as unsized even when the concrete instantiation was actually sized. Fix is to normalize before checking if it is sized.
@bors bors merged commit 09e6a98 into rust-lang:master Sep 5, 2016
@pnkfelix pnkfelix added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 8, 2016
@nikomatsakis
Copy link
Contributor

Seems like a clear case for beta-accepted: one line, fairly trivial change, fixes regression. Marking it as such.

cc @rust-lang/compiler

@nikomatsakis nikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 13, 2016
@brson brson mentioned this pull request Sep 16, 2016
@brson brson removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants