Skip to content

Using a ProofTreeVisitor when computing obligations_for_self_ty  #71

Open
@compiler-errors

Description

@compiler-errors

Due to pending obligations in the new fulfillment context recording only the root obligations and not the leaf obligations that have stalled, this code fails to compile:

trait Foo {}
fn needs_foo<T>(_: T) where Wrap<T>: Foo {}

struct Wrap<T>(T);
impl<T> Foo for Wrap<T> where T: Fn(i32) {}

fn main() {
    needs_foo(|x| {
        x.to_string();
    });
}

Recording this here so I can add a test in the UI test suite for it, since if we ever experiment with removing pending_obligations, this will likely go from pass -> fail.

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