mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
12 lines
440 B
Rust
12 lines
440 B
Rust
// Minimized test for <https://github.com/rust-lang/rust/issues/123461>.
|
|
|
|
struct Unconstrained<T>(T);
|
|
|
|
fn main() {
|
|
unsafe { std::mem::transmute::<_, ()>(|o_b: Unconstrained<_>| {}) };
|
|
//~^ ERROR type annotations needed
|
|
// We unfortunately don't check `Wf(Unconstrained<_>)`, so we won't
|
|
// hit an ambiguity error before checking the transmute. That means
|
|
// we still may have inference variables in our transmute src.
|
|
}
|