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