rust/src/test/ui/issues/issue-46604.rs
2019-12-02 09:46:26 -05:00

8 lines
200 B
Rust

static buf: &mut [u8] = &mut [1u8,2,3,4,5,7]; //~ ERROR E0658
fn write<T: AsRef<[u8]>>(buffer: T) { }
fn main() {
write(&buf);
buf[0]=2; //~ ERROR E0594
}