mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Address nits
This commit is contained in:
parent
249ede4195
commit
70775304cd
@ -1357,7 +1357,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
)
|
||||
}
|
||||
ImplTraitContext::InTrait => {
|
||||
// FIXME(RPITIT): Should we use def_node_id here?
|
||||
self.lower_impl_trait_in_trait(span, def_node_id, |lctx| {
|
||||
lctx.lower_param_bounds(
|
||||
bounds,
|
||||
|
@ -193,7 +193,6 @@ impl DefKind {
|
||||
| DefKind::Variant
|
||||
| DefKind::Trait
|
||||
| DefKind::OpaqueTy
|
||||
| DefKind::ImplTraitPlaceholder
|
||||
| DefKind::TyAlias
|
||||
| DefKind::ForeignTy
|
||||
| DefKind::TraitAlias
|
||||
@ -221,7 +220,8 @@ impl DefKind {
|
||||
| DefKind::Use
|
||||
| DefKind::ForeignMod
|
||||
| DefKind::GlobalAsm
|
||||
| DefKind::Impl => None,
|
||||
| DefKind::Impl
|
||||
| DefKind::ImplTraitPlaceholder => None,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2551,7 +2551,10 @@ pub enum TyKind<'hir> {
|
||||
/// The generic argument list contains the lifetimes (and in the future
|
||||
/// possibly parameters) that are actually bound on the `impl Trait`.
|
||||
OpaqueDef(ItemId, &'hir [GenericArg<'hir>]),
|
||||
/// The placeholder
|
||||
/// A type that represents an `impl Trait` in a trait function. This is
|
||||
/// not an opaque type, since it acts more like an associated type than
|
||||
/// an opaque, and since it needs no generics since it inherits those
|
||||
/// from the item's parent.
|
||||
ImplTraitInTrait(ItemId),
|
||||
/// A trait object type `Bound1 + Bound2 + Bound3`
|
||||
/// where `Bound` is a trait or a lifetime.
|
||||
|
@ -1308,9 +1308,9 @@ fn project<'cx, 'tcx>(
|
||||
}
|
||||
}
|
||||
|
||||
/// The first thing we have to do is scan through the parameter
|
||||
/// environment to see whether there are any projection predicates
|
||||
/// there that can answer this question.
|
||||
/// If the predicate's item is an `ImplTraitPlaceholder`, we do a select on the
|
||||
/// corresponding trait ref. If this yields an `impl`, then we're able to project
|
||||
/// to a concrete type, since we have an `impl`'s method to provide the RPITIT.
|
||||
fn assemble_candidate_for_impl_trait_in_trait<'cx, 'tcx>(
|
||||
selcx: &mut SelectionContext<'cx, 'tcx>,
|
||||
obligation: &ProjectionTyObligation<'tcx>,
|
||||
|
Loading…
Reference in New Issue
Block a user