]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/issue-96638.rs
Auto merge of #96605 - Urgau:string-retain-codegen, r=thomcc
[rust.git] / src / test / ui / argument-suggestions / issue-96638.rs
1 fn f(_: usize, _: &usize, _: usize) {}
2
3 fn arg<T>() -> T { todo!() }
4
5 fn main() {
6     let x = arg(); // `x` must be inferred
7     // The reference on `&x` is important to reproduce the ICE
8     f(&x, ""); //~ ERROR this function takes 3 arguments but 2 arguments were supplied
9 }