Skip to content

ambiguity due to "maybe-rigid" rigid assoc type #111

Closed
@lcnr

Description

@lcnr
trait Trait<'a> {
    type Assoc;
}

trait Outer<'a>{}

impl<'a, T: ?Sized> Outer<'a> for T
where
    T: Trait<'a>,
    T::Assoc: Trait<'a>,
{}

checking T::Assoc: Trait<'a>, we try to normalize the self type

  • this tries to prove T: Trait<'a> either when checking for wf for coinduction(?), or currently in discard_impls_shadowed_by_env
    • two ParamEnv candidates, T: Trait<'a> and T::Assoc: Trait<'a>
      • T: Trait<'a> holds, but adds a region constraint due to uniquification
      • T::Assoc: Trait<'a> may hold if T::Assoc normalizes to T
        • this causes an inductive cycle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions