Skip to content

Commit 1d0f5a0

Browse files
committed
Address review comments
1 parent c984d92 commit 1d0f5a0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

chalk-solve/src/rust_ir.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -643,9 +643,11 @@ pub struct OpaqueTyDatum<I: Interner> {
643643

644644
#[derive(Clone, Debug, PartialEq, Eq, Hash, Fold, HasInterner, Visit)]
645645
pub struct OpaqueTyDatumBound<I: Interner> {
646-
/// Trait bounds for the opaque type.
646+
/// Trait bounds for the opaque type. These are bounds that the hidden type must meet.
647647
pub bounds: Binders<Vec<QuantifiedWhereClause<I>>>,
648648
/// Where clauses that inform well-formedness conditions for the opaque type.
649+
/// These are conditions on the generic parameters of the opaque type which must be true
650+
/// for a reference to the opaque type to be well-formed.
649651
pub where_clauses: Binders<Vec<QuantifiedWhereClause<I>>>,
650652
}
651653

tests/test/opaque_types.rs

+8
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ fn opaque_where_clause() {
8686
} yields {
8787
"Unique; substitution []"
8888
}
89+
90+
goal {
91+
forall<U> {
92+
WellFormed(S<U>)
93+
}
94+
} yields {
95+
"No possible solution"
96+
}
8997
}
9098
}
9199

0 commit comments

Comments
 (0)