-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
integrate MIR type-checker with NLL inference #45825
Merged
bors
merged 65 commits into
rust-lang:master
from
nikomatsakis:nll-factor-region-inference
Nov 16, 2017
Merged
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
4afe423
fulfill: remove dead code
nikomatsakis 64206b4
move region constraints into inference context
nikomatsakis 0d78e40
convert EXTRA_REQUIREMENT_IN_IMPL into a hard error
nikomatsakis c925008
assert that we are consuming all of the region obligations
nikomatsakis d73be85
extract `regionck_outlives` into a separate helper function
nikomatsakis 22cd041
move the `region_obligations` processing code into `InferCtxt`
nikomatsakis e0630e8
refactor how we extract outlives bounds from trait definitions
nikomatsakis 3cc44a5
do not invoke `required_region_bounds` in `region_obligations`
nikomatsakis b587c1a
regionck: only add implied bounds from root fn to `free_region_map`
nikomatsakis 0c81d01
extract out the implied bounds code from `regionck`
nikomatsakis 56e5eb5
rename mod `region_obligations` to `outlives::obligations`
nikomatsakis 15a2dfa
move the `OutlivesEnvironment` into `infer` so that `nll` can use it
nikomatsakis 6d67296
thread location info through mir typeck (but do not use)
nikomatsakis 9e8abd7
apply rustfmt to `type_check`
nikomatsakis efa09db
modify MIR type-checker to process obligations as they are incurred
nikomatsakis 467f2ea
extract lexical region resolution into its own sub-module
nikomatsakis 58c7760
move region resolution to be a sibling of `region_inference`
nikomatsakis ef5de07
fix rename to block_data in type_check.rs
nikomatsakis 9d63330
region_inference: tighten up `pub`, stop re-exporting enum variants
nikomatsakis 8e9e154
region_inference: extract taint into a sub-module
nikomatsakis b769785
move `RegionResolutionError` into `lexical_region_resolve`
nikomatsakis ec48b01
extract storage of region values from `RegionVarBindings`
nikomatsakis daceedf
region_inference: rustfmt
nikomatsakis 63d658d
extract the `tcx` out from `RegionVarBindings`
nikomatsakis cff191d
move refcells out from `RegionVarBindings` and up into `InferCtxt`
nikomatsakis 23abd85
rename `region_inference` module to `region_constraints`
nikomatsakis 48d8f72
infer: rename `region_vars` field to `region_constraints`
nikomatsakis 326ec52
rename RegionVarBindings to RegionConstraintCollector
nikomatsakis adf1519
make the `region_constraints` field an `Option`
nikomatsakis f6037f2
separate the `Collector` from the `Data` it is collecting
nikomatsakis bea6b94
fix error messages relating to removing lint for E0276
nikomatsakis 524e23a
make `RegionVid` implement `Idx` and use `IndexVec`
nikomatsakis a8daa37
region_constraints: only push givens into undo-log if in a snapshot
nikomatsakis 1efcf1a
split the `var_origins` from the `RegionConstraintData`
nikomatsakis 1430a60
add method `take_and_reset_region_constraints` to `InferCtxt`
nikomatsakis 034018c
rustfmt `lexical_region_resolve`
nikomatsakis 37945fe
MIR typeck: rustfmt
nikomatsakis ad93b69
MIR typeck: refactor to track region constraints
nikomatsakis 89c1b60
replace `usize` with `RegionIndex` in indices map
nikomatsakis 72675d8
replace `RegionIndex` with `RegionVid` (which now impls Idx)
nikomatsakis 09b44bb
IndexVec: add `'_` to make clear where borrowing is happening
nikomatsakis a87d1bb
infer: give access to region variable origins
nikomatsakis 109c9a7
infer: extract total number of region variables from infcx
nikomatsakis 51ce1f9
formalize giving ownership of region vars to region inf. context
nikomatsakis ef392bc
simplify lifetime annotations for `MirBorrowckCtxt`
nikomatsakis 8d3219e
erase regions in MIR borrowck when checking if type moves by default
nikomatsakis 5592bb7
MIR-dump: print return type from local_decls for `_0`
nikomatsakis 12534e9
renumber: handle ReturnTy better
nikomatsakis 32f964c
renumber: debug logs, use `visit_region` rather than `visit_rvalue`
nikomatsakis d9e841e
region_infer: improved debug logging
nikomatsakis 4b743da
integrate NLL with MIR type-checker
nikomatsakis b383ab7
update READMEs to describe the new situation
nikomatsakis 013f88b
infer/outlives: add license
nikomatsakis 267574c
convert TODO in traits into a FIXME
nikomatsakis 9da54c1
add FIXME for converting RegionVid to use `newtype_index!`
nikomatsakis 8cea053
fix mir-opt NLL tests -- variable `'_#0r` is now `'static`
nikomatsakis c7c2603
factor out `free_region_binding_scope` helper
nikomatsakis 5a8c1eb
leak the affects of closures on the free-region-map, like we used to
nikomatsakis f722591
Nit: fix wording in README
nikomatsakis 15739b8
Nit: rework region obligations to a snapshotted vector
nikomatsakis 11c84c6
Nit: improve comment to explain why we wait until regionck
nikomatsakis a73d620
Nit: reset more state after `take_and_reset_data`
nikomatsakis a94d2a6
Nit: fix typo
nikomatsakis 9e29662
obligations.rs: rustfmt
nikomatsakis 8c109f5
infer/outlives/obligations.rs: wrap some long lines
nikomatsakis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
ok