about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-09-25 02:29:47 +0200
committerGitHub <noreply@github.com>2020-09-25 02:29:47 +0200
commit473ae229f0f1d45055d4a1ba1a9e0e4095f866fb (patch)
tree482d7d201e23f043710f1bbcb19672774af0f87d /compiler/rustc_mir/src/transform/coverage/debug.rs
parent6f3da3d53ff29e604a26d9c94a14147094575b1d (diff)
parente5e5e64ff1b91e57fed22e7a52e5de333980fafd (diff)
downloadrust-473ae229f0f1d45055d4a1ba1a9e0e4095f866fb.tar.gz
rust-473ae229f0f1d45055d4a1ba1a9e0e4095f866fb.zip
Rollup merge of #77136 - ecstatic-morse:issue-77134, r=oli-obk
Suggest `const_mut_refs`, not `const_fn` for mutable references in `const fn`

Resolves #77134.

Prior to #76850, most uses of `&mut` in `const fn` ~~required~~ involved two feature gates, `const_mut_refs` and `const_fn`. The first allowed all mutable borrows of locals. The second allowed only locals, arguments and return values whose types contained `&mut`. I switched the second check to the `const_mut_refs` gate. However, I forgot update the error message with the new suggestion.

Alternatively, we could revert to having two different feature gates for this. OP's code never borrows anything mutably, so it didn't need `const_mut_refs` in the past, only `const_fn`. I'd prefer to keep everything under a single gate, however.

r? @oli-obk
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions