Skip to content

Commit a9c569b

Browse files
committed
Add missing Debug implementations
1 parent b832f25 commit a9c569b

File tree

19 files changed

+41
-1
lines changed

19 files changed

+41
-1
lines changed

crates/block-sys/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#![no_std]
1616
#![warn(elided_lifetimes_in_paths)]
17+
#![warn(missing_copy_implementations)]
1718
#![deny(non_ascii_idents)]
1819
#![warn(unreachable_pub)]
1920
#![deny(unsafe_op_in_unsafe_fn)]
@@ -291,6 +292,7 @@ pub struct Block_layout {
291292
}
292293

293294
#[repr(C)]
295+
#[allow(missing_copy_implementations)]
294296
pub struct Block_descriptor_header {
295297
/// Reserved for future use. Currently always 0.
296298
pub reserved: c_ulong, // usize

crates/block2/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
7777
#![no_std]
7878
#![warn(elided_lifetimes_in_paths)]
79+
#![warn(missing_copy_implementations)]
80+
#![warn(missing_debug_implementations)]
7981
#![warn(missing_docs)]
8082
#![deny(non_ascii_idents)]
8183
#![warn(unreachable_pub)]

crates/icrate/src/Foundation/__macro_helpers/cached.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use objc2::rc::Id;
66
use objc2::Message;
77

88
/// Allows storing an `Id` in a static and lazily loading it.
9+
#[derive(Debug)]
910
pub struct CachedId<T> {
1011
ptr: AtomicPtr<T>,
1112
}

crates/icrate/src/Foundation/__macro_helpers/ns_string.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![cfg(feature = "Foundation_NSString")]
2+
#![allow(missing_copy_implementations)]
23
//! Macro for making a static NSString.
34
//!
45
//! This closely follows what clang does, see:
@@ -37,6 +38,7 @@ extern "C" {
3738
/// [`CFRuntimeBase`]: <https://github.com/apple-oss-distributions/CF/blob/CF-1153.18/CFRuntime.h#L216-L228>
3839
/// [`CF_CONST_STRING`]: <https://github.com/apple-oss-distributions/CF/blob/CF-1153.18/CFInternal.h#L332-L336>
3940
#[repr(C)]
41+
#[derive(Debug)]
4042
pub struct CFConstString {
4143
isa: &'static AnyClass,
4244
// Important that we don't use `usize` here, since that would be wrong on
@@ -118,6 +120,7 @@ pub const fn is_ascii_no_nul(bytes: &[u8]) -> bool {
118120
true
119121
}
120122

123+
#[derive(Debug)]
121124
pub struct Utf16Char {
122125
pub repr: [u16; 2],
123126
pub len: usize,
@@ -147,6 +150,7 @@ impl Utf16Char {
147150
}
148151
}
149152

153+
#[derive(Debug)]
150154
pub struct EncodeUtf16Iter {
151155
str: &'static [u8],
152156
index: usize,

crates/icrate/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#![no_std]
88
#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg))]
99
#![warn(elided_lifetimes_in_paths)]
10+
#![warn(missing_copy_implementations)]
11+
#![warn(missing_debug_implementations)]
1012
#![deny(non_ascii_idents)]
1113
#![warn(unreachable_pub)]
1214
#![deny(unsafe_op_in_unsafe_fn)]

crates/objc-sys/src/image_info.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/// only used behind experimental features (`unstable-static-*`).
66
#[repr(C)]
77
#[doc(hidden)]
8+
#[allow(missing_copy_implementations)]
89
pub struct __ImageInfo {
910
// These are not actually `unsigned int`, even though the docs say so
1011
/// The version of the image info struct.

crates/objc-sys/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
1616
#![no_std]
1717
#![warn(elided_lifetimes_in_paths)]
18+
#![warn(missing_copy_implementations)]
1819
#![deny(non_ascii_idents)]
1920
#![warn(unreachable_pub)]
2021
#![deny(unsafe_op_in_unsafe_fn)]

crates/objc2-encode/src/encoding.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ use crate::EncodingBox;
3434
/// use objc2_encode::Encoding;
3535
/// assert!(Encoding::Array(10, &Encoding::FloatComplex).equivalent_to_str("[10jf]"));
3636
/// ```
37-
// Not `Copy`, since this may one day contain `Box`
37+
// Not `Copy`, since this may one day be merged with `EncodingBox`
38+
#[allow(missing_copy_implementations)]
3839
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
3940
// See <https://en.cppreference.com/w/c/language/type>
4041
#[non_exhaustive] // Maybe we're missing some encodings?

crates/objc2-encode/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
3838
#![no_std]
3939
#![warn(elided_lifetimes_in_paths)]
40+
#![warn(missing_copy_implementations)]
41+
#![warn(missing_debug_implementations)]
4042
#![warn(missing_docs)]
4143
#![deny(non_ascii_idents)]
4244
#![warn(unreachable_pub)]

crates/objc2-proc-macros/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
66
#![warn(elided_lifetimes_in_paths)]
77
#![warn(missing_docs)]
8+
#![warn(missing_copy_implementations)]
9+
#![warn(missing_debug_implementations)]
810
#![deny(non_ascii_idents)]
911
#![warn(unreachable_pub)]
1012
#![deny(unsafe_op_in_unsafe_fn)]

0 commit comments

Comments
 (0)