Use double reference in debug derive

This commit is contained in:
hkalbasi 2023-05-12 12:36:57 +03:30
parent 9b3387454d
commit 7da80d4f67
4 changed files with 91 additions and 8 deletions

View file

@ -658,6 +658,26 @@ fn f() {
//^ error: expected (), found i32
}
}
"#,
);
}
#[test]
fn regression_14768() {
check_diagnostics(
r#"
//- minicore: derive, fmt, slice, coerce_unsized, builtin_impls
use core::fmt::Debug;
#[derive(Debug)]
struct Foo(u8, u16, [u8]);
#[derive(Debug)]
struct Bar {
f1: u8,
f2: &[u16],
f3: dyn Debug,
}
"#,
);
}