Oh, ok. Yeah that in fact does exist in C and C++ the same way as in Rust. Rust doesn't actually by default require you to consume a return value; a lot of functions are just marked as #[must_use]. C and C++ do the same thing with [[nodiscard]] and __attribute__((warn_unused_result)).
There's a go vet pass as well. https://pkg.go.dev/github.com/golangci/govet#hdr-Unused_resu...