2 // Regression test for issue #21010: Normalize associated types in
3 // various special paths in the `type_is_immediate` function.
5 pub trait OffsetState: Sized {}
7 type State: OffsetState;
11 #[derive(Copy, Clone)] pub struct X;
12 impl Offset for X { type State = Y; }
14 #[derive(Copy, Clone)] pub struct Y;
15 impl OffsetState for Y {}
17 pub fn now() -> DateTime<X> { from_utc(Y) }
19 pub struct DateTime<Off: Offset> { pub offset: Off::State }
20 pub fn from_utc<Off: Offset>(offset: Off::State) -> DateTime<Off> { DateTime { offset: offset } }