-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Properly handle collecting default impls of methods with lifetime parameters. #48818
Conversation
if mono_item.is_instantiable(tcx) | ||
&& should_monomorphize_locally(tcx, &instance) { | ||
output.push(mono_item); | ||
let fn_ty = tcx.erase_regions(&tcx.type_of(method.def_id)); |
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.
Would it be better to erase regions after applying the trait substs?
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.
Maybe if it makes the code simpler.
Ping from triage @eddyb! This PR needs your review. |
This could also be reviewed by somebody else from @rust-lang/compiler, if @eddyb doesn't have time. |
I would prefer to change |
Yes I'm back (somewhat). |
I'll look into it. |
b33724e
to
5324b51
Compare
@arielb1, |
5324b51
to
f9e770a
Compare
☔ The latest upstream changes (presumably #48411) made this pull request unmergeable. Please resolve the merge conflicts. |
I misread that code - you really are not using rust/src/librustc/traits/mod.rs Lines 764 to 769 in e96e54d
I think |
f9e770a
to
5218c2d
Compare
Much nicer now, thanks @arielb1! |
@bors r+ |
📌 Commit 5218c2d has been approved by |
☀️ Test successful - status-appveyor, status-travis |
r? @eddyb
Fixes #47309.