about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
AgeCommit message (Collapse)AuthorLines
2020-10-18Auto merge of #77306 - lcnr:inline-ok, r=eddybbors-4/+7
normalize substs while inlining fixes #68347 or more precisely, this fixes the same ICE in rust analyser as veloren is pinned to a specific nightly and had an error with the current one. I didn't look into creating an MVCE here as that seems fairly annoying, will spend a few minutes doing so rn. (failed) r? `@eddyb` cc `@bjorn3`
2020-10-16Review commentsJack Huey-13/+12
2020-10-16map_bound_ref -> rebindJack Huey-37/+32
2020-10-16Use map_bound(_ref) instead of Binder::bind when possibleJack Huey-40/+60
2020-10-15Turn Outcome into an opaque type to remove some runtime checksDániel Buga-6/+4
2020-10-15Auto merge of #77873 - sexxi-goose:use_tuple_inference_for_closures, ↵bors-9/+53
r=nikomatsakis Replace tuple of infer vars for upvar_tys with single infer var This commit allows us to decide the number of captures required after completing capture ananysis, which is required as part of implementing RFC-2229. closes https://github.com/rust-lang/project-rfc-2229/issues/4 r? `@nikomatsakis`
2020-10-14Address commentsRoxane-26/+14
2020-10-14Remove unused code from remaining compiler cratesest31-4/+0
2020-10-13Replace absolute paths with relative onesest31-6/+7
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-12Auto merge of #77792 - matthewjasper:instrument-trait-selection, r=oli-obkbors-290/+166
Use tracing spans in rustc_trait_selection Spans are very helpful when debugging this code. It's also hot enough to make a good benchmark. r? `@oli-obk`
2020-10-13Rollup merge of #77550 - lcnr:ty-dep-path-ct-cleanup, r=ecstatic-morseYuki Okushi-12/+2
add shims for WithOptConstParam query calls r? @ecstatic-morse @eddyb
2020-10-11Use tracing spans in rustc_trait_selectionMatthew Jasper-290/+166
2020-10-11traits diagnostics: Don't print closure/generator upvar_tys tupleAman Arora-1/+23
Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-10-11Always return tupled_upvar_tys for Closure/Generator consituent tysAman Arora-20/+4
Depending on if upvar_tys inferred or not, we were returning either an inference variable which later resolves to a tuple or else the upvar tys themselves Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-10-11Replace tuple of infer vars for upvar_tys with single infer varRoxane-21/+71
This commit allows us to decide the number of captures required after completing capture ananysis, which is required as part of implementing RFC-2229. Co-authored-by: Aman Arora <me@aman-arora.com> Co-authored-by: Jenny Wills <wills.jenniferg@gmail.com>
2020-10-09Add find_map_relevant_implDániel Buga-9/+3
2020-10-07normalize substs during inliningBastian Kauschke-3/+6
2020-10-07normalize in codegen_fulfill_obligationsBastian Kauschke-4/+4
2020-10-06Fix tests from rebaseMatthew Jasper-17/+18
2020-10-06Fix rebaseMatthew Jasper-4/+4
2020-10-06Deduplicate item bounds after normalizationMatthew Jasper-17/+40
2020-10-06Don't require lifetime super-bounds on traits apply to trait objects of that ↵Matthew Jasper-14/+17
trait
2020-10-06Normalize super trait bounds when confirming object candidatesMatthew Jasper-9/+20
2020-10-06Fix rebaseMatthew Jasper-71/+5
2020-10-06Fix bootstrapMatthew Jasper-2/+4
2020-10-06Handle multiple trait-def projection candidatesMatthew Jasper-0/+7
2020-10-06Avoid cycles from projection boundsMatthew Jasper-19/+56
Only check the own predicates of associated types when confirming projection candidates. Also consider implied bounds when comparing trait and impl methods.
2020-10-06Avoid cycle with projections from object typesMatthew Jasper-267/+120
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-06Normalize projection bounds when considering candidatesMatthew Jasper-157/+270
This unfortunately requires some winnowing hacks to avoid now ambiguous candidates.
2020-10-06Handle multiple applicable projection candidatesMatthew Jasper-33/+54
2020-10-06Fix bugs in evaluating WellFormed predicatesMatthew Jasper-39/+74
- List the nestsed obligations in an order that works with the single pass used by evaluation - Propagate recursion depth correctly
2020-10-06Avoid cycle in nested obligations for object candidateMatthew Jasper-52/+175
Bounds of the form `type Future: Future<Result=Self::Result>` exist in some ecosystem crates. To validate these bounds for trait objects we need to normalize `Self::Result` in a way that doesn't cause a cycle.
2020-10-06Address review commentsMatthew Jasper-4/+37
2020-10-06Fix ICEMatthew Jasper-4/+5
2020-10-06Fix tests and bootstrapMatthew Jasper-8/+16
2020-10-06Ensure that associated types for trait objects satisfy their boundsMatthew Jasper-13/+51
2020-10-06Move some code from rustc_typeck to rustc_trait_selectionMatthew Jasper-0/+56
2020-10-06Remove unused part of return value from `replace_bound_vars_with_placeholders`Matthew Jasper-6/+6
2020-10-06Check associated type bounds for object safety violationsMatthew Jasper-39/+62
2020-10-06Check opaque types satisfy their boundsMatthew Jasper-1/+2
2020-10-06Check projections are well-formed when using projection candidatesMatthew Jasper-26/+43
2020-10-06Make projection wf check the predicates for the projectionMatthew Jasper-11/+25
2020-10-06Split bounds from predicatesMatthew Jasper-13/+14
2020-10-06Rename projection_predicates to item_boundsMatthew Jasper-8/+4
2020-10-06Rollup merge of #77559 - camelid:fix-rustdoc-warnings-invalid-rust-syntax, ↵Yuki Okushi-3/+3
r=lcnr Fix rustdoc warnings about invalid Rust syntax
2020-10-05FixupCamelid-4/+1
2020-10-05Auto merge of #77171 - VFLashM:better_sso_structures, r=oli-obkbors-3/+3
Better sso structures This change greatly expands interface of MiniSet/MiniMap and renames them because they are no longer "Mini".
2020-10-05query_name_of_opt_const_arg -> query_name_opt_const_argBastian Kauschke-2/+2
2020-10-04Fix rustdoc warnings about invalid Rust syntaxCamelid-2/+5
2020-10-05Rollup merge of #77514 - scottmcm:less-once-chain-once, r=estebankDylan DPC-2/+3
Replace some once(x).chain(once(y)) with [x, y] IntoIter Now that we have by-value array iterators that are [already used](https://github.com/rust-lang/rust/blob/25c8c53dd994acb3f4f7c02fe6bb46076393f8b0/compiler/rustc_hir/src/def.rs#L305-L307)... For example, ```diff - once(self.type_ns).chain(once(self.value_ns)).chain(once(self.macro_ns)).filter_map(|it| it) + IntoIter::new([self.type_ns, self.value_ns, self.macro_ns]).filter_map(|it| it) ```