Skip to content

Commit e2257db

Browse files
bors[bot]asomers
andauthored
Merge #1911
1911: Cleanup old Clippy directives. r=rtzoeller a=asomers Co-authored-by: Alan Somers <[email protected]>
2 parents e756c96 + 2b827ad commit e2257db

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

src/macros.rs

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ macro_rules! libc_bitflags {
9595
/// }
9696
/// ```
9797
// Some targets don't use all rules.
98-
#[allow(unknown_lints)]
9998
#[allow(unused_macro_rules)]
10099
macro_rules! libc_enum {
101100
// Exit rule.

src/sys/quota.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ use std::{mem, ptr};
2121
struct QuotaCmd(QuotaSubCmd, QuotaType);
2222

2323
impl QuotaCmd {
24-
#[allow(unused_unsafe)]
2524
fn as_int(&self) -> c_int {
26-
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
25+
libc::QCMD(self.0 as i32, self.1 as i32)
2726
}
2827
}
2928

src/sys/signal.rs

-1
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ impl<'a> IntoIterator for &'a SigSet {
641641
}
642642

643643
/// A signal handler.
644-
#[allow(unknown_lints)]
645644
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
646645
pub enum SigHandler {
647646
/// Default signal handling.

src/sys/socket/mod.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,14 @@ libc_bitflags! {
283283
/// Sends or requests out-of-band data on sockets that support this notion
284284
/// (e.g., of type [`Stream`](enum.SockType.html)); the underlying protocol must also
285285
/// support out-of-band data.
286-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
287286
MSG_OOB;
288287
/// Peeks at an incoming message. The data is treated as unread and the next
289288
/// [`recv()`](fn.recv.html)
290289
/// or similar function shall still return this data.
291-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
292290
MSG_PEEK;
293291
/// Receive operation blocks until the full amount of data can be
294292
/// returned. The function may return smaller amount of data if a signal
295293
/// is caught, an error or disconnect occurs.
296-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
297294
MSG_WAITALL;
298295
/// Enables nonblocking operation; if the operation would block,
299296
/// `EAGAIN` or `EWOULDBLOCK` is returned. This provides similar
@@ -305,10 +302,8 @@ libc_bitflags! {
305302
/// which will affect all threads in
306303
/// the calling process and as well as other processes that hold
307304
/// file descriptors referring to the same open file description.
308-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
309305
MSG_DONTWAIT;
310306
/// Receive flags: Control Data was discarded (buffer too small)
311-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
312307
MSG_CTRUNC;
313308
/// For raw ([`Packet`](addr/enum.AddressFamily.html)), Internet datagram
314309
/// (since Linux 2.4.27/2.6.8),
@@ -318,18 +313,15 @@ libc_bitflags! {
318313
/// domain ([unix(7)](https://linux.die.net/man/7/unix)) sockets.
319314
///
320315
/// For use with Internet stream sockets, see [tcp(7)](https://linux.die.net/man/7/tcp).
321-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
322316
MSG_TRUNC;
323317
/// Terminates a record (when this notion is supported, as for
324318
/// sockets of type [`SeqPacket`](enum.SockType.html)).
325-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
326319
MSG_EOR;
327320
/// This flag specifies that queued errors should be received from
328321
/// the socket error queue. (For more details, see
329322
/// [recvfrom(2)](https://linux.die.net/man/2/recvfrom))
330323
#[cfg(any(target_os = "android", target_os = "linux"))]
331324
#[cfg_attr(docsrs, doc(cfg(all())))]
332-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
333325
MSG_ERRQUEUE;
334326
/// Set the `close-on-exec` flag for the file descriptor received via a UNIX domain
335327
/// file descriptor using the `SCM_RIGHTS` operation (described in
@@ -345,7 +337,6 @@ libc_bitflags! {
345337
target_os = "netbsd",
346338
target_os = "openbsd"))]
347339
#[cfg_attr(docsrs, doc(cfg(all())))]
348-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
349340
MSG_CMSG_CLOEXEC;
350341
/// Requests not to send `SIGPIPE` errors when the other end breaks the connection.
351342
/// (For more details, see [send(2)](https://linux.die.net/man/2/send)).
@@ -360,7 +351,6 @@ libc_bitflags! {
360351
target_os = "openbsd",
361352
target_os = "solaris"))]
362353
#[cfg_attr(docsrs, doc(cfg(all())))]
363-
#[allow(deprecated)] // Suppress useless warnings from libc PR 2963
364354
MSG_NOSIGNAL;
365355
}
366356
}
@@ -1581,8 +1571,7 @@ pub struct MultiHeaders<S> {
15811571
addresses: Box<[mem::MaybeUninit<S>]>,
15821572
// while we are not using it directly - this is used to store control messages
15831573
// and we retain pointers to them inside items array
1584-
#[allow(dead_code)]
1585-
cmsg_buffers: Option<Box<[u8]>>,
1574+
_cmsg_buffers: Option<Box<[u8]>>,
15861575
msg_controllen: usize,
15871576
}
15881577

@@ -1630,7 +1619,7 @@ impl<S> MultiHeaders<S> {
16301619
Self {
16311620
items: items.into_boxed_slice(),
16321621
addresses,
1633-
cmsg_buffers,
1622+
_cmsg_buffers: cmsg_buffers,
16341623
msg_controllen,
16351624
}
16361625
}

src/sys/socket/sockopt.rs

-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ macro_rules! getsockopt_impl {
138138
/// * `$getter:ty`: `Get` implementation; optional; only for `GetOnly` and `Both`.
139139
/// * `$setter:ty`: `Set` implementation; optional; only for `SetOnly` and `Both`.
140140
// Some targets don't use all rules.
141-
#[allow(unknown_lints)]
142141
#[allow(unused_macro_rules)]
143142
macro_rules! sockopt_impl {
144143
($(#[$attr:meta])* $name:ident, GetOnly, $level:expr, $flag:path, bool) => {

0 commit comments

Comments
 (0)