Skip to content

non-defining uses with non-param args will be break #135

Open
rust-lang/rust
#140497
@lcnr

Description

@lcnr

https://rust.godbolt.org/z/Yoc1efvxc

trait Recur {
    fn recur(self);
}

impl<T> Recur for () {
    fn recur(self) {}
}

fn recurse_no_define<T>(b: bool) -> impl Recur {
    if b {
        recurse_no_define::<()>(false).recur();
    }
}

This currently compiles, but even just tryin got normalize the RPIT of the recursive call will fail as it does not have fully generic args.

Normalization fails and we don't treat the opaque as rigid

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

in progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions