]> git.lizzy.rs Git - rust.git/commit
Split hir::TyImplTrait, move checks to HIR lowering
authorChristopher Vittal <christopher.vittal@gmail.com>
Fri, 10 Nov 2017 17:23:59 +0000 (12:23 -0500)
committerChristopher Vittal <christopher.vittal@gmail.com>
Wed, 15 Nov 2017 20:46:01 +0000 (15:46 -0500)
commit8fd48e7d59a01da7d631695cfea06027cb96c06a
tree87a6538446792c2d05185242e472df80c30c6fa1
parent779fc372c794057816951f2583985c512b0c6387
Split hir::TyImplTrait, move checks to HIR lowering

Replace hir::TyImplTrait with TyImplTraitUniversal and
TyImplTraitExistential.

Add an ImplTraitContext enum to rustc::hir::lowering to track the kind
and allowedness of an impl Trait.

Significantly alter lowering to thread ImplTraitContext and one other
boolean parameter described below throughought much of lowering.

The other parameter is for tracking if lowering a function is in a trait
impl, as there is not enough information to otherwise know this
information during lowering otherwise.

This change also removes the checks from ast_ty_to_ty for impl trait
allowedness as they are now all taking place in HIR lowering.
src/librustc/hir/intravisit.rs
src/librustc/hir/lowering.rs
src/librustc/hir/mod.rs
src/librustc/hir/print.rs
src/librustc/ich/impls_hir.rs
src/librustc/middle/resolve_lifetime.rs
src/librustc_metadata/encoder.rs
src/librustc_privacy/lib.rs
src/librustc_typeck/astconv.rs
src/librustc_typeck/collect.rs
src/librustdoc/clean/mod.rs