Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
macros
/
must-use-in-macro-55516.rs
blob: 21f417d0e633b59fba44b2984e3c2581a6b8b63c [
file
] [
log
] [
blame
] [
edit
]
//@ check-pass
//@ compile-flags: -Wunused
// make sure write!() can't hide its unused Result
fn
main
()
{
use
std
::
fmt
::
Write
;
let
mut
example
=
String
::
new
();
write
!(&
mut
example
,
"{}"
,
42
);
//~WARN must be used
}