We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0b7dc3 commit 6596165Copy full SHA for 6596165
src/librustc_mir/transform/check_consts/qualifs.rs
@@ -33,9 +33,10 @@ pub trait Qualif {
33
/// of the type.
34
fn in_any_value_of_ty(_cx: &ConstCx<'_, 'tcx>, _ty: Ty<'tcx>) -> bool;
35
36
- fn in_static(_cx: &ConstCx<'_, 'tcx>, _def_id: DefId) -> bool {
37
- // FIXME(eddyb) should we do anything here for value properties?
38
- false
+ fn in_static(cx: &ConstCx<'_, 'tcx>, def_id: DefId) -> bool {
+ // `mir_const_qualif` does return the qualifs in the final value of a `static`, so we could
+ // use value-based qualification here, but we shouldn't do this without a good reason.
39
+ Self::in_any_value_of_ty(cx, cx.tcx.type_of(def_id))
40
}
41
42
fn in_projection_structurally(
0 commit comments