rust/tests/ui/const-generics/issues/issue-80062.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
238 B
Rust
Raw Normal View History

2020-12-30 08:59:44 -06:00
// Regression test for issue #80062 (fixed by `min_const_generics`)
fn sof<T>() -> T { unimplemented!() }
fn test<T>() {
let _: [u8; sof::<T>()];
//~^ ERROR generic parameters may not be used in const operations
}
fn main() {}