about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/macros/must-use-in-macro-55516.stderr5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ui/macros/must-use-in-macro-55516.stderr b/tests/ui/macros/must-use-in-macro-55516.stderr
index 7bf4aaab51c..b93d40d7e5a 100644
--- a/tests/ui/macros/must-use-in-macro-55516.stderr
+++ b/tests/ui/macros/must-use-in-macro-55516.stderr
@@ -7,7 +7,10 @@ LL |     write!(&mut example, "{}", 42);
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: `-W unused-must-use` implied by `-W unused`
    = help: to override `-W unused` add `#[allow(unused_must_use)]`
-   = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: use `let _ = ...` to ignore the resulting value
+   |
+LL |     let _ = write!(&mut example, "{}", 42);
+   |     +++++++
 
 warning: 1 warning emitted