Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.rs

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

13 lines
277 B
Rust
Raw Permalink Normal View History

improve liveness so it reports unused vars / dead assignments doesn't warn about pattern bindings yet though
2012-05-23 20:53:49 -07:00
fn test() {
Update compile fail tests to use isize.
2015-01-08 21:54:35 +11:00
let v: isize;
Compiler error messages: reduce assertiveness of message E0384 This message is emitted as guidance by the compiler when a developer attempts to reassign a value to an immutable variable. Following the message will always currently work, but it may not always be the best course of action; following the 'consider ...' messaging pattern provides a hint to the developer that it could be wise to explore other alternatives.
2021-04-12 23:29:09 +01:00
//~^ HELP consider making this binding mutable
Better span for "make binding mutable" suggestion
2024-07-03 21:01:29 +00:00
//~| SUGGESTION mut
new liveness pass to supercede last_use / initedness
2012-05-19 05:52:01 -07:00
loop {
update tests for migrate mode by default
2019-04-22 08:40:08 +01:00
v = 1; //~ ERROR cannot assign twice to immutable variable `v`
//~| NOTE cannot assign twice to immutable variable
new liveness pass to supercede last_use / initedness
2012-05-19 05:52:01 -07:00
}
}
fn main() {
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3912ms Template: 2ms
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