]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/eq_op.rs
5 #[allow(identity_op, double_parens, many_single_char_names)]
6 #[allow(no_effect, unused_variables, unnecessary_operation, short_circuit_statement)]
7 #[warn(nonminimal_bool)]
9 // simple values and comparisons
12 // even though I agree that no means no ;-)
17 // casts, methods, parentheses
18 (1 as u64) & (1 as u64);
21 // unary and binary operators
23 ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
24 (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
26 // various other things
29 vec
![1, 2, 3] == vec
![1, 2, 3]; //no error yet, as we don't match macros
52 2*a
.len() == 2*a
.len(); // ok, functions
53 a
.pop() == a
.pop(); // ok, functions
59 fn bitand(self, rhs
: X
) -> X
{
63 impl<'a
> BitAnd
<&'a X
> for X
{
65 fn bitand(self, rhs
: &'a X
) -> X
{
73 #[derive(Copy, Clone)]
77 fn bitand(self, rhs
: Y
) -> Y
{
81 impl<'a
> BitAnd
<&'a Y
> for Y
{
83 fn bitand(self, rhs
: &'a Y
) -> Y
{