Skip to content

Commit 41c3017

Browse files
committedDec 19, 2021
Auto merge of #92099 - matthiaskrgr:rollup-4gwv67m, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #91141 (Revert "Temporarily rename int_roundings functions to avoid conflicts") - #91984 (Remove `in_band_lifetimes` from `rustc_middle`) - #92028 (Sync portable-simd to fix libcore build for AVX-512 enabled targets) - #92042 (Enable `#[thread_local]` for all windows-msvc targets) - #92071 (Update example code for Vec::splice to change the length) - #92077 (rustdoc: Remove unused `collapsed` field) - #92081 (rustdoc: Remove unnecessary `need_backline` function) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents a41a692 + 3340666 commit 41c3017

Some content is hidden

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

77 files changed

+228
-277
lines changed
 

‎compiler/rustc_macros/src/type_foldable.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
use quote::quote;
2+
use syn::parse_quote;
23

34
pub fn type_foldable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
45
if let syn::Data::Union(_) = s.ast().data {
56
panic!("cannot derive on union")
67
}
78

9+
if !s.ast().generics.lifetimes().any(|lt| lt.lifetime.ident == "tcx") {
10+
s.add_impl_generic(parse_quote! { 'tcx });
11+
}
12+
813
s.add_bounds(synstructure::AddBounds::Generics);
914
let body_visit = s.each(|bind| {
1015
quote! {

‎compiler/rustc_middle/src/dep_graph/dep_node.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ crate fn make_compile_codegen_unit(tcx: TyCtxt<'_>, name: Symbol) -> DepNode {
201201

202202
// WARNING: `construct` is generic and does not know that `CompileMonoItem` takes `MonoItem`s as keys.
203203
// Be very careful changing this type signature!
204-
crate fn make_compile_mono_item(tcx: TyCtxt<'tcx>, mono_item: &MonoItem<'tcx>) -> DepNode {
204+
crate fn make_compile_mono_item<'tcx>(tcx: TyCtxt<'tcx>, mono_item: &MonoItem<'tcx>) -> DepNode {
205205
DepNode::construct(tcx, DepKind::CompileMonoItem, mono_item)
206206
}
207207

@@ -264,7 +264,7 @@ impl DepNodeExt for DepNode {
264264
/// DepNode. Condition (2) might not be fulfilled if a DepNode
265265
/// refers to something from the previous compilation session that
266266
/// has been removed.
267-
fn extract_def_id(&self, tcx: TyCtxt<'tcx>) -> Option<DefId> {
267+
fn extract_def_id<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<DefId> {
268268
if self.kind.fingerprint_style(tcx) == FingerprintStyle::DefPathHash {
269269
Some(tcx.def_path_hash_to_def_id(DefPathHash(self.hash.into())))
270270
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.