Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/layout/tests.rs')
-rw-r--r--crates/hir-ty/src/layout/tests.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/hir-ty/src/layout/tests.rs b/crates/hir-ty/src/layout/tests.rs
index 3cd0cd399c..1502ab14cc 100644
--- a/crates/hir-ty/src/layout/tests.rs
+++ b/crates/hir-ty/src/layout/tests.rs
@@ -219,6 +219,22 @@ fn generic() {
}
#[test]
+fn associated_types() {
+ size_and_align! {
+ trait Tr {
+ type Ty;
+ }
+
+ impl Tr for i32 {
+ type Ty = i64;
+ }
+
+ struct Foo<A: Tr>(<A as Tr>::Ty);
+ struct Goal(Foo<i32>);
+ }
+}
+
+#[test]
fn return_position_impl_trait() {
size_and_align_expr! {
trait T {}