Skip to content

Commit bacacde

Browse files
nikkon-devpvdrz
authored andcommitted
Make RustEdition public
Making RustEdition public allows calling Builder::rust_edition() from the build.rs scripts. + Adding documentation to the RustEdition enum to not break linter rules. Signed-off-by: Nik Konyuchenko <[email protected]>
1 parent c4440b3 commit bacacde

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bindgen/features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ impl fmt::Display for InvalidRustTarget {
8383
macro_rules! define_rust_editions {
8484
($($variant:ident($value:literal) => $minor:literal,)*) => {
8585
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
86+
#[doc = "Represents Rust Edition for the generated bindings"]
8687
pub enum RustEdition {
8788
$(
8889
#[doc = concat!("The ", stringify!($value), " edition of Rust.")]

bindgen/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ mod regex_set;
5050
pub use codegen::{
5151
AliasVariation, EnumVariation, MacroTypeVariation, NonCopyUnionStyle,
5252
};
53-
pub use features::{RustTarget, LATEST_STABLE_RUST};
53+
pub use features::{RustEdition, RustTarget, LATEST_STABLE_RUST};
5454
pub use ir::annotations::FieldVisibilityKind;
5555
pub use ir::function::Abi;
5656
#[cfg(feature = "__cli")]
5757
pub use options::cli::builder_from_flags;
5858

5959
use codegen::CodegenError;
60-
use features::{RustEdition, RustFeatures};
60+
use features::RustFeatures;
6161
use ir::comment;
6262
use ir::context::{BindgenContext, ItemId};
6363
use ir::item::Item;

0 commit comments

Comments
 (0)