Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
lint
/
lint-double-negations-macro.rs
blob: a6583271d5a2ab4989c0030d08ce54314fb32c85 [
file
] [
log
] [
blame
]
//@ check-pass
macro_rules
!
neg
{
(
$e
:
expr
)
=>
{
-
$e
};
}
macro_rules
!
bad_macro
{
(
$e
:
expr
)
=>
{
--
$e
//~ WARN use of a double negation
};
}
fn
main
()
{
neg
!(-
1
);
bad_macro
!(
1
);
}