Skip to content

stronger leak-check #37

@aliemjay

Description

@aliemjay

investigate why this compiles under the new solver while fails under the old one.

trait Leak<'a> {}
impl<'a> Leak<'a> for Box<u32> {}
impl<'a> Leak<'a> for Box<u16> where 'a: 'static, {}

// This indirection is necessary to bypass #34
trait Indirect {}
impl Indirect for Box<u32> where Self: for<'a> Leak<'a>, {}
impl Indirect for Box<u16> where Self: for<'a> Leak<'a>, {}

fn impl_trait<T: Indirect>() {}

fn main() {
    impl_trait::<Box<_>>();
    //[current]~^ ERROR type annotations needed
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions