Skip to content

Commit 103e8cb

Browse files
committed
Add Copy/Sized program clauses for reference types
1 parent 24b2337 commit 103e8cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

chalk-solve/src/clauses/builtin_traits/copy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn add_copy_program_clauses<I: Interner>(
4141
TypeName::Tuple(arity) => {
4242
push_tuple_copy_conditions(db, builder, trait_ref, *arity, substitution)
4343
}
44-
TypeName::Raw(_) => builder.push_fact(trait_ref.clone()),
44+
TypeName::Raw(_) | TypeName::Ref(_) => builder.push_fact(trait_ref.clone()),
4545
_ => return,
4646
},
4747
TyData::Function(_) => builder.push_fact(trait_ref.clone()),

chalk-solve/src/clauses/builtin_traits/sized.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ pub fn add_sized_program_clauses<I: Interner>(
7171
TypeName::Struct(struct_id) => {
7272
push_struct_sized_conditions(db, builder, trait_ref, *struct_id, substitution)
7373
}
74-
TypeName::Scalar(_) => builder.push_fact(trait_ref.clone()),
7574
TypeName::Tuple(arity) => {
7675
push_tuple_sized_conditions(db, builder, trait_ref, *arity, substitution)
7776
}
78-
TypeName::Raw(_) => builder.push_fact(trait_ref.clone()),
77+
TypeName::Scalar(_) | TypeName::Raw(_) | TypeName::Ref(_) => {
78+
builder.push_fact(trait_ref.clone())
79+
}
7980
_ => return,
8081
},
8182
TyData::Function(_) => builder.push_fact(trait_ref.clone()),

0 commit comments

Comments
 (0)