gaurikholkar
1fb25fbbe3
reduce nested loops in the code
2018-04-06 20:00:21 +05:30
gaurikholkar
12d141561d
tidy fixes
2018-04-05 22:49:09 +05:30
gaurikholkar
1b06fe1ef5
Merge branch 'master' of https://github.com/rust-lang/rust into e0389
2018-04-05 21:52:40 +05:30
gaurikholkar
6c649fbed4
address code review comments
2018-04-05 21:48:06 +05:30
bors
3c5f850958
Auto merge of #49472 - nikomatsakis:nll-optimize-constraint-prop-1, r=pnkfelix
...
optimize NLL constraint propagation a little
Removes a bone-headed hot spot in NLL constant propagation; we were re-allocating the stack vector and hashmap as we repeated the DFS. This change shares those resources across each call.
It also modifies the constraint list to be a linked list; arguably I should revert that, though, as this didn't turn out to be a perf hit and perhaps the old code was clearer? (Still, the new style appeals to me.)
r? @pnkfelix
2018-03-31 04:09:43 +00:00
Niko Matsakis
ca8176d778
apply pnkfelix nits
2018-03-29 13:32:12 -04:00
Niko Matsakis
bd90302af6
document reason for #[inline(never)] annotation
2018-03-29 13:32:12 -04:00
Niko Matsakis
499d784fbd
amortize dfs storage creation
2018-03-29 13:32:12 -04:00
Niko Matsakis
96f3e560d9
remove dependency map and instead use a linked list of constraints
2018-03-29 13:32:12 -04:00
Niko Matsakis
1ef1b92379
add #[inline(never)]
annotations
2018-03-29 03:44:00 -04:00
bors
9c9424de51
Auto merge of #49202 - csmoe:trait_engine, r=nikomatsakis
...
Introduce trait engine
address #48895 step 1: introduce trait engine
2018-03-27 14:31:43 +00:00
csmoe
0c4062a94d
import trait engine to typeck
2018-03-23 09:22:07 +08:00
Niko Matsakis
04aeef8d45
Debug logs for replace_bound_regions_with_nll_infer_vars
2018-03-22 22:40:51 +00:00
David Wood
692a931887
UserAssertTy can handle inference variables.
...
This commit modifies the UserAssertTy statement to take a canonicalized
type rather than a regular type so that we can handle the case where the
user provided type contains a inference variable.
2018-03-22 21:11:02 +00:00
David Wood
5d2a60c57e
No longer visiting user_assert_ty statements in constraint generation.
2018-03-22 21:11:02 +00:00
David Wood
d4b9a7874b
Added comment in renumberer about UserAssertTy.
2018-03-22 21:11:02 +00:00
David Wood
ee4c7ac154
Added override in renumberer for UserAssertTy.
2018-03-22 21:11:01 +00:00
David Wood
239b3ec473
Changed location to at_self from at_successor.
2018-03-22 21:11:01 +00:00
David Wood
5f21aa8734
Added initial processing of UserAssertTy statements.
2018-03-22 21:11:00 +00:00
David Wood
17b285d203
Added UserAssertTy statement.
2018-03-22 21:10:59 +00:00
bors
5ebf74851d
Auto merge of #47630 - canndrew:exhaustive-patterns, r=nikomatsakis
...
Stabilise feature(never_type). Introduce feature(exhaustive_patterns)
This stabilizes `!`, removing the feature gate as well as the old defaulting-to-`()` behavior. The pattern exhaustiveness checks which were covered by `feature(never_type)` have been moved behind a new `feature(exhaustive_patterns)` gate.
2018-03-14 23:43:04 +00:00
kennytm
b5f102c7ae
Rollup merge of #48840 - varkor:idxset-cleanup, r=pnkfelix
...
Remove some unnecessary IdxSet methods
This replaces `IdxSet:: reset_to_empty` with `IdxSet:: clear`, and `IdxSet::elems`/`IdxSet::each_bit` with `IdxSet::iter`. Based on some [comments on #rustc](https://botbot.me/mozilla/rustc/2018-01-23/?msg=96063396 ).
r? @pnkfelix
2018-03-15 00:15:46 +08:00
Andrew Cann
9b15ddb29e
remove defaulting to unit
...
Types will no longer default to `()`, instead always defaulting to `!`.
This disables the associated warning and removes the flag from TyTuple
2018-03-14 12:44:51 +08:00
Niko Matsakis
e4728e494e
transition various normalization functions to the new methods
...
In particular:
- `fully_normalize_monormophic_ty` => `normalize_erasing_regions`
- `normalize_associated_type_in_env` => `normalize_erasing_regions`
- `fully_normalize_associated_types_in` => `normalize_erasing_regions`
- `erase_late_bound_regions_and_normalize` => `normalize_erasing_late_bound_regions`
2018-03-13 11:22:07 -04:00
Niko Matsakis
ca87d24467
introduce infcx.at(..).dropck_outlives(..)
operaton [VIC]
...
Backed by a canonicalized query. This computes all the types/regions that need
to be live when the destructor runs (i.e., that the dtor may access).
2018-03-13 11:22:07 -04:00
Niko Matsakis
3a50b41da4
introduce infcx.at(..).normalize(..)
operation [VIC]
...
It is backed by the new `normalize_projection_ty` query, which uses
canonicalization.
2018-03-13 11:22:05 -04:00
Niko Matsakis
993c1488cc
add canonicalize
method to InferCtxt
[VIC]
2018-03-13 11:21:31 -04:00
Niko Matsakis
652b3b71f3
random reformatting
2018-03-13 11:21:30 -04:00
gaurikholkar
311a8bef6e
address code review comments
2018-03-12 20:14:37 +05:30
gaurikholkar
55bd9148eb
fix warnings
2018-03-11 00:07:26 +05:30
gaurikholkar
0c7fc046d3
code refactor, modify compile-fail tests
2018-03-10 20:55:02 +05:30
gaurikholkar
7a266a6902
minor changes
2018-03-10 20:52:22 +05:30
gaurikholkar
3f0ce0858e
minor refactorings to fix trait import issue
2018-03-10 20:52:22 +05:30
gaurikholkar
f60788b9b2
update visit_local for FindLocalAssignmentVisitor
2018-03-10 20:52:22 +05:30
gaurikholkar
308e30eb7a
adding Visitor changes
2018-03-10 20:52:21 +05:30
gaurikholkar
7d590b533e
changes for new compile-fail/E0389 message
2018-03-10 20:51:53 +05:30
bobtwinkles
138365368a
Finally start down the right path
2018-03-09 13:53:35 -05:00
bobtwinkles
580467d306
Rename BorrowData::location to BorrowData::reserve_location
...
in preparation for rewritting two phase borrow support
2018-03-09 13:51:39 -05:00
Manish Goregaokar
d7f44ac52c
Rollup merge of #48682 - spastorino:make_causal_lazy, r=nikomatsakis
...
[NLL] Make causal tracking lazy
Close #46590
cc @nikomatsakis
2018-03-08 11:25:56 -08:00
Oliver Schneider
5125d58fcf
Simplify code around reading/writing ConstVals
2018-03-08 08:34:12 +01:00
Oliver Schneider
9857eaa4df
Nuke ConstInt and Const*size
2018-03-08 08:34:10 +01:00
Oliver Schneider
d26ebec81c
Hide the RefCell inside InterpretInterner
...
It was too easy to get this wrong
2018-03-08 08:34:09 +01:00
Oliver Schneider
b33e4e784e
Fully use miri in trans
2018-03-08 08:34:05 +01:00
Oliver Schneider
28572d2c1f
Nuke the entire ctfe from orbit, it's the only way to be sure
2018-03-08 08:08:14 +01:00
Oliver Schneider
918b6d7633
Produce instead of pointers
2018-03-08 08:08:14 +01:00
Alex Crichton
62c8e255d1
Rollup merge of #48651 - PramodBisht:issues/48425, r=oli-obk
...
Fixed #48425 : Various functions taking a `TyCtxt` and a `Span` should be taking a `TyCtxtAt`
Hi @oli-obk
I have done some code refactoring to fix #48425 , Please let me know if anything else is required on this.
2018-03-07 07:09:52 -08:00
Santiago Pastorino
52a47d4c02
Run rustfmt over modified files
2018-03-06 18:03:09 -03:00
Santiago Pastorino
4b12ded889
mir is already a reference
2018-03-06 18:03:09 -03:00
Santiago Pastorino
c85c5a0423
Make causal tracking lazy
2018-03-06 18:03:05 -03:00
Santiago Pastorino
ec761903ec
Remove nll-dump-cause flag and always track causes
2018-03-06 10:34:46 -03:00