Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cc_bindings_from_rs/generate_bindings/generate_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,15 @@ pub fn get_async_future_output_ty<'tcx>(
.ok_or_else(|| anyhow!("crubit.rs-bug: Future::Output lang item not found"))?;
#[rustversion::stable(1.95)]
let alias_def_id = alias_ty.def_id;
#[rustversion::any(nightly, stable(1.96))]
#[rustversion::any(all(nightly, before(2026-06-23)), stable(1.96))]
let alias_def_id = alias_ty.kind.def_id();
#[rustversion::all(nightly, since(2026-06-23))]
let alias_def_id = alias_ty.kind.try_to_projection().ok_or_else(|| {
anyhow!(
"go/crubit-bug: async function return type has unexpected alias kind (not a \
projection/trait associated type)",
)
})?;
tcx.explicit_item_bounds(alias_def_id)
.iter_instantiated_copied(tcx, alias_ty.args)
.find_map(|unnorm| {
Expand Down