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

integrate MIR type-checker with NLL inference #45825

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fulfill: remove dead code
  • Loading branch information
nikomatsakis committed Nov 15, 2017
commit 4afe423fbfeae115e8ff2fb9e9aa99e00cf90095
8 changes: 0 additions & 8 deletions src/librustc/traits/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ impl<'a, 'gcx, 'tcx> FulfillmentContext<'tcx> {
});
}

pub fn register_region_obligation(&mut self,
t_a: Ty<'tcx>,
r_b: ty::Region<'tcx>,
cause: ObligationCause<'tcx>)
{
register_region_obligation(t_a, r_b, cause, &mut self.region_obligations);
}

pub fn register_predicate_obligation(&mut self,
infcx: &InferCtxt<'a, 'gcx, 'tcx>,
obligation: PredicateObligation<'tcx>)
Expand Down