-
Notifications
You must be signed in to change notification settings - Fork 13.3k
(WIP) Small fixes in chalkification #58305
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
☔ The latest upstream changes (presumably #58316) made this pull request unmergeable. Please resolve the merge conflicts. |
fce63d8
to
84aeb45
Compare
Ping from triage @nikomatsakis :) |
☔ The latest upstream changes (presumably #58321) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #59178) made this pull request unmergeable. Please resolve the merge conflicts. |
8decbc5
to
35a36ad
Compare
Some where clauses were not subtituted for generic bound type vars.
6e08720
to
da75625
Compare
src/librustc/infer/nll_relate/mod.rs
Outdated
@@ -436,7 +564,12 @@ where | |||
(_, &ty::Projection(projection_ty)) | |||
if D::normalization() == NormalizationStrategy::Lazy => | |||
{ | |||
Ok(self.relate_projection_ty(projection_ty, a)) | |||
// Swap the respective scopes of `a` and `b` (see comment | |||
// above). <-- FIXME do the scopes matter to `relate_projection_ty`? I think not..? |
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.
Should we remove these lines?
da75625
to
ca5a212
Compare
@bors r=nikomatsakis |
📌 Commit ca5a212 has been approved by |
⌛ Testing commit ca5a212 with merge 1eaa43ef73878fe214783e4b0d74de02d9ecea7c... |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Hmm
|
Probably worth a retry |
/// Relate a type inference variable with a value type. This works | ||
/// by creating a "generalization" G of the value where all the | ||
/// lifetimes are replaced with fresh inference values. This | ||
/// genearlization G becomes the value of the inference variable, |
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.
/// genearlization G becomes the value of the inference variable, | |
/// generalization G becomes the value of the inference variable, |
@bors retry |
⌛ Testing commit ca5a212 with merge 943f65a043a2baca419c66721d161392f45fccf2... |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
(WIP) Small fixes in chalkification Small fixes around region constraints and builtin impls. There are still some type inference errors, for example the following code errors out: ```rust fn main() { let mut x: Vec<i32> = Vec::new(); // ^^^^^^^^ cannot infer type for `std::vec::Vec<_>` } ``` but explicitly specifying `Vec::<i32>::new` works. With these few fixes, the following code now passes type-checking: ```rust fn main() { let mut x: Vec<i32> = Vec::<i32>::new(); x.push(5); println!("{:?}", x); } ``` I also fixed the implied bounds bug as discussed on Zulip and in rust-lang/chalk#206 cc @tmandry r? @nikomatsakis
☀️ Test successful - checks-travis, status-appveyor |
Small fixes around region constraints and builtin impls. There are still some type inference errors, for example the following code errors out:
but explicitly specifying
Vec::<i32>::new
works.With these few fixes, the following code now passes type-checking:
I also fixed the implied bounds bug as discussed on Zulip and in rust-lang/chalk#206
cc @tmandry
r? @nikomatsakis