2017-10-30 07:28:07 -05:00
|
|
|
#![allow(warnings)]
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn nll_fail() {
|
|
|
|
let mut data = ('a', 'b', 'c');
|
|
|
|
let c = &mut data.0;
|
|
|
|
capitalize(c);
|
|
|
|
data.0 = 'e';
|
2019-05-02 17:34:15 -05:00
|
|
|
//~^ ERROR [E0506]
|
2017-10-30 07:28:07 -05:00
|
|
|
data.0 = 'f';
|
|
|
|
data.0 = 'g';
|
|
|
|
capitalize(c);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn nll_ok() {
|
|
|
|
let mut data = ('a', 'b', 'c');
|
|
|
|
let c = &mut data.0;
|
|
|
|
capitalize(c);
|
|
|
|
data.0 = 'e';
|
|
|
|
data.0 = 'f';
|
|
|
|
data.0 = 'g';
|
|
|
|
}
|
|
|
|
|
|
|
|
fn capitalize(_: &mut char) {
|
|
|
|
}
|