Skip to content

Commit dcecefc

Browse files
Use conservative, type-based qualifcation for statics
1 parent 2f5ea63 commit dcecefc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_mir/transform/check_consts/qualifs.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ pub trait Qualif {
3232
/// of the type.
3333
fn in_any_value_of_ty(_cx: &ConstCx<'_, 'tcx>, _ty: Ty<'tcx>) -> bool;
3434

35-
fn in_static(_cx: &ConstCx<'_, 'tcx>, _static: &Static<'tcx>) -> bool {
36-
// FIXME(eddyb) should we do anything here for value properties?
37-
false
35+
fn in_static(cx: &ConstCx<'_, 'tcx>, statik: &Static<'tcx>) -> bool {
36+
Self::in_any_value_of_ty(cx, statik.ty)
3837
}
3938

4039
fn in_projection_structurally(

0 commit comments

Comments
 (0)