-
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
[BETA] Universe leak check #58641
Closed
nikomatsakis
wants to merge
8
commits into
rust-lang:beta
from
nikomatsakis:universe-leak-check-beta
Closed
[BETA] Universe leak check #58641
nikomatsakis
wants to merge
8
commits into
rust-lang:beta
from
nikomatsakis:universe-leak-check-beta
Commits on Feb 22, 2019
-
make generalization code create new variables in correct universe
In our type inference system, when we "generalize" a type T to become a suitable value for a type variable V, we sometimes wind up creating new inference variables. So, for example, if we are making V be some subtype of `&'X u32`, then we might instantiate V with `&'Y u32`. This generalized type is then related `&'Y u32 <: &'X u32`, resulting in a region constriant `'Y: 'X`. Previously, however, we were making these fresh variables like `'Y` in the "current universe", but they should be created in the universe of V. Moreover, we sometimes cheat in an invariant context and avoid creating fresh variables if we know the result must be equal -- we can only do that when the universes work out.
Configuration menu - View commit details
-
Copy full SHA for 3e41331 - Browse repository at this point
Copy the full SHA 3e41331View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6908300 - Browse repository at this point
Copy the full SHA 6908300View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed3ac1a - Browse repository at this point
Copy the full SHA ed3ac1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed747ea - Browse repository at this point
Copy the full SHA ed747eaView commit details -
introduce a dummy leak check and invoke it in all the right places
This set of diffs was produced by combing through b68fad6 and seeing where the `leak_check` used to be invoked and how.
Configuration menu - View commit details
-
Copy full SHA for bdc70a0 - Browse repository at this point
Copy the full SHA bdc70a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8fdb9a - Browse repository at this point
Copy the full SHA f8fdb9aView commit details -
update test files to reflect new output
One surprise: old-lub-glb-object.rs, may indicate a bug
Configuration menu - View commit details
-
Copy full SHA for b0fd835 - Browse repository at this point
Copy the full SHA b0fd835View commit details -
This preserves the error you currently get on stable for the old-lub-glb-object.rs test.
Configuration menu - View commit details
-
Copy full SHA for c820008 - Browse repository at this point
Copy the full SHA c820008View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.