diff options
Diffstat (limited to 'tests/ui/array-slice-vec/repeat_empty_ok.rs')
-rw-r--r-- | tests/ui/array-slice-vec/repeat_empty_ok.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/repeat_empty_ok.rs b/tests/ui/array-slice-vec/repeat_empty_ok.rs new file mode 100644 index 000000000..25463ea5e --- /dev/null +++ b/tests/ui/array-slice-vec/repeat_empty_ok.rs @@ -0,0 +1,15 @@ +#![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 +} |