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

trans: use types from argument patterns instead of the function signature. #18458

Merged
merged 1 commit into from
Oct 31, 2014

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Oct 30, 2014

This fixes ICEs caused by late-bound lifetimes ending up in argument
datum types and being used in cleanup - user Drop impl's would then
fail to monomorphize if the type was used to look up the impl of a
method call - which happens in trans now, I presume for multidispatch.

@nikomatsakis
Copy link
Contributor

@eddyb I was afraid of this problem. You may be hitting the error that a ref binding's type is &T when the value it matches is T. Try using arg.id and not arg.pat.id...I think.

@nikomatsakis
Copy link
Contributor

The true fix I think is that we ought to have two ids for a binding, one to use for the type of value it is matching against (the pattern id) and one to use for the type of the value that is produced by the binding (the binding id).

@eddyb eddyb force-pushed the free-region-args branch 2 times, most recently from d63a561 to 73d00bd Compare October 31, 2014 14:20
…ture.

This fixes ICEs caused by late-bound lifetimes ending up in argument
datum types and being used in cleanup - user Drop impl's would then
fail to monomorphize if the type was used to look up the impl of a
method call - which happens in trans now, I presume for multidispatch.
bors added a commit that referenced this pull request Oct 31, 2014
This fixes ICEs caused by late-bound lifetimes ending up in argument
datum types and being used in cleanup - user Drop impl's would then
fail to monomorphize if the type was used to look up the impl of a
method call - which happens in trans now, I presume for multidispatch.
@bors bors closed this Oct 31, 2014
@bors bors merged commit 96ba514 into rust-lang:master Oct 31, 2014
@eddyb eddyb deleted the free-region-args branch October 31, 2014 21:45
lnicola pushed a commit to lnicola/rust that referenced this pull request Dec 11, 2024
feat: Add diagnostic fix to remove unnecessary wrapper in type mismatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants