fn foo() {}
fn bar() -> ! {}
Nothing
in Scala
return
error is quite wrong
should
and will
panic etc...
Vec
have that std::vector
doesn't?
let c = Foo { x: 1 };
use c::*;
@dwijnand You could do:
let Foo { x } = c;
If Foo
has other fields, but you want to bring only x
in scope, you can do:
let Foo { x, .. } = c;
let Foo { * } = c;
struct Foo { x: i32 }
let c = Foo { x: 30 };
... multiple lines of code ...
let x = ...
... multiple lines of code ...
let Foo { * } = c;
impl Trait
definition