blob: 3e984c6cb3bb7b9ae7759caadbcb6a6ab2f5fbb6 [file] [log] [blame]
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:8:13
|
LL | let _ = Ipv4Addr::new(127, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::ip-constant` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ip_constant)]`
help: use
|
LL - let _ = Ipv4Addr::new(127, 0, 0, 1);
LL + let _ = Ipv4Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:10:13
|
LL | let _ = Ipv4Addr::new(255, 255, 255, 255);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(255, 255, 255, 255);
LL + let _ = Ipv4Addr::BROADCAST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:12:13
|
LL | let _ = Ipv4Addr::new(0, 0, 0, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(0, 0, 0, 0);
LL + let _ = Ipv4Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:16:13
|
LL | let _ = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
LL + let _ = Ipv6Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:18:13
|
LL | let _ = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
LL + let _ = Ipv6Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:24:13
|
LL | let _ = net::Ipv4Addr::new(127, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = net::Ipv4Addr::new(127, 0, 0, 1);
LL + let _ = net::Ipv4Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:26:13
|
LL | let _ = net::Ipv4Addr::new(255, 255, 255, 255);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = net::Ipv4Addr::new(255, 255, 255, 255);
LL + let _ = net::Ipv4Addr::BROADCAST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:28:13
|
LL | let _ = net::Ipv4Addr::new(0, 0, 0, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = net::Ipv4Addr::new(0, 0, 0, 0);
LL + let _ = net::Ipv4Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:31:13
|
LL | let _ = net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
LL + let _ = net::Ipv6Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:33:13
|
LL | let _ = net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
LL + let _ = net::Ipv6Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:38:13
|
LL | let _ = std::net::Ipv4Addr::new(127, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = std::net::Ipv4Addr::new(127, 0, 0, 1);
LL + let _ = std::net::Ipv4Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:40:13
|
LL | let _ = std::net::Ipv4Addr::new(255, 255, 255, 255);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = std::net::Ipv4Addr::new(255, 255, 255, 255);
LL + let _ = std::net::Ipv4Addr::BROADCAST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:42:13
|
LL | let _ = std::net::Ipv4Addr::new(0, 0, 0, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = std::net::Ipv4Addr::new(0, 0, 0, 0);
LL + let _ = std::net::Ipv4Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:45:13
|
LL | let _ = std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
LL + let _ = std::net::Ipv6Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:47:13
|
LL | let _ = std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
LL + let _ = std::net::Ipv6Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:61:13
|
LL | let _ = Ipv4Addr::new(CONST_U8_127, CONST_U8_0, CONST_U8_0, CONST_U8_1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(CONST_U8_127, CONST_U8_0, CONST_U8_0, CONST_U8_1);
LL + let _ = Ipv4Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:63:13
|
LL | let _ = Ipv4Addr::new(CONST_U8_255, CONST_U8_255, CONST_U8_255, CONST_U8_255);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(CONST_U8_255, CONST_U8_255, CONST_U8_255, CONST_U8_255);
LL + let _ = Ipv4Addr::BROADCAST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:65:13
|
LL | let _ = Ipv4Addr::new(CONST_U8_0, CONST_U8_0, CONST_U8_0, CONST_U8_0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(CONST_U8_0, CONST_U8_0, CONST_U8_0, CONST_U8_0);
LL + let _ = Ipv4Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:69:13
|
LL | let _ = Ipv6Addr::new(
| _____________^
LL | |
LL | | CONST_U16_0,
LL | | CONST_U16_0,
... |
LL | | CONST_U16_1,
LL | | );
| |_____^
|
help: use
|
LL - let _ = Ipv6Addr::new(
LL -
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_1,
LL - );
LL + let _ = Ipv6Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:81:13
|
LL | let _ = Ipv6Addr::new(
| _____________^
LL | |
LL | | CONST_U16_0,
LL | | CONST_U16_0,
... |
LL | | CONST_U16_0,
LL | | );
| |_____^
|
help: use
|
LL - let _ = Ipv6Addr::new(
LL -
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - CONST_U16_0,
LL - );
LL + let _ = Ipv6Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:96:13
|
LL | let _ = Ipv4Addr::new(126 + 1, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(126 + 1, 0, 0, 1);
LL + let _ = Ipv4Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:98:13
|
LL | let _ = Ipv4Addr::new(254 + CONST_U8_1, 255, { 255 - CONST_U8_0 }, CONST_U8_255);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(254 + CONST_U8_1, 255, { 255 - CONST_U8_0 }, CONST_U8_255);
LL + let _ = Ipv4Addr::BROADCAST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:100:13
|
LL | let _ = Ipv4Addr::new(0, CONST_U8_255 - 255, 0, { 1 + 0 - 1 });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv4Addr::new(0, CONST_U8_255 - 255, 0, { 1 + 0 - 1 });
LL + let _ = Ipv4Addr::UNSPECIFIED;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:104:13
|
LL | let _ = Ipv6Addr::new(0 + CONST_U16_0, 0, 0, 0, 0, 0, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv6Addr::new(0 + CONST_U16_0, 0, 0, 0, 0, 0, 0, 1);
LL + let _ = Ipv6Addr::LOCALHOST;
|
error: hand-coded well-known IP address
--> tests/ui/ip_constant.rs:106:13
|
LL | let _ = Ipv6Addr::new(0 + 0, 0, 0, 0, 0, { 2 - 1 - CONST_U16_1 }, 0, 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use
|
LL - let _ = Ipv6Addr::new(0 + 0, 0, 0, 0, 0, { 2 - 1 - CONST_U16_1 }, 0, 1);
LL + let _ = Ipv6Addr::LOCALHOST;
|
error: aborting due to 25 previous errors