-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
I tried this code (playground):
#![feature(type_alias_impl_trait)]
#![allow(unconditional_recursion)]
#[derive(Copy, Clone)]
enum Void {}
mod match_wildcard {
type X = impl Copy; // ok
fn empty_opaque(x: super::Void) -> X {
match empty_opaque(x) {
_ => {}
}
x
}
}
mod empty_match {
type X = impl Copy;
//~^ ERROR unconstrained opaque type
fn empty_opaque(x: super::Void) -> X {
match empty_opaque(x) {}
x
}
}
Somehow in the second case we think that X
is unconstrained even though it doesn't seem to contain more or less type information than the first case. Note also that this does not error if I use RPIT instead.
oli-obk
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.