Skip to content

Commit 22f25d2

Browse files
committed
Merge branch 'main' into pass-item-info-to-item-name
2 parents bcd8398 + 97ab915 commit 22f25d2

Some content is hidden

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

50 files changed

+1089
-399
lines changed

.github/workflows/bindgen.yml

Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,27 @@ on:
1212
- main
1313

1414
jobs:
15-
rustfmt-clippy:
15+
rustfmt:
1616
runs-on: ubuntu-latest
17-
1817
steps:
1918
- uses: actions/checkout@v4
2019

21-
- name: Install stable
20+
- name: Install nightly
2221
uses: dtolnay/rust-toolchain@master
2322
with:
24-
# TODO: Should ideally be stable, but we use some nightly-only
25-
# features.
2623
toolchain: nightly
27-
components: rustfmt, clippy
24+
components: rustfmt
2825

2926
- name: Run rustfmt
30-
run: cargo fmt -- --check
27+
run: cargo +nightly fmt -- --check
28+
29+
clippy:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
3133

3234
- name: Run clippy
33-
run: cargo clippy --all-targets --workspace --exclude bindgen-integration --exclude tests_expectations
35+
run: cargo clippy --all-targets --workspace --exclude bindgen-integration --exclude tests_expectations -- -D warnings
3436

3537
msrv:
3638
runs-on: ubuntu-latest
@@ -64,12 +66,7 @@ jobs:
6466
steps:
6567
- uses: actions/checkout@v4
6668

67-
- name: Install stable
68-
uses: dtolnay/rust-toolchain@master
69-
with:
70-
toolchain: stable
71-
72-
- name: Check without default features
69+
- name: Check without default features
7370
run: cargo check -p bindgen --no-default-features --features=runtime
7471

7572
docs:
@@ -79,12 +76,7 @@ jobs:
7976
steps:
8077
- uses: actions/checkout@v4
8178

82-
- name: Install stable
83-
uses: dtolnay/rust-toolchain@master
84-
with:
85-
toolchain: stable
86-
87-
- name: Generate documentation for `bindgen`
79+
- name: Generate documentation for `bindgen`
8880
run: cargo doc --document-private-items --no-deps -p bindgen
8981

9082
- name: Generate documentation for `bindgen-cli`
@@ -95,11 +87,6 @@ jobs:
9587
steps:
9688
- uses: actions/checkout@v4
9789

98-
- name: Install stable
99-
uses: dtolnay/rust-toolchain@master
100-
with:
101-
toolchain: stable
102-
10390
# TODO: Actually run quickchecks once `bindgen` is reliable enough.
10491
- name: Build quickcheck tests
10592
run: cd bindgen-tests/tests/quickchecking && cargo test
@@ -112,11 +99,6 @@ jobs:
11299
steps:
113100
- uses: actions/checkout@v4
114101

115-
- name: Install stable
116-
uses: dtolnay/rust-toolchain@master
117-
with:
118-
toolchain: stable
119-
120102
- name: Test expectations
121103
run: cd bindgen-tests/tests/expectations && cargo test
122104

@@ -174,21 +156,6 @@ jobs:
174156
BINDGEN_RUST_FOR_LINUX_TEST: ${{matrix.os == 'ubuntu-latest' && matrix.llvm_version == '16.0' && matrix.feature_extra_asserts == 0 && 1 || 0}}
175157
run: ./ci/test.sh
176158

177-
check-cfg:
178-
runs-on: ubuntu-latest
179-
env:
180-
RUSTFLAGS: -D warnings
181-
steps:
182-
- uses: actions/checkout@v4
183-
184-
- name: Install nightly
185-
uses: dtolnay/rust-toolchain@master
186-
with:
187-
toolchain: nightly
188-
189-
- name: Check cfg
190-
run: cargo check -Z unstable-options -Z check-cfg
191-
192159
test-book:
193160
runs-on: ubuntu-latest
194161
steps:
@@ -221,7 +188,7 @@ jobs:
221188
# separately.
222189
success:
223190
runs-on: ubuntu-latest
224-
needs: [rustfmt-clippy, msrv, minimal, docs, quickchecking, test-expectations, test, check-cfg, test-book, test-no-headers]
191+
needs: [rustfmt, clippy, msrv, minimal, docs, quickchecking, test-expectations, test, test-book, test-no-headers]
225192
# GitHub branch protection is exceedingly silly and treats "jobs skipped
226193
# because a dependency failed" as success. So we have to do some
227194
# contortions to ensure the job fails if any of its dependencies fails.

bindgen-tests/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main() {
2323

2424
for entry in entries {
2525
// TODO: file_is_cpp() in bindgen/lib.rs checks for hpp,hxx,hh, and h++ - should this be consistent?
26-
if entry.path().extension().map_or(false, |ext| {
26+
if entry.path().extension().is_some_and(|ext| {
2727
ext.eq_ignore_ascii_case("h") || ext.eq_ignore_ascii_case("hpp")
2828
}) {
2929
let func = entry

bindgen-tests/tests/expectations/tests/bitfield-enum-basic.rs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/bitfield-enum-repr-c.rs

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/bitfield-enum-repr-transparent.rs

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/char16_t.rs

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/class_with_enum.rs

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/enum-default-bitfield.rs

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/enum-doc-bitfield.rs

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/issue-1198-alias-rust-bitfield-enum.rs

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)