Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
300901b70509a0af2d971aa6f6104300da24212c
rust/tests/ui/moves/move-in-guard-2.rs

14 lines
230 B
Rust
Raw Normal View History

revise handling of match expressions so that arms branch to next arm. Update the graphviz tests accordingly. Fixes #22073. (Includes regression test for the issue.) (Factoring of aatch CFG code, Part 4.)
2015-02-19 17:54:41 +01:00
pub fn main() {
Remove box syntax from most places in src/test outside of the issues dir
2021-08-25 02:39:40 +02:00
let x: Box<_> = Box::new(1);
revise handling of match expressions so that arms branch to next arm. Update the graphviz tests accordingly. Fixes #22073. (Includes regression test for the issue.) (Factoring of aatch CFG code, Part 4.)
2015-02-19 17:54:41 +01:00
let v = (1, 2);
match v {
(1, _) |
(_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
_ => (),
}
}
fn take<T>(_: T) -> bool { false }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4047ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API