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

Fix ICE in rustdoc when merging generic and where bounds of an Fn with an output #63937

Open
wants to merge 3 commits into
base: master
from

Conversation

@Nashenas88
Copy link
Contributor

commented Aug 27, 2019

Fixes #57180

@Nashenas88

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

@Nashenas88

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

I still need to add the test, just not sure where to put it. I have a minimized case that shows this is resolved. Done

@Nashenas88

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

}
_ => panic!("expected only type parameters"),
}
}
params
}

fn ty_bounds(bounds: Vec<clean::GenericBound>) -> Vec<clean::GenericBound> {

This comment has been minimized.

Copy link
@Nashenas88

Nashenas88 Aug 27, 2019

Author Contributor

This seemed like pointless noise, so I removed it. If this was setup for future work, let me know so I can add a comment explaining that for future readers 😃

@@ -45,11 +45,6 @@ pub fn where_clauses(cx: &DocContext<'_>, clauses: Vec<WP>) -> Vec<WP> {
}
}

// Simplify the type parameter bounds on all the generics

This comment has been minimized.

Copy link
@Nashenas88

Nashenas88 Aug 27, 2019

Author Contributor

Since ty_bounds was a nop, just a pass-through, this transform seemed to just be added noise and should be safe to remove.

@Nashenas88

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

I was also able to determine that this bug was introduced somewhere between 1.30 and 1.31. The compiler processes the code just fine in 1.30, but ICE's in 1.31.

impl<F: Fn() -> u32>
Trait for Struct<F>
where
F: Fn() -> u32,

This comment has been minimized.

Copy link
@Nashenas88

Nashenas88 Aug 28, 2019

Author Contributor

Should I run format on this? Also, does this test need a comment saying it's a regression test, or is its existence enough?

@JohnCSimon

This comment has been minimized.

Copy link

commented Sep 7, 2019

Ping from triage
@QuietMisdreavus can you please review this?
Thank you.

@JohnCSimon

This comment has been minimized.

Copy link

commented Sep 14, 2019

Ping from triage
@QuietMisdreavus @Nashenas88 This PR hasn't been updated in the last six days. Can you post any status?
Thank you.

@Nashenas88

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2019

I was doing some analysis on the originating cause (documented in #57180). I mostly believe this is still the proper fix, but I was hoping someone familiar with this codebase could review and help bump up the confidence here. I requested @QuietMisdreavus for review since she was helping me track down the bug during impl days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.