815 Commits

Author SHA1 Message Date
Niko Matsakis
9b4fe44280 introduce Eq type-op 2018-06-26 10:31:49 -04:00
Niko Matsakis
2b52793f74 introduce Subtype type_op 2018-06-26 10:31:49 -04:00
Niko Matsakis
909b10c33b introduce type_op 2018-06-26 10:31:49 -04:00
Santiago Pastorino
d3defcaf3b
Run rustfmt 2018-06-19 21:24:39 -03:00
Santiago Pastorino
f4fc43cb20
Suggest that values are dropped in the opposite order they are defined 2018-06-19 21:21:50 -03:00
Niko Matsakis
2e25bed9b1 remove some #[inline(never)] 2018-06-09 17:20:15 -04:00
Niko Matsakis
908c1f2f0c use DUMMY_NODE_ID as the body_id during NLL type-checking
The choice is arbitrary since there is only one involved.
2018-06-09 11:06:41 -04:00
Niko Matsakis
6a5a4874a0 convert type-check constraints into NLL constraints on the fly
We used to accumulate a vector of type-check constraints, but now we
generate them as we go, and just store the NLL-style
`OutlivesConstraint` and `TypeTest` information.
2018-06-09 11:02:14 -04:00
Niko Matsakis
ba6a7f7500 rename Constraint to OutlivesConstraint 2018-06-09 11:02:14 -04:00
Niko Matsakis
9980415fbd key drop-data computation by ty, not var 2018-06-09 11:02:14 -04:00
Niko Matsakis
d476147629 cache the dropck_outlives computation per variable 2018-06-09 11:02:14 -04:00
Niko Matsakis
780f6c52cc extract out fully_perform_op_and_get_region_constraints 2018-06-09 11:02:13 -04:00
Niko Matsakis
7ff89805fe put the RegionConstraintData into an Rc 2018-06-09 11:02:13 -04:00
Niko Matsakis
8825f42a07 librustc_mir/borrow_check/nll/type_check/mod.rs: rustfmt 2018-06-09 11:02:13 -04:00
Niko Matsakis
55c6357daf micro-optimize empty predicate and normalize lists 2018-06-09 11:02:13 -04:00
Niko Matsakis
73a09f35b1 skip eq_types and sub_types when the two types are equal 2018-06-09 11:02:13 -04:00
Niko Matsakis
956e2f8348 add some instrumentation 2018-06-09 11:02:13 -04:00
Gergely Nagy
f1c9247663 NLL performance boost 2018-06-06 17:31:24 +02:00
Vytautas Astrauskas
265b04df9a Change the log level of the message reporting the selected Polonius algorithm to debug. 2018-06-02 14:20:04 +02:00
Vytautas Astrauskas
1404c00eb0 Allow choosing Polonius algorithm via environment variable POLONIUS_ALGORITHM. 2018-06-02 14:17:12 +02:00
bors
20af72b943 Auto merge of #51106 - davidtwco:issue-50934, r=nikomatsakis
Optimize the way that loans are killed in borrowck dataflow

Fixes #50934.
r? @nikomatsakis
2018-05-30 09:24:20 +00:00
Felix S. Klock II
24abe6f363 rust-lang/rust#27282: Add StatementKind::ReadForMatch to MIR.
(This is just the data structure changes and some boilerplate match
code that followed from it; the actual emission of these statements
comes in a follow-up commit.)
2018-05-29 23:01:36 +02:00
Niko Matsakis
948f77c71f tweak debug output some more 2018-05-29 15:09:37 -04:00
Santiago Pastorino
a8b36c9e9a
Run rustfmt 2018-05-29 10:19:47 -03:00
Douglas Campos
b45aebfdf6
it compiles, but we do not use the output yet 2018-05-29 10:19:46 -03:00
kennytm
e667e7be60
Rollup merge of #51047 - spastorino:use_polonius_engine_facts, r=nikomatsakis
Use AllFacts from polonius-engine
2018-05-26 19:32:22 +08:00
bors
910e29a45b Auto merge of #50998 - bobtwinkles:nll_facts_invalidate_followup, r=nikomatsakis
NLL facts invalidate followup

Refactors to share code with the rest of borrow-check.

r? @nikomatsakis
2018-05-25 06:26:26 +00:00
Santiago Pastorino
8429d11a0b
Use AllFacts from polonius-engine 2018-05-24 19:56:02 -03:00
bobtwinkles
ed72977475 Remove unnecessary type annotations 2018-05-23 07:57:21 -07:00
bors
531e4ab7bc Auto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis
Generate "invalidates" facts when -Znll-facts is passed

Most of the new code is copied directly from the heart of the MIR borrowchecker. I was expecting more fundamental structural changes, hence the copying. This appears to work as it stands, but I'd like to submit a follow-up PR to reduce code duplication. I figured that could wait though, since this is blocking a large amount of work in the borrow check repository and I'm out of time for tonight =).

r? @nikomatsakis
2018-05-23 07:15:34 +00:00
Eduard-Mihai Burtescu
7e4d8718cb rustc: use intern_* instead of mk_* where possible. 2018-05-21 12:13:19 +03:00
Eduard-Mihai Burtescu
e3df729c25 rustc: make mk_substs_trait take &[Kind] instead of &[Ty]. 2018-05-21 12:13:17 +03:00
bobtwinkles
e62fa27071 Refactor borrowck to share more code with fact dumping
Following up my changes in #50798, I wanted to grab at least the low-hanging
fruit for code deduplication.
2018-05-18 23:47:48 -07:00
bors
612ca14b81 Auto merge of #50593 - nikomatsakis:nll-no-location, r=nikomatsakis
stop considering location when computing outlives relationships

This doesn't (yet?) use SEME regions, but it does ignore the location for outlives constraints. This makes (I believe) NLL significantly faster -- but we should do some benchmarks. It regresses the "get-default" family of use cases for NLL, which is a shame, but keeps the other benefits, and thus represents a decent step forward.

r? @pnkfelix
2018-05-17 21:36:43 +00:00
Mark Simulacrum
9e3432447a Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
bobtwinkles
965eef92c4 invalidates: properly handle terminators 2018-05-17 00:49:06 -07:00
bobtwinkles
a82c097296 Fix tidy errors 2018-05-16 07:08:45 -07:00
bobtwinkles
0c902cfeca Complete implementation of invalidates facts 2018-05-15 22:31:29 -07:00
bobtwinkles
3b36fa8c3f Get closer to successful compilation 2018-05-14 23:15:56 -07:00
bobtwinkles
f03518bfad Framework and rough implementation for invalidates facts
this probably doesn't compile and definitely doesn't work
2018-05-14 20:49:02 -07:00
Mark Simulacrum
d7f5e1f5d1
Rollup merge of #50550 - llogiq:fmt-result, r=petrochenkov
use fmt::Result where applicable

This is a quite boring PR, but I think the type alias improves readability, so why not use it?
2018-05-12 07:32:27 -06:00
John Kåre Alsaker
fdd9787777 Introduce ConstValue and use it instead of miri's Value for constant values 2018-05-11 13:01:44 +02:00
Niko Matsakis
c990309f61 rustfmt to pacify the mercilous tidy 2018-05-10 05:52:43 -04:00
Niko Matsakis
434d59a2c9 ignore the point where the outlives requirement was added 2018-05-09 23:21:24 -03:00
Niko Matsakis
accfdcc905 rename add to add_element 2018-05-09 23:21:24 -03:00
Niko Matsakis
ed72950fde rework causal tracking to explore outlives relationships
Instead of tracking the "cause" of each bit that gets added, try to
recover that by walking outlives relationships. This is currently
imprecise, since it ignores the "point" where the outlives relationship
is incurred -- but that's ok, since we're about to stop considering that
overall in a later commit. This does seem to affect one error message
negatively, I didn't dig *too* hard to find out why.
2018-05-09 23:21:24 -03:00
Niko Matsakis
1fb17aba69 generalize blame_span 2018-05-09 23:21:24 -03:00
Andre Bogus
e333725664 use fmt::Result where applicable 2018-05-09 02:01:37 +02:00
John Kåre Alsaker
c9d9c249ec Insert fields from TypeAndMut into TyRef to allow layout optimization 2018-05-08 16:21:58 +02:00
John Kåre Alsaker
710b4ad2a5 Store the GeneratorInterior in the new GeneratorSubsts 2018-05-08 16:21:58 +02:00