Skip to content

Commit d37af33

Browse files
committed
add fixme
1 parent 8e26bb0 commit d37af33

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
171171
if fn_sig.has_escaping_bound_vars() {
172172
return fn_sig;
173173
}
174+
// We explicitly assert that value does not contain inference variables,
175+
// so this definitely does not leak inference variables.
174176
self.probe(|_| {
175177
let ocx = ObligationCtxt::new(self);
176178
let normalized_fn_sig =

compiler/rustc_hir_typeck/src/method/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub struct MethodCallee<'tcx> {
4444
pub sig: ty::FnSig<'tcx>,
4545
}
4646

47-
// FIXME: This is wrong, method error may leak inference vars.
47+
// FIXME(#122188): This is wrong, as this type may leak inference vars.
4848
trivial_no_snapshot_leaks!('tcx, MethodError<'tcx>);
4949
#[derive(Debug)]
5050
pub enum MethodError<'tcx> {

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a, 'tcx> Deref for ProbeContext<'a, 'tcx> {
9999
}
100100
}
101101

102-
// FIXME: This is wrong as this type may leak inference variables.`
102+
// FIXME(#122188): This is wrong as this type may leak inference variables.`
103103
trivial_no_snapshot_leaks!('tcx, Candidate<'tcx>);
104104
#[derive(Debug, Clone)]
105105
pub(crate) struct Candidate<'tcx> {
@@ -200,7 +200,7 @@ impl AutorefOrPtrAdjustment {
200200
}
201201
}
202202

203-
// FIXME: This is wrong as this type may leak inference variables.`
203+
// FIXME(#122188): This is wrong as this type may leak inference variables.`
204204
trivial_no_snapshot_leaks!('tcx, Pick<'tcx>);
205205
#[derive(Debug, Clone)]
206206
pub struct Pick<'tcx> {

compiler/rustc_infer/src/infer/snapshot/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ mod impls {
337337
trivial_no_snapshot_leaks!('tcx, NoSolution);
338338
trivial_no_snapshot_leaks!('tcx, Vec<(CanonicalResponse<'tcx>, BuiltinImplSource)>);
339339
trivial_no_snapshot_leaks!('tcx, (bool, Certainty));
340-
// FIXME: This is wrong, this can leak inference vars in `opt_bad_ty` and `steps`.
340+
// FIXME(#122188): This is wrong, this can leak inference vars in `opt_bad_ty` and `steps`.
341341
trivial_no_snapshot_leaks!('tcx, MethodAutoderefStepsResult<'tcx>);
342342
fudge_vars_no_snapshot_leaks!('tcx, TypeError<'tcx>);
343343
fudge_vars_no_snapshot_leaks!('tcx, MismatchedProjectionTypes<'tcx>);

0 commit comments

Comments
 (0)