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
16ad385579cebb6f7d53367c552661b6b51a4a02
rust/tests/ui/binding/invalid-assignment-in-while-loop-77218.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
186 B
Rust
Raw Normal View History

Rehome tests/ui/issues/ tests [5/?]
2025-07-13 16:56:31 -04:00
// https://github.com/rust-lang/rust/issues/77218
On type mismatch caused by assignment, point at assignee * Do not emit unnecessary E0308 after E0070 * Show fewer errors on `while let` missing `let` * Hide redundant E0308 on `while let` missing `let` * Point at binding definition when possible on invalid assignment * do not point at closure twice * do not suggest `if let` for literals in lhs * account for parameter types
2021-05-06 19:09:35 -07:00
//@ run-rustfix
fn main() {
let value = [7u8];
Stabilize `destructuring_assignment`
2021-11-03 02:50:57 -04:00
while Some(0) = value.get(0) {} //~ ERROR invalid left-hand side of assignment
On type mismatch caused by assignment, point at assignee * Do not emit unnecessary E0308 after E0070 * Show fewer errors on `while let` missing `let` * Hide redundant E0308 on `while let` missing `let` * Point at binding definition when possible on invalid assignment * do not point at closure twice * do not suggest `if let` for literals in lhs * account for parameter types
2021-05-06 19:09:35 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1721ms 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