mycroftholmess@lemm.ee to Programmer Humor@programming.dev · 3 years agoGolang be likei.imgur.comexternal-linkmessage-square55linkfedilinkarrow-up164
arrow-up164external-linkGolang be likei.imgur.commycroftholmess@lemm.ee to Programmer Humor@programming.dev · 3 years agomessage-square55linkfedilink
minus-squarephilm@programming.devlinkfedilinkarrow-up2·3 years agoIs this a hard error? Like it doesn’t compile at all? Isn’t there something like #[allow(unused)] in Rust you can put over the declaration?
minus-squareflame3244@lemmy.worldlinkfedilinkarrow-up1·3 years agoYes it is a hard error and Go does not compile then. You can do _ = foobar to fake variable usage. I think this is okay for testing purposes.
Is this a hard error? Like it doesn’t compile at all?
Isn’t there something like
#[allow(unused)]in Rust you can put over the declaration?Yes it is a hard error and Go does not compile then. You can do
_ = foobarto fake variable usage. I think this is okay for testing purposes.