Skip to content

Commit 7d61f36

Browse files
jmerdichemilio
authored andcommitted
Fix warning on rustdoc
Rustdoc was treating doc comments containing `#[non_exhaustive]` as links and warning, so mark that as code to avoid the warning.
1 parent 880de82 commit 7d61f36

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/codegen/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2279,7 +2279,7 @@ impl MethodCodegen for Method {
22792279
pub enum EnumVariation {
22802280
/// The code for this enum will use a Rust enum
22812281
Rust {
2282-
/// Indicates whether the generated struct should be #[non_exhaustive]
2282+
/// Indicates whether the generated struct should be `#[non_exhaustive]`
22832283
non_exhaustive: bool,
22842284
},
22852285
/// The code for this enum will use a newtype

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ impl Builder {
909909
}
910910

911911
/// Mark the given enum (or set of enums, if using a pattern) as a Rust
912-
/// enum with the #[non_exhaustive] attribute.
912+
/// enum with the `#[non_exhaustive]` attribute.
913913
///
914914
/// This makes bindgen generate enums instead of constants. Regular
915915
/// expressions are supported.

0 commit comments

Comments
 (0)