Aaron Hill
f2d9ee9c34
Preserve most sub-obligations in the projection cache
2021-09-02 11:10:40 -05:00
jackh726
af14db14f4
Review comments
2021-08-24 22:29:41 -04:00
Jack Huey
8d7707f3c4
Normalize associated types with bound vars
2021-08-24 22:29:39 -04:00
Frank Steffahn
bf88b113ea
Fix typos “a”→“an”
2021-08-22 15:35:11 +02:00
Charles Lew
6b1c52ff25
Fold vtable_trait_upcasting_coercion_new_vptr_slot
logic into obligation processing.
2021-08-18 13:00:27 +08:00
jackh726
fa839b1194
Add needs_normalization
2021-07-17 16:09:22 -04:00
jackh726
d954a8ee8e
Some perf optimizations and logging
2021-07-17 16:09:17 -04:00
jackh726
cf001dc889
Remove failed and review comments
2021-07-15 10:58:49 -04:00
jackh726
a9f1e1c440
WIP partial apply fix
2021-07-13 10:50:40 -04:00
jackh726
c63f1fe92b
Replace associated item bound vars with placeholders when projecting.
2021-07-09 00:04:47 -04:00
Aaron Hill
7e5a88a56c
Combine individual limit queries into single limits
query
2021-07-04 13:02:51 -05:00
Aaron Hill
ff15b5e2c7
Query-ify global limit attribute handling
2021-07-04 12:33:14 -05:00
Yuki Okushi
884053a4b4
Remove ty::Binder::bind()
...
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2021-07-03 01:12:32 +09:00
Aaron Hill
8657bb251c
Always produce sub-obligations when using cached projection result
2021-05-16 17:18:17 -04:00
Jack Huey
30187c81f6
Track bound vars
2021-03-31 10:15:27 -04:00
Dylan DPC
66211f6657
Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726
...
Ensure valid TraitRefs are created for GATs
This fixes `ProjectionTy::trait_ref` to use the correct substs. Places that need all of the substs have been updated to not use `trait_ref`.
r? ````@jackh726````
2021-02-18 16:57:34 +01:00
Simon Sapin
696b239f72
Add ptr::Pointee
trait (for all types) and ptr::metadata
function
...
RFC: https://github.com/rust-lang/rfcs/pull/2580
2021-02-15 14:27:12 +01:00
Matthew Jasper
d785c8c447
Remove unnecessary function parameters project.rs
2021-02-13 19:30:07 +00:00
Matthew Jasper
0bf1d73d22
Don't go through TraitRef to relate projections
2021-02-13 19:30:07 +00:00
bors
c0b64d97be
Auto merge of #81055 - matthewjasper:non-fatal-overflow, r=nikomatsakis
...
Make hitting the recursion limit in projection non-fatal
This change was originally made in #80246 to avoid future (effectively) infinite loop bugs in projections,
but wundergraph relies on rustc recovering here.
cc #80953
r? `@nikomatsakis`
2021-01-28 18:57:10 +00:00
Jack Huey
3dea68de1d
Review changes
2021-01-16 18:56:37 -05:00
Matthew Jasper
5db5d8f87e
Make hitting the recursion limit in projection non-fatal
...
This is relied on by wundergraph.
2021-01-15 20:45:38 +00:00
Matthew Jasper
2e92b13a60
Prevent caching projections in the case of cycles
...
When normalizing a projection which results in a cycle, we would
cache the result of `project_type` without the nested obligations
(because they're not needed for inference). This would result in
the nested obligations only being handled once in fulfill, which
would avoid the cycle error.
Fixes #79714 , a regresion from #79305 caused by the removal of
`get_paranoid_cache_value_obligation`.
2020-12-20 21:47:51 +00:00
Matthew Jasper
77fce67733
Make recursion limit fatal in project
...
This avoid the hang/oom from #79714
2020-12-20 18:11:11 +00:00
Jack Huey
5e7095850c
More rebinds
2020-12-19 04:26:35 -05:00
LeSeulArtichaut
f59d03038c
Move rustc_ty
-> rustc_ty_utils
2020-11-19 21:57:29 +01:00
lcnr
a6cbd64dae
words
2020-11-16 22:42:09 +01:00
Bastian Kauschke
2bf93bd852
compiler: fold by value
2020-11-16 22:34:57 +01:00
Bastian Kauschke
cc19df627e
revert #75443 update mir validator
2020-11-02 23:57:03 +01:00
Jack Huey
f6a53b4c69
Review comments
2020-10-16 15:14:38 -04:00
Jack Huey
eba10270c6
map_bound_ref -> rebind
2020-10-16 14:29:21 -04:00
Jack Huey
dd5c9bf139
Use map_bound(_ref) instead of Binder::bind when possible
2020-10-16 12:58:50 -04:00
Matthew Jasper
b8d2560dca
Use tracing spans in rustc_trait_selection
2020-10-11 16:08:23 +01:00
Matthew Jasper
27534b3932
Fix rebase
2020-10-06 11:19:33 +01:00
Matthew Jasper
6c4feb681f
Fix bootstrap
2020-10-06 11:19:32 +01:00
Matthew Jasper
ed32482534
Handle multiple trait-def projection candidates
2020-10-06 11:19:32 +01:00
Matthew Jasper
0dfa6ff3be
Avoid cycles from projection bounds
...
Only check the own predicates of associated types when confirming
projection candidates.
Also consider implied bounds when comparing trait and impl methods.
2020-10-06 11:19:32 +01:00
Matthew Jasper
596d6c4b3b
Avoid cycle with projections from object types
...
Normalizing `<dyn Iterator<Item = ()> as Iterator>::Item` no longer
requires selecting `dyn Iterator<Item = ()>: Iterator`. This was
previously worked around by using a special type-folder to normalize
things.
2020-10-06 11:19:31 +01:00
Matthew Jasper
34e5a4992c
Normalize projection bounds when considering candidates
...
This unfortunately requires some winnowing hacks to avoid
now ambiguous candidates.
2020-10-06 11:19:31 +01:00
Matthew Jasper
d4d9e7f67f
Remove unused part of return value from replace_bound_vars_with_placeholders
2020-10-06 11:19:30 +01:00
Matthew Jasper
0eb87ed55f
Rename projection_predicates to item_bounds
2020-10-06 11:18:45 +01:00
Bastian Kauschke
1857184cd1
remove enum name from ImplSource variants
2020-09-24 19:22:36 +02:00
LeSeulArtichaut
3e14b684dd
Change ty.kind to a method
2020-09-04 17:47:51 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00