diff options
| author | lcnr <rust@lcnr.de> | 2022-03-31 15:41:52 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-03-31 15:41:52 +0200 |
| commit | 89c66eb42d385975c91d79de139b50c298414d71 (patch) | |
| tree | fa053f09850f3a62bb2b5ac10ee8e81b8279ab54 | |
| parent | d7cada17670c03c7029441e17381845bbe8fa3cc (diff) | |
| download | rust-89c66eb42d385975c91d79de139b50c298414d71.tar.gz rust-89c66eb42d385975c91d79de139b50c298414d71.zip | |
update comment
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/free_region_relations.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs index 0b9d0a0e922..f8439d2e163 100644 --- a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs +++ b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs @@ -253,8 +253,10 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> { let constraint_sets: Vec<_> = unnormalized_input_output_tys .flat_map(|ty| { debug!("build: input_or_output={:?}", ty); - // We add implied bounds from both the unnormalized and normalized ty - // See issue #87748 + // We only add implied bounds for the normalized type as the unnormalized + // type may not actually get checked by the caller. + // + // Can otherwise be unsound, see #91068. let TypeOpOutput { output: norm_ty, constraints: constraints1, .. } = self .param_env .and(type_op::normalize::Normalize::new(ty)) |
