-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[missing_const_for_fn
]: fix FP when arg ty is impl trait alias ty
#13045
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
Conversation
inputs.iter().any(|input| { | ||
// NB: Other alias ty kind might missing default. | ||
// For example, an associate type alias declared as `type T: Fn();` | ||
// would cause ICE when `type_of` is called with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this comment means, I've tested if changing test's Foo to that piece of code caused an ICE (that would be quite the blocker) and it doesn't cause one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, what I meant was:
When matching the input.kind()
on the next line, if the alias ty is something else, i.e. AliasTyKind::Projection
would cause ICE in that scenario. You can verify it by changing the ty::AliasTyKind::Weak
to _
as well.
(It seems that it only happens with AliasTyKind::Projection
atm, but I wasn't too sure, so I put the comment there trying to give a head's up for others)
I'll make some adjustments on this, along with the test case~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, and this should be ready! Thanks for the contribution.
70c8010
to
1bc298a
Compare
1bc298a
to
08992d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! ❤️
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
closes: #13009
changelog: [
missing_const_for_fn
]: fix FP when arg ty is impl trait alias ty