Prefer #![feature(bind_by_move_pattern_guards)] over -Z disable_ast_check_for_mutation_in_guard
This commit is contained in:
parent
d623ec6ba3
commit
f9ff7b7336
5 changed files with 5 additions and 13 deletions
|
|
@ -12,12 +12,11 @@
|
|||
// This test illustrates that under NLL, we can remove our overly
|
||||
// conservative approach for disallowing mutations of match inputs.
|
||||
|
||||
// See further discussion on rust-lang/rust#24535 and
|
||||
// rust-lang/rfcs#1006.
|
||||
|
||||
// compile-flags: -Z disable-ast-check-for-mutation-in-guard
|
||||
// See further discussion on rust-lang/rust#24535,
|
||||
// rust-lang/rfcs#1006, and rust-lang/rfcs#107
|
||||
|
||||
#![feature(nll)]
|
||||
#![feature(bind_by_move_pattern_guards)]
|
||||
|
||||
fn main() {
|
||||
rust_issue_24535();
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
// reject it. But I want to make sure that we continue to reject it
|
||||
// (under NLL) even when that conservaive check goes away.
|
||||
|
||||
// compile-flags: -Z disable-ast-check-for-mutation-in-guard
|
||||
|
||||
#![feature(bind_by_move_pattern_guards)]
|
||||
#![feature(nll)]
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
// Test that we don't allow mutating the value being matched on in a way that
|
||||
// changes which patterns it matches, until we have chosen an arm.
|
||||
|
||||
// compile-flags: -Zdisable-ast-check-for-mutation-in-guard
|
||||
|
||||
#![feature(bind_by_move_pattern_guards)]
|
||||
#![feature(nll)]
|
||||
|
||||
fn ok_mutation_in_guard(mut q: i32) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue