Skip to content

Commit a8c8638

Browse files
authored
Remove unused code (#2398)
* Use the `clippy::missing_docs_in_private_items` instead of the `doc_mod` macro * remove dead code * Fix clippy warnings * Run rustfmt * update config field * some nits * more nits * remove the `testing_only_docs` feature
1 parent 0e193dc commit a8c8638

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+714
-763
lines changed

.github/workflows/bindgen.yml

-5
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
# `static` feature is not testable atm.
108108
feature_runtime: [0, 1]
109109
feature_extra_asserts: [0]
110-
feature_testing_only_docs: [0]
111110

112111
include:
113112
# Test with extra asserts + docs just with latest llvm versions to
@@ -117,7 +116,6 @@ jobs:
117116
release_build: 0
118117
no_default_features: 0
119118
feature_extra_asserts: 1
120-
feature_testing_only_docs: 1
121119

122120
# FIXME: Seems installing multiarch packages fails:
123121
#
@@ -132,15 +130,13 @@ jobs:
132130
# main_tests: 0
133131
# release_build: 0
134132
# feature_extra_asserts: 0
135-
# feature_testing_only_docs: 0
136133

137134
# Ensure stuff works on macos too
138135
- os: macos-latest
139136
llvm_version: "9.0"
140137
release_build: 0
141138
no_default_features: 0
142139
feature_extra_asserts: 0
143-
feature_testing_only_docs: 0
144140
steps:
145141
- uses: actions/checkout@v3
146142

@@ -181,7 +177,6 @@ jobs:
181177
BINDGEN_RELEASE_BUILD: ${{matrix.release_build}}
182178
BINDGEN_FEATURE_RUNTIME: ${{matrix.feature_runtime}}
183179
BINDGEN_FEATURE_EXTRA_ASSERTS: ${{matrix.feature_extra_asserts}}
184-
BINDGEN_FEATURE_TESTING_ONLY_DOCS: ${{matrix.feature_testing_only_docs}}
185180
BINDGEN_NO_DEFAULT_FEATURES: ${{matrix.no_default_features}}
186181
run: ./ci/test.sh
187182

CONTRIBUTING.md

-8
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,6 @@ versions of llvm, or specify the path of the desired libclang explicitly:
7979
$ export LIBCLANG_PATH=path/to/clang-9.0/lib
8080
```
8181

82-
Additionally, you may want to build and test with the `testing_only_docs`
83-
feature to ensure that you aren't forgetting to document types and functions. CI
84-
will catch it if you forget, but the turn around will be a lot slower ;)
85-
86-
```
87-
$ cargo build --features testing_only_docs
88-
```
89-
9082
## Testing
9183

9284
### Overview

bindgen-integration/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ cc = "1.0"
1414
static = ["bindgen/static"]
1515
runtime = ["bindgen/runtime"]
1616

17-
testing_only_docs = ["bindgen/testing_only_docs"]
1817
testing_only_extra_assertions = ["bindgen/testing_only_extra_assertions"]
1918
testing_only_libclang_9 = ["bindgen/testing_only_libclang_9"]
2019
testing_only_libclang_5 = ["bindgen/testing_only_libclang_5"]

bindgen-tests/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ static = ["bindgen/static"]
1717
runtime = ["bindgen/runtime"]
1818
which-rustfmt = ["bindgen/which-rustfmt"]
1919

20-
testing_only_docs = ["bindgen/testing_only_docs"]
2120
testing_only_extra_assertions = ["bindgen/testing_only_extra_assertions"]
2221
testing_only_libclang_9 = ["bindgen/testing_only_libclang_9"]
2322
testing_only_libclang_5 = ["bindgen/testing_only_libclang_5"]

bindgen/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ experimental = []
5252

5353
# These features only exist for CI testing -- don't use them if you're not hacking
5454
# on bindgen!
55-
testing_only_docs = []
5655
testing_only_extra_assertions = []
5756
testing_only_libclang_9 = []
5857
testing_only_libclang_5 = []

bindgen/callbacks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub enum TypeKind {
146146
Union,
147147
}
148148

149-
/// An struct providing information about the item being passed to `ParseCallbacks::generated_name_override`.
149+
/// A struct providing information about the item being passed to [`ParseCallbacks::generated_name_override`].
150150
#[non_exhaustive]
151151
pub struct ItemInfo<'a> {
152152
/// The name of the item

0 commit comments

Comments
 (0)