Skip to content

Commit 76d8493

Browse files
amandasystemslcnr
andauthored
Style nit
Co-authored-by: lcnr <[email protected]>
1 parent b76881b commit 76d8493

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+3
-3
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
973973
// If we are checking that `'sup: 'sub`, and `'sub` contains
974974
// some placeholder that `'sup` cannot name, then this is only
975975
// true if `'sup` outlives static.
976-
if !self.can_name_all_placeholders(sup_region_scc, sub_region_scc)
977-
&& sub_region != fr_static
978-
// To avoid potentially infinite recursion.
976+
//
977+
// Avoid infinite recursion if `sub_region` is already `'static`
978+
if sub_region != fr_static && !self.can_name_all_placeholders(sup_region_scc, sub_region_scc)
979979
{
980980
debug!(
981981
"sub universe `{sub_region_scc:?}` is not nameable \

0 commit comments

Comments
 (0)