2022-11-25 20:20:08 -06:00
|
|
|
// compile-flags: --diagnostic-width=60
|
2022-11-25 19:14:25 -06:00
|
|
|
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
|
|
|
|
|
2022-12-06 22:13:31 -06:00
|
|
|
mod a {
|
|
|
|
// Force the "short path for unique types" machinery to trip up
|
|
|
|
pub struct Atype;
|
|
|
|
pub struct Btype;
|
|
|
|
pub struct Ctype;
|
|
|
|
}
|
|
|
|
|
|
|
|
mod b {
|
|
|
|
pub struct Atype<T, K>(T, K);
|
|
|
|
pub struct Btype<T, K>(T, K);
|
|
|
|
pub struct Ctype<T, K>(T, K);
|
|
|
|
}
|
|
|
|
|
|
|
|
use b::*;
|
2022-11-25 19:14:25 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x: Atype<
|
|
|
|
Btype<
|
|
|
|
Ctype<
|
|
|
|
Atype<
|
|
|
|
Btype<
|
|
|
|
Ctype<
|
|
|
|
Atype<
|
|
|
|
Btype<
|
|
|
|
Ctype<i32, i32>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
> = Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(
|
|
|
|
Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(
|
|
|
|
Ok("")
|
|
|
|
))))))))))))))))))))))))))))))
|
|
|
|
))))))))))))))))))))))))))))));
|
|
|
|
//~^^^^^ ERROR E0308
|
|
|
|
|
|
|
|
let _ = Some(Ok(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(
|
|
|
|
Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(
|
|
|
|
Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(Some(
|
|
|
|
Some(Some(Some(Some(Some(Some(Some(Some(Some("")))))))))
|
|
|
|
)))))))))))))))))
|
|
|
|
))))))))))))))))))
|
|
|
|
))))))))))))))))) == Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(
|
|
|
|
Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(
|
|
|
|
Ok(Ok(Ok(Ok(Ok(Ok(Ok("")))))))
|
|
|
|
))))))))))))))))))))))))))))))
|
|
|
|
))))))))))))))))))))))));
|
|
|
|
//~^^^^^ ERROR E0308
|
|
|
|
|
|
|
|
let x: Atype<
|
|
|
|
Btype<
|
|
|
|
Ctype<
|
|
|
|
Atype<
|
|
|
|
Btype<
|
|
|
|
Ctype<
|
|
|
|
Atype<
|
|
|
|
Btype<
|
|
|
|
Ctype<i32, i32>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
>,
|
|
|
|
i32
|
|
|
|
> = ();
|
|
|
|
//~^ ERROR E0308
|
|
|
|
|
|
|
|
let _: () = Ok(Ok(Ok(Ok(Ok(Ok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