Niko Matsakis
9b1d2229ff
change the enter_canonical_trait_query
method to give a fulfill cx
2018-06-27 16:04:32 -04:00
Niko Matsakis
f0fdce31d9
update comments
2018-06-27 15:45:53 -04:00
Niko Matsakis
5fd3b26280
rename prequery
to try_fast_path
2018-06-27 15:45:53 -04:00
Niko Matsakis
0a0dae0964
pull out ParamEnvAnd
and remove QueryKey
2018-06-27 15:45:49 -04:00
Niko Matsakis
b2e899f843
move into provide
methods
2018-06-27 09:42:21 -04:00
Niko Matsakis
c3f7e02fb6
rename to shrink_to_tcx_lifetime
2018-06-27 09:27:07 -04:00
Niko Matsakis
c2f7757bc5
extend comment to note complications around lifetimes
2018-06-27 08:55:41 -04:00
Niko Matsakis
35a5065573
pacify the mercilous tidy
2018-06-27 07:28:25 -04:00
Niko Matsakis
c6a7c6fc68
improve comments on dropck_outlives
2018-06-27 07:26:29 -04:00
Niko Matsakis
1be4fffc24
improve comment on instantiate NLL query result fn
2018-06-27 07:19:17 -04:00
Niko Matsakis
5bfdb97684
remove either
dependency we are not using
2018-06-27 07:05:40 -04:00
Niko Matsakis
59ea17ed3f
rename upcast
to cast_to_tcx_lifetime
and improve comment
2018-06-27 07:02:37 -04:00
Niko Matsakis
d695512437
fix wrong query description
2018-06-27 06:57:20 -04:00
Niko Matsakis
d49d5222a9
merge all the type_op_foo
modules into one as they are so trivial
2018-06-27 06:53:54 -04:00
Niko Matsakis
66c88392b4
use query boiler plate for normalize_projection_ty
too
2018-06-27 06:49:43 -04:00
Niko Matsakis
e6c8c632b7
use query boilerplate for prove-predicate -- slightly inefficient
...
This requires us to allocate a single entry vector we didn't use to
allocate. I doubt this makes a difference in practice, as this only
occurs for cache misses.
2018-06-27 06:49:20 -04:00
Niko Matsakis
ac40d73c6f
use query boilerplate for subtype
2018-06-27 06:48:52 -04:00
Niko Matsakis
fa71af4192
use query boilerplate for normalize
2018-06-27 06:48:43 -04:00
Niko Matsakis
2fd8a312d9
extract out query boilerplate and use for Eq
2018-06-27 06:48:32 -04:00
Niko Matsakis
188ad384a3
nit: don't import Debug directly
2018-06-27 06:01:19 -04:00
Niko Matsakis
e98d376e6f
do not re-create the LocationTable
for every path
...
🤦
2018-06-26 13:18:27 -04:00
Niko Matsakis
82169b6134
convert query-type-op to create query-region-constraint directly
2018-06-26 13:18:27 -04:00
Niko Matsakis
a583269af5
add a streamlined instantiate_query_result
method for NLL queries
2018-06-26 13:18:25 -04:00
Niko Matsakis
e895f3aded
convert dropck_outlives
type-op to use the query
2018-06-26 12:41:47 -04:00
Niko Matsakis
977f3fc940
introduce QueryKey
separation
2018-06-26 12:41:47 -04:00
Niko Matsakis
f24e90ec25
extract more helpers from instantiating query result
2018-06-26 12:41:47 -04:00
Niko Matsakis
7bab9f0974
WIP fix error messages for propagate_approximated_shorter_to_static_no_bound
2018-06-26 12:41:47 -04:00
Niko Matsakis
7c72e778ab
instantiate closure requirements as query-region-constraints [WIP]
...
Marked as WIP because it invalidates some tests.
2018-06-26 10:59:40 -04:00
Niko Matsakis
3e32d42532
transition to Fallible
2018-06-26 10:59:40 -04:00
Niko Matsakis
2a0b3d6224
introduce Normalizable
trait for things directly normalizable
2018-06-26 10:59:40 -04:00
Niko Matsakis
de7e941e4e
convert prove_predicate
into a query
2018-06-26 10:59:40 -04:00
Niko Matsakis
d6136837b7
convert predicates
to operate on 1 predicate at a time
2018-06-26 10:59:40 -04:00
Niko Matsakis
4beea9943b
make Subtype
a true query
2018-06-26 10:59:40 -04:00
Niko Matsakis
71ce2e7eb6
make Eq
a true query
2018-06-26 10:59:40 -04:00
Niko Matsakis
1acffada44
introduce canonicalize_hr_query_hack
...
As the comment explains, this is needed to prevent subtype from going
awry in higher-ranked cases, due to #33684 . The proper fix here is
introducing universes (#48536 ).
2018-06-26 10:59:40 -04:00
Niko Matsakis
2655522580
move type_op
into rustc
2018-06-26 10:59:40 -04:00
Niko Matsakis
3b446b4b91
introduce QueryTypeOp
trait and use it for eq
2018-06-26 10:59:40 -04:00
Niko Matsakis
1d664622b6
remove Canonicalization
trait, which serves no purpose
2018-06-26 10:59:38 -04:00
Niko Matsakis
d748dc5db0
extract query_result_substitution
helper
2018-06-26 10:51:10 -04:00
Niko Matsakis
75e3a9c8fd
rename instantiate_query_result
2018-06-26 10:51:08 -04:00
Niko Matsakis
e72dc79488
make convert
so it can apply to a single constraint
2018-06-26 10:49:24 -04:00
Niko Matsakis
3f1961d62e
extract type-ops into their own submodules
2018-06-26 10:49:24 -04:00
Niko Matsakis
7cb86ed1e3
change to crate
privacy instead of pub(super)
2018-06-26 10:49:24 -04:00
Niko Matsakis
21592cdecd
move Debug
bounds onto Lift
...
Just for convenience.
2018-06-26 10:49:24 -04:00
Niko Matsakis
be27a5a775
make one Canonicalize
impl for QueryResult
...
This lets us simplify a few type aliases.
2018-06-26 10:49:24 -04:00
Niko Matsakis
7358931a1c
improve trivial_case
handling
2018-06-26 10:49:24 -04:00
Niko Matsakis
c8cf710ce0
replace LexicalRegionConstraintData
with QueryRegionConstraint
2018-06-26 10:49:24 -04:00
Niko Matsakis
2624c14a26
extract the handling of region constraints from queries
2018-06-26 10:49:24 -04:00
Niko Matsakis
bebd3ff666
extract a helper for make_query_result
that skips canonicalization
2018-06-26 10:49:24 -04:00
Niko Matsakis
dfd33f5932
move make_query_response
into method on infcx
2018-06-26 10:49:24 -04:00