Skip to content

Commit cbf0623

Browse files
joshtripletttgross35
authored andcommitted
Move deprecated attribute from extern "C" block to functions
Fixes `useless_deprecated` error.
1 parent 3c90779 commit cbf0623

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6199,17 +6199,19 @@ cfg_if! {
61996199
// These require a dependency on `libiconv`, and including this when built as
62006200
// part of `std` means every Rust program gets it. Ideally we would have a link
62016201
// modifier to only include these if they are used, but we do not.
6202-
#[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")]
62036202
#[cfg_attr(not(feature = "rustc-dep-of-std"), link(name = "iconv"))]
62046203
extern "C" {
6204+
#[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")]
62056205
pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t;
6206+
#[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")]
62066207
pub fn iconv(
62076208
cd: iconv_t,
62086209
inbuf: *mut *mut c_char,
62096210
inbytesleft: *mut size_t,
62106211
outbuf: *mut *mut c_char,
62116212
outbytesleft: *mut size_t,
62126213
) -> size_t;
6214+
#[deprecated(note = "Will be removed in 1.0 to avoid the `iconv` dependency")]
62136215
pub fn iconv_close(cd: iconv_t) -> c_int;
62146216
}
62156217

0 commit comments

Comments
 (0)