2018-01-03 15:55:40 -06:00
|
|
|
// compile-flags: -Z borrowck=compare
|
|
|
|
|
2017-09-06 01:36:34 -05:00
|
|
|
pub fn main(){
|
|
|
|
let maybe = Some(vec![true, true]);
|
|
|
|
|
|
|
|
loop {
|
|
|
|
if let Some(thing) = maybe {
|
2018-05-09 10:17:58 -05:00
|
|
|
}
|
|
|
|
//~^^ ERROR use of partially moved value: `maybe` (Ast) [E0382]
|
2018-01-03 15:55:40 -06:00
|
|
|
//~| ERROR use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast) [E0382]
|
2018-06-20 21:51:18 -05:00
|
|
|
//~| ERROR use of moved value (Mir) [E0382]
|
2017-09-06 01:36:34 -05:00
|
|
|
}
|
|
|
|
}
|