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 d24ae25 commit 1f420b9Copy full SHA for 1f420b9
src/librustc_mir/transform/check_consts/ops.rs
@@ -183,6 +183,10 @@ impl NonConstOp for Loop {
183
#[derive(Debug)]
184
pub struct MutBorrow(pub BorrowKind);
185
impl NonConstOp for MutBorrow {
186
+ fn feature_gate(tcx: TyCtxt<'_>) -> Option<bool> {
187
+ Some(tcx.features().const_mut_refs)
188
+ }
189
+
190
fn emit_error(&self, item: &Item<'_, '_>, span: Span) {
191
let kind = self.0;
192
if let BorrowKind::Mut { .. } = kind {
0 commit comments