2 // Test that a custom deref with a fat pointer return type does not ICE
5 use std::ops::{Deref, DerefMut};
12 type Target = [usize];
14 fn deref(&self) -> &[usize] {
19 impl DerefMut for Arr {
20 fn deref_mut(&mut self) -> &mut [usize] {
25 pub fn foo(arr: &mut Arr) {
26 let x: &mut [usize] = &mut **arr;
33 let mut a = Arr { ptr: Box::new([1, 2, 3]) };