summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-46604.rs
blob: 6ec6e7bdcb81e8cfb104d0c33963e25c8f718417 (plain)
1
2
3
4
5
6
7
static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //~ ERROR mutable references are not allowed
fn write<T: AsRef<[u8]>>(buffer: T) { }

fn main() {
    write(&buf);
    buf[0]=2;                                   //~ ERROR E0594
}