> If function in Rust returns any type of result except Result
The conversation was specifically about ignoring errors. In Rust, errors are conventionally reported using Result hence it warning on unuse — AFAIK the only type opted into that by default, its variants being specifically called Ok and Err, and its currently exclusive support in `try!` and `?`
> And even in this case you can just add "let _ =" before call to suppress warning.
You can even disable the warning entirely, can you imagine that?
Incidentally, you can use that exact same feature to ignore errors from value-returning functions (where you need the actual result) in Go as well, so that's not exactly a slam dunk; and it is an explicit ignoring of the error rather than an implicit one which can (and often is) a mistake rather than a conscious decision by the developer. That is, there is a large difference between
_ := os.Chmod(…)
where the developer is explicitly stating "I don't care about an error" and
os.Chmod(…)
where the developer might not have noticed that an error is possible.
In Rust, the latter is will warn by default because fs::set_permissions returns an io::Result<()>.