summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Merdich <jake@merdich.com>2019-11-28 02:48:20 +0000
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-11-28 16:25:26 +0100
commit7d61f36a5bfcfe2ea533f5edcae8bb6991683432 (patch)
treec73ae86c8d43d6f77e958c829eec67b2609df25f
parent880de82108cf7668870f0b2dc5660b2dac03040d (diff)
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.
-rw-r--r--src/codegen/mod.rs2
-rw-r--r--src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 1fad91f4..d9ac4aa0 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -2279,7 +2279,7 @@ impl MethodCodegen for Method {
pub enum EnumVariation {
/// The code for this enum will use a Rust enum
Rust {
- /// Indicates whether the generated struct should be #[non_exhaustive]
+ /// Indicates whether the generated struct should be `#[non_exhaustive]`
non_exhaustive: bool,
},
/// The code for this enum will use a newtype
diff --git a/src/lib.rs b/src/lib.rs
index e7ed376f..877dbd9a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -909,7 +909,7 @@ impl Builder {
}
/// Mark the given enum (or set of enums, if using a pattern) as a Rust
- /// enum with the #[non_exhaustive] attribute.
+ /// enum with the `#[non_exhaustive]` attribute.
///
/// This makes bindgen generate enums instead of constants. Regular
/// expressions are supported.