File tree 1 file changed +5
-0
lines changed
compiler/rustc_ty_utils/src
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<'_> {
137
137
let local_did = def_id. as_local ( ) ;
138
138
let hir_id = local_did. map ( |def_id| tcx. hir ( ) . local_def_id_to_hir_id ( def_id) ) ;
139
139
140
+ // FIXME(consts): This is not exactly in line with the constness query.
140
141
let constness = match hir_id {
141
142
Some ( hir_id) => match tcx. hir ( ) . get ( hir_id) {
142
143
hir:: Node :: TraitItem ( hir:: TraitItem { kind : hir:: TraitItemKind :: Fn ( ..) , .. } )
@@ -201,6 +202,10 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
201
202
202
203
_ => hir:: Constness :: NotConst ,
203
204
} ,
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.
204
209
None => hir:: Constness :: NotConst ,
205
210
} ;
206
211
You can’t perform that action at this time.
0 commit comments