Rust folks, just out of curiosity, do you know why this weird type alias triggers E0119 if used when implementing TryFrom? 😅

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=c366b957e8dc6b6d1bb9fcd174e1438e

#rust #rustlang

Rust Playground

A browser interface to the Rust compiler to experiment with the language

@Dryadxon I'm pretty sure that would be a compiler bug.

@Dryadxon probably this issue: https://github.com/rust-lang/rust/issues/29205

type aliases don’t normalize in time sometimes. this is a compiler bug. this seems to be an explanation for the underlying issue:
https://github.com/rust-lang/rust/issues/99940#issuecomment-1201595440

unfortunately, doesn’t seem to be solved even with -Znext-solver=globally

Projections of upstream associated types don't get normalized before overlap checking (thus conflicting w/ every other type) · Issue #29205 · rust-lang/rust

pub trait Foo<T> { } pub trait Mirror { type Dual; } pub struct Eps; pub struct A<T, U>(T, U); impl<T, U: Mirror> Mirror for A<T, U> { type Dual = B<T, U::Dual>; } pub struct B<T, U>(T, U); impl<T,...

GitHub