]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/infer/uninferred-consts.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / const-generics / infer / uninferred-consts.rs
1 // Test that we emit an error if we cannot properly infer a constant.
2
3 // taken from https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893
4 struct Foo;
5 impl Foo {
6 fn foo<const A: usize, const B: usize>(self) {}
7 }
8 fn main() {
9 Foo.foo();
10 //~^ ERROR type annotations needed
11 }