rust/tests/ui/const-generics/generic_arg_infer/array-repeat-expr-lib.rs

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

13 lines
272 B
Rust
Raw Permalink Normal View History

//@ check-pass
#![feature(generic_arg_infer)]
#![crate_type = "lib"]
// Test that encoding the hallucinated `DefId` for the `_` const argument doesn't
// ICE (see #133468). This requires this to be a library crate.
pub fn foo() {
let s: [u8; 10];
s = [0; _];
}