Skip to content

Regression from stable: "Unexpected tail in unsized_info_ty" #42210

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
withoutboats opened this issue May 25, 2017 · 10 comments
Closed

Regression from stable: "Unexpected tail in unsized_info_ty" #42210

withoutboats opened this issue May 25, 2017 · 10 comments
Labels
A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@withoutboats
Copy link
Contributor

There's been a regression in a recent nightly regarding dispatch on unsized types:

trait Foo {
    fn foo() { }
}

struct Bar;

trait Baz {
}

impl Foo for (Bar, Baz) { }


fn main() {
    <(Bar, Baz) as Foo>::foo()
}

https://is.gd/NjyQaO

@withoutboats withoutboats added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-DSTs Area: Dynamically-sized types (DSTs) labels May 25, 2017
@withoutboats
Copy link
Contributor Author

It looks like this function (type_of::unsized_info_ty) just doesn't handle unsized tuples. Can't tell how it started getting called but it did.

@est31
Copy link
Member

est31 commented May 25, 2017

Using the bisect-rust tool I've bisected the regression to commit 9fa25a7, PR #42015

cc @nikomatsakis

@nikomatsakis
Copy link
Contributor

Huh, interesting. I sort of expect this program to be an error, because (IIRC) in tuples we do not permit unsized types, but maybe that's not true or I'm misremembering.

@withoutboats
Copy link
Contributor Author

We permit the final member of a tuple to be unsized: rust-lang/rfcs/pull/1592

@nikomatsakis
Copy link
Contributor

ok, that makes sense

@nikomatsakis
Copy link
Contributor

triage: P-high

I'll investigate and try to stay on top of this. Oddly, I'm not reproducing on my local build, though it includes a few further changes.

@rust-highfive rust-highfive added the P-high High priority label May 26, 2017
@Mark-Simulacrum
Copy link
Member

I am unable to reproduce as well in the same nightly as playpen uses on both macOS and Ubuntu, so there is something interesting going on here for sure I think.

@est31
Copy link
Member

est31 commented May 29, 2017

Confirmed. The ICE is reproducible in rustc 1.19.0-nightly (28fd1e519 2017-05-27) but not reproducible any more in rustc 1.19.0-nightly (d47cf08d5 2017-05-28).

Should we add a test and close this, or should we investigate?

@arielb1
Copy link
Contributor

arielb1 commented May 29, 2017

Niko fixed this in #42251 but put the wrong issue on the fixes line. Closing.

@arielb1 arielb1 closed this as completed May 29, 2017
@Mark-Simulacrum
Copy link
Member

Huh, I wasn't able to reproduce with the 05-27 nightly, but that may have been a fluke of my environment; not sure. I'm fine with closing of course, though.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants