mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Suppress bad unused_attributes lint on doc(hidden) attr
warning: `#[doc(hidden)]` is ignored on trait impl items --> src/extern_type.rs:194:17 | 194 | #[doc(hidden)] | ^^^^^^^^^^^^^^ help: remove this attribute ... 202 | / impl_extern_type! { 203 | | [Trivial] 204 | | bool = "bool" 205 | | u8 = "std::uint8_t" ... | 223 | | CxxString = "std::string" 224 | | } | |_- in this macro invocation | = note: `#[warn(unused_attributes)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item = note: this warning originates in the macro `impl_extern_type` (in Nightly builds, run with -Z macro-backtrace for more info)
This commit is contained in:
parent
0b878ccec4
commit
af2620ca03
@ -191,6 +191,7 @@ macro_rules! impl_extern_type {
|
|||||||
$($(
|
$($(
|
||||||
$(#[$($attr)*])*
|
$(#[$($attr)*])*
|
||||||
unsafe impl ExternType for $ty {
|
unsafe impl ExternType for $ty {
|
||||||
|
#[allow(unused_attributes)] // incorrect lint; this doc(hidden) attr *is* respected by rustdoc
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
type Id = crate::type_id!($cxxpath);
|
type Id = crate::type_id!($cxxpath);
|
||||||
type Kind = $kind;
|
type Kind = $kind;
|
||||||
|
Loading…
Reference in New Issue
Block a user