summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/context.rs7
-rw-r--r--src/lib.rs8
2 files changed, 9 insertions, 6 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs
index 32ee5bd0..9ff5a330 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -584,9 +584,12 @@ impl<'ctx> BindgenContext<'ctx> {
ret
}
- /// This function trying to find any dangling references inside of `items`
+ /// When the `testing_only_assert_no_dangling_items` feature is enabled,
+ /// this function walks the IR graph and asserts that we do not have any
+ /// edges referencing an ItemId for which we do not have an associated IR
+ /// item.
fn assert_no_dangling_references(&self) {
- if cfg!(feature = "assert_no_dangling_items") {
+ if cfg!(feature = "testing_only_assert_no_dangling_items") {
for _ in self.assert_no_dangling_item_traversal() {
// The iterator's next method does the asserting for us.
}
diff --git a/src/lib.rs b/src/lib.rs
index e6a66dfc..6637304b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -38,15 +38,15 @@ extern crate log;
mod log_stubs;
// A macro to declare an internal module for which we *must* provide
-// documentation for. If we are building with the "docs_" feature, then the
-// module is declared public, and our `#![deny(missing_docs)]` pragma applies to
-// it. This feature is used in CI, so we won't let anything slip by
+// documentation for. If we are building with the "testing_only_docs" feature,
+// then the module is declared public, and our `#![deny(missing_docs)]` pragma
+// applies to it. This feature is used in CI, so we won't let anything slip by
// undocumented. Normal builds, however, will leave the module private, so that
// we don't expose internals to library consumers.
macro_rules! doc_mod {
($m:ident, $doc_mod_name:ident) => {
cfg_if! {
- if #[cfg(feature = "docs_")] {
+ if #[cfg(feature = "testing_only_docs")] {
pub mod $doc_mod_name {
//! Autogenerated documentation module.
pub use super::$m::*;