diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-09-25 11:56:31 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-09-28 07:06:52 -0700 |
| commit | dcecefcb712c0fd714013fcdf8499f4d65f220b8 (patch) | |
| tree | eade0ed09a937bfbc99ef1a5c52b4b04b70588a4 | |
| parent | 2f5ea633d46abb9aedda22c96bc91889687a99f5 (diff) | |
| download | rust-dcecefcb712c0fd714013fcdf8499f4d65f220b8.tar.gz rust-dcecefcb712c0fd714013fcdf8499f4d65f220b8.zip | |
Use conservative, type-based qualifcation for statics
| -rw-r--r-- | src/librustc_mir/transform/check_consts/qualifs.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc_mir/transform/check_consts/qualifs.rs b/src/librustc_mir/transform/check_consts/qualifs.rs index ea25d6ff5b8..8e0b49d157e 100644 --- a/src/librustc_mir/transform/check_consts/qualifs.rs +++ b/src/librustc_mir/transform/check_consts/qualifs.rs @@ -32,9 +32,8 @@ pub trait Qualif { /// of the type. fn in_any_value_of_ty(_cx: &ConstCx<'_, 'tcx>, _ty: Ty<'tcx>) -> bool; - fn in_static(_cx: &ConstCx<'_, 'tcx>, _static: &Static<'tcx>) -> bool { - // FIXME(eddyb) should we do anything here for value properties? - false + fn in_static(cx: &ConstCx<'_, 'tcx>, statik: &Static<'tcx>) -> bool { + Self::in_any_value_of_ty(cx, statik.ty) } fn in_projection_structurally( |
