Skip to content

Inference failure with type_changing_struct_update #101970

Open
@crlf0710

Description

@crlf0710

In the crater run #98456, fajita crate regression exhibited inference failure. Here's a minimal repro:
// when feature gate is enabled below, the compilation fails.

#![feature(type_changing_struct_update)]

#[derive(Default)]
pub struct Foo<P, T> {
    pub t: T,
    pub v: P
}

impl<P: Default, T:Default> Foo<P, T> {
    pub fn o(t: T) -> Self {
        Foo { t, ..Default::default() }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions