rust/tests/ui/array-slice-vec/repeat_empty_ok.rs

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

16 lines
267 B
Rust
Raw Normal View History

2020-12-26 20:30:06 -06:00
#![crate_type = "lib"]
pub struct Header<'a> {
pub value: &'a [u8],
}
pub fn test() {
let headers = [Header{value: &[]}; 128];
//~^ ERROR the trait bound
}
pub fn test2() {
let headers = [Header{value: &[0]}; 128];
//~^ ERROR the trait bound
}