commit | 0c07b09647776bb131892ae64f089198715658b3 | [log] [tgz] |
---|---|---|
author | Lukasz Anforowicz <lukasza@google.com> | Fri Mar 03 10:34:15 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Mar 03 10:35:02 2023 -0800 |
tree | a37f207536221b82232ed9bba2c28dfcd5915c6c | |
parent | f36762abecde31a0b2f6c74d43897d7a224c701a [diff] [blame] |
Fix build after rustc roll: `locale_resources` and `tcx.type_of`. There are 2 separate resons why build fails before this CL: * Adding `locale_resources` field to `Config` (see [here](https://github.com/rust-lang/rust/commit/d822b97a27e5) and [here](https://github.com/rust-lang/rust/commit/c183110cc26a)) * Changing the result of `tcx.type_of(...)` calls (see [here](https://github.com/rust-lang/rust/commit/d1fcf611175e)) PiperOrigin-RevId: 513864097
diff --git a/cc_bindings_from_rs/bindings.rs b/cc_bindings_from_rs/bindings.rs index 7754ec6..98b7dab 100644 --- a/cc_bindings_from_rs/bindings.rs +++ b/cc_bindings_from_rs/bindings.rs
@@ -838,7 +838,7 @@ // // TODO(b/259724276): This function's results should be memoized. fn format_adt_core(tcx: TyCtxt, def_id: DefId) -> Result<AdtCoreBindings> { - let ty = tcx.type_of(def_id); + let ty = tcx.type_of(def_id).subst_identity(); assert!(ty.is_adt()); assert!(is_directly_public(tcx, def_id), "Caller should verify");