tint: add [[nodiscard]] on utils::Result class

Helps when changing the return type of a function from `void` to
`Result<T>`. The compiler fails in places where the return value is
ignored, which is never what we want with Result.

Change-Id: Id3271ea9fb1128f8f493030f013b2b577235be8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99160
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/tint/utils/result.h b/src/tint/utils/result.h
index 6cfe668..b535f4f 100644
--- a/src/tint/utils/result.h
+++ b/src/tint/utils/result.h
@@ -32,7 +32,7 @@
 ///         information about the failure, except that something failed. Must not be the same type
 ///         as SUCCESS_TYPE.
 template <typename SUCCESS_TYPE, typename FAILURE_TYPE = FailureType>
-struct Result {
+struct [[nodiscard]] Result {
     static_assert(!std::is_same_v<SUCCESS_TYPE, FAILURE_TYPE>,
                   "Result must not have the same type for SUCCESS_TYPE and FAILURE_TYPE");