File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
compiler/rustc_ty_utils/src Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
137137 let local_did = def_id. as_local ( ) ;
138138 let hir_id = local_did. map ( |def_id| tcx. hir ( ) . local_def_id_to_hir_id ( def_id) ) ;
139139
140+ // FIXME(consts): This is not exactly in line with the constness query.
140141 let constness = match hir_id {
141142 Some ( hir_id) => match tcx. hir ( ) . get ( hir_id) {
142143 hir:: Node :: TraitItem ( hir:: TraitItem { kind : hir:: TraitItemKind :: Fn ( ..) , .. } )
@@ -201,6 +202,10 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
201202
202203 _ => hir:: Constness :: NotConst ,
203204 } ,
205+ // FIXME(consts): It's suspicious that a param-env for a foreign item
206+ // will always have NotConst param-env, though we don't typically use
207+ // that param-env for anything meaningful right now, so it's likely
208+ // not an issue.
204209 None => hir:: Constness :: NotConst ,
205210 } ;
206211
You can’t perform that action at this time.
0 commit comments