Skip to content

Commit c2f7757

Browse files
committed
extend comment to note complications around lifetimes
1 parent 35a5065 commit c2f7757

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc/infer/canonical/query_result.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ impl<'cx, 'gcx, 'tcx> InferCtxtBuilder<'cx, 'gcx, 'tcx> {
4646
/// canonical result created.
4747
///
4848
/// Returns `NoSolution` in the event of any error.
49+
///
50+
/// (It might be mildly nicer to implement this on `TyCtxt`, and
51+
/// not `InferCtxtBuilder`, but that is a bit tricky right now.
52+
/// In part because we would need a `for<'gcx: 'tcx>` sort of
53+
/// bound for the closure and in part because it is convenient to
54+
/// have `'tcx` be free on this function so that we can talk about
55+
/// `K: TypeFoldable<'tcx>`.)
4956
pub fn enter_canonical_trait_query<K, R>(
5057
&'tcx mut self,
5158
canonical_key: &Canonical<'tcx, K>,

0 commit comments

Comments
 (0)