]> git.lizzy.rs Git - rust.git/blob - src/test/ui/save-analysis/issue-89066.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / save-analysis / issue-89066.rs
1 // compile-flags: -Zsave-analysis
2
3 // Check that this does not ICE.
4 // Stolen from src/test/ui/const-generics/generic_arg_infer/infer-arg-test.rs
5
6 #![feature(generic_arg_infer)]
7
8 struct All<'a, T, const N: usize> {
9   v: &'a T,
10 }
11
12 struct BadInfer<_>;
13 //~^ ERROR expected identifier
14 //~| ERROR parameter `_` is never used
15
16 fn all_fn<'a, T, const N: usize>() {}
17
18 fn bad_infer_fn<_>() {}
19 //~^ ERROR expected identifier
20
21
22 fn main() {
23   let a: All<_, _, _>;
24   //~^ ERROR this struct takes 2 generic arguments but 3 generic arguments were supplied
25   all_fn();
26   let v: [u8; _];
27   let v: [u8; 10] = [0; _];
28 }