]> git.proxmox.com Git - rustc.git/blob - tests/ui/traits/new-solver/int-var-alias-eq.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / ui / traits / new-solver / int-var-alias-eq.rs
1 // check-pass
2 // compile-flags: -Ztrait-solver=next
3
4 // HIR typeck ends up equating `<_#0i as Add>::Output == _#0i`.
5 // Want to make sure that we emit an alias-eq goal for this,
6 // instead of treating it as a type error and bailing.
7
8 fn test() {
9 // fallback
10 let x = 1 + 2;
11 }
12
13 fn test2() -> u32 {
14 // expectation from return ty
15 1 + 2
16 }
17
18 fn main() {}