Skip to content

Commit b3837fa

Browse files
committed
Add more explanation for inputs and output
1 parent 484cf80 commit b3837fa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

chalk-solve/src/rust_ir.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ pub struct FnDefInputsAndOutputDatum<I: Interner> {
145145
/// the function definition's type signature and where clauses.
146146
pub struct FnDefDatumBound<I: Interner> {
147147
/// Inputs and outputs defined on a function
148+
/// These are needed for late-bound regions in rustc. For example the
149+
/// lifetime `'a` in
150+
/// ```ignore
151+
/// fn foo<'a, T>(&'a T);
152+
/// ^^
153+
/// ```
154+
/// Rustc doesn't pass in late-bound the regions in substs, but the inputs
155+
/// and outputs may use them. `where_clauses` don't need an extra set of
156+
/// `Binders`, since any lifetimes found in where clauses are not late-bound.
148157
pub inputs_and_output: Binders<FnDefInputsAndOutputDatum<I>>,
149158

150159
/// Where clauses defined on the function

0 commit comments

Comments
 (0)