This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-05-14 02:49:40 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
901b340c1f
rust
/
tests
/
ui
/
borrowck
/
borrowck-init-in-called-fn-expr.rs
8 lines
104 B
Rust
Raw
Normal View
History
Unescape
Escape
new liveness pass to supercede last_use / initedness
2012-05-19 12:52:01 +00:00
fn
main
(
)
{
remove all kind annotations from closures
2015-02-01 17:44:15 +00:00
let
j
=
|
|
->
isize
{
Update compile fail tests to use isize.
2015-01-08 10:54:35 +00:00
let
i
:
isize
;
On partial uninit error point at where we need init When a binding is declared without a value, borrowck verifies that all codepaths have *one* assignment to them to initialize them fully. If there are any cases where a condition can be met that leaves the binding uninitialized or we attempt to initialize a field of an unitialized binding, we emit E0381. We now look at all the statements that initialize the binding, and use them to explore branching code paths that *don't* and point at them. If we find *no* potential places where an assignment to the binding might be missing, we display the spans of all the existing initializers to provide some context.
2022-06-21 18:57:45 +00:00
i
//~ ERROR E0381
new liveness pass to supercede last_use / initedness
2012-05-19 12:52:01 +00:00
}
;
j
(
)
;
}
Reference in New Issue
Copy Permalink