Skip to content

Commit a88a708

Browse files
committed
fix bug
1 parent 791daa9 commit a88a708

File tree

30 files changed

+241
-1558
lines changed

30 files changed

+241
-1558
lines changed

codegen/src/passes/find_methods_and_fields.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use indexmap::IndexMap;
22
use log::{info, trace};
33
use rustc_hir::{
4-
Safety,
4+
Safety, StableSince,
55
def_id::{DefId, LOCAL_CRATE},
66
};
77
use rustc_infer::infer::TyCtxtInferExt;
@@ -191,21 +191,22 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, args: &Args) -> b
191191
return None;
192192
}
193193

194-
if let Some(unstability) = ctxt.tcx.lookup_stability(fn_did)
195-
&& let Some(stable_since) = unstability.stable_since()
196-
&& match stable_since {
197-
rustc_hir::StableSince::Version(rustc_version) => {
194+
let is_stable_for_target = ctxt
195+
.tcx
196+
.lookup_stability(fn_did)
197+
.map(|stability| match stability.stable_since() {
198+
Some(StableSince::Version(rustc_version)) => {
198199
args.rustc_version_is_greater_than_mrsv_target(rustc_version)
199200
}
200-
rustc_hir::StableSince::Current => true,
201-
rustc_hir::StableSince::Err(_) => true,
202-
}
203-
{
201+
_ => false,
202+
})
203+
.unwrap_or(true);
204+
205+
if !is_stable_for_target {
204206
log::debug!(
205-
"Skipping unstable function: `{}` on type: `{}` feature: {:?}, msrv target: {:?}",
207+
"Skipping unstable function: `{}` on type: `{}`, msrv target: {:?}",
206208
ctxt.tcx.item_name(fn_did),
207209
ctxt.tcx.item_name(def_id),
208-
unstability.feature.as_str(),
209210
args.mrsv_target()
210211
);
211212
return None;

crates/bindings/bevy_a11y_bms_bindings/Cargo.toml

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

crates/bindings/bevy_animation_bms_bindings/Cargo.toml

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

crates/bindings/bevy_asset_bms_bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/bindings/bevy_camera_bms_bindings/Cargo.toml

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

crates/bindings/bevy_color_bms_bindings/Cargo.toml

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

crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml

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

crates/bindings/bevy_ecs_bms_bindings/Cargo.toml

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

crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml

Lines changed: 8 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)