Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/simple.rs')
-rw-r--r--crates/hir-ty/src/tests/simple.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/simple.rs b/crates/hir-ty/src/tests/simple.rs
index fb0aa2faf1..a0ff628435 100644
--- a/crates/hir-ty/src/tests/simple.rs
+++ b/crates/hir-ty/src/tests/simple.rs
@@ -3497,6 +3497,22 @@ fn func() {
);
}
+#[test]
+fn pointee_trait() {
+ check_types(
+ r#"
+//- minicore: pointee
+use core::ptr::Pointee;
+fn func() {
+ let x: <u8 as Pointee>::Metadata;
+ //^ ()
+ let x: <[u8] as Pointee>::Metadata;
+ //^ usize
+}
+ "#,
+ );
+}
+
// FIXME
#[test]
fn castable_to() {