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
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/nll/assign-while-to-immutable.rs

12 lines
242 B
Rust
Raw Normal View History

Fix incorrect double assignment in MIR for while loops
2019-06-15 10:08:20 +01:00
// We used to incorrectly assign to `x` twice when generating MIR for this
// function, preventing this from compiling.
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ check-pass
Fix incorrect double assignment in MIR for while loops
2019-06-15 10:08:20 +01:00
fn main() {
Adjust UI tests for `unit_bindings` - Either explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Fix disjoint-capture-in-same-closure test
2023-06-12 16:55:36 +08:00
let x: () = while false {
Fix incorrect double assignment in MIR for while loops
2019-06-15 10:08:20 +01:00
break;
};
Adjust UI tests for `unit_bindings` - Either explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Fix disjoint-capture-in-same-closure test
2023-06-12 16:55:36 +08:00
let y: () = 'l: while break 'l {};
Fix incorrect double assignment in MIR for while loops
2019-06-15 10:08:20 +01:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2697ms Template: 3ms
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