• philm@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    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?

    • flame3244@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Yes 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.