Skip to content

Add test for RPIT defined with different hidden types with different substs #111943

Closed
@BoxyUwU

Description

@BoxyUwU

The following code:

trait Trait {}
impl Trait for () {}

fn foo<T: Trait, U: Trait>() -> impl Trait {
    let a: T = foo::<T, U>();
    loop {}
    let _: T = foo::<U, T>();
}

used to incorrectly compile but now correctly errors, we should add a test to ensure this doesn't regress.

cc #111853 @compiler-errors

Metadata

Metadata

Assignees

Labels

E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions