Skip to content

Conversation

sinkuu
Copy link
Contributor

@sinkuu sinkuu commented Apr 27, 2018

@rust-highfive
Copy link
Contributor

r? @pnkfelix

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 27, 2018
@eddyb
Copy link
Member

eddyb commented Apr 27, 2018

r? @nikomatsakis For the record, I don't like HasParamEnv but I'm not sure if I can suggest anything better. I think this is not enough in case struct_tail returns a projection that normalizes to a struct.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 27, 2018

📌 Commit d0839d5 has been approved by nikomatsakis

@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 Apr 27, 2018
@eddyb
Copy link
Member

eddyb commented Apr 27, 2018

@bors r-

I believe #48010 isn't fixed, and that this is a pervasive problem with uses of struct_tail.
The followed modified testcase likely still exhibits an ICE with this PR:

#![crate_type = "lib"]
struct Foo;
pub struct Path<T: Bar> {
    inner: T::Slice,
}
pub trait Bar: Sized {
    type Slice: ?Sized;
    fn open(_: &Path<Self>);
}
impl Bar for Foo {
    type Slice = ([u8],);
    fn open(_: &Path<Self>) {
        unimplemented!()
    }
}

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 27, 2018
It have returned `Some` for constants in a trait definition,
and `Instance::resolve` called `tcx.associated_item` for them,
causing ICE.
@sinkuu sinkuu changed the title ICE fixes Fix ICE #48984 Apr 28, 2018
@sinkuu
Copy link
Contributor Author

sinkuu commented Apr 28, 2018

Thanks, I should have noticed that. I removed fbf6423 from this PR (I don't have time to fix for now).

@eddyb
Copy link
Member

eddyb commented Apr 28, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 28, 2018

📌 Commit 9fc2595 has been approved by eddyb

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 28, 2018
@bors
Copy link
Collaborator

bors commented Apr 29, 2018

⌛ Testing commit 9fc2595 with merge f76f6fb...

bors added a commit that referenced this pull request Apr 29, 2018
Fix ICE #48984

* ~~fbf6423  The tail type was not normalized.~~
* d0839d5  The method had a wrong assumption that something whose parent is a trait is an associated item. Fixes #48984.
@bors
Copy link
Collaborator

bors commented Apr 29, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing f76f6fb to master...

@bors bors merged commit 9fc2595 into rust-lang:master Apr 29, 2018
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants