Skip to content

Commit f840216

Browse files
committed
Auto merge of #91996 - matthiaskrgr:rollup-8pdt8x7, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #91901 (Remove `in_band_lifetimes` from `rustc_symbol_mangling`) - #91904 (Remove `in_band_lifetimes` from `rustc_trait_selection`) - #91951 (update stdarch) - #91958 (Apply rust-logo class only on default logo) - #91972 (link to pref_align_of tracking issue) - #91986 (Bump compiler-builtins to 0.1.66) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents a090c86 + 7391962 commit f840216

File tree

29 files changed

+110
-91
lines changed

29 files changed

+110
-91
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,9 +680,9 @@ dependencies = [
680680

681681
[[package]]
682682
name = "compiler_builtins"
683-
version = "0.1.65"
683+
version = "0.1.66"
684684
source = "registry+https://github.com/rust-lang/crates.io-index"
685-
checksum = "ed37ea958309f2451e1cea7fd2b37aa56b1894c9a9fbdbbe6a194f7b78f0362d"
685+
checksum = "191424db7756bbed2c4996959a0fbda94388abcf4f5a2728a8af17481ad9c4f7"
686686
dependencies = [
687687
"cc",
688688
"rustc-std-workspace-core",

compiler/rustc_symbol_mangling/src/legacy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use tracing::debug;
1313
use std::fmt::{self, Write};
1414
use std::mem::{self, discriminant};
1515

16-
pub(super) fn mangle(
16+
pub(super) fn mangle<'tcx>(
1717
tcx: TyCtxt<'tcx>,
1818
instance: Instance<'tcx>,
1919
instantiating_crate: Option<CrateNum>,
@@ -199,7 +199,7 @@ struct SymbolPrinter<'tcx> {
199199
// `PrettyPrinter` aka pretty printing of e.g. types in paths,
200200
// symbol names should have their own printing machinery.
201201

202-
impl Printer<'tcx> for &mut SymbolPrinter<'tcx> {
202+
impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> {
203203
type Error = fmt::Error;
204204

205205
type Path = Self;
@@ -345,7 +345,7 @@ impl Printer<'tcx> for &mut SymbolPrinter<'tcx> {
345345
}
346346
}
347347

348-
impl PrettyPrinter<'tcx> for &mut SymbolPrinter<'tcx> {
348+
impl<'tcx> PrettyPrinter<'tcx> for &mut SymbolPrinter<'tcx> {
349349
fn region_should_not_be_omitted(&self, _region: ty::Region<'_>) -> bool {
350350
false
351351
}

compiler/rustc_symbol_mangling/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
9191
#![feature(never_type)]
9292
#![feature(nll)]
93-
#![feature(in_band_lifetimes)]
9493
#![recursion_limit = "256"]
9594

9695
#[macro_use]
@@ -116,7 +115,7 @@ pub mod test;
116115
/// This function computes the symbol name for the given `instance` and the
117116
/// given instantiating crate. That is, if you know that instance X is
118117
/// instantiated in crate Y, this is the symbol name this instance would have.
119-
pub fn symbol_name_for_instance_in_crate(
118+
pub fn symbol_name_for_instance_in_crate<'tcx>(
120119
tcx: TyCtxt<'tcx>,
121120
instance: Instance<'tcx>,
122121
instantiating_crate: CrateNum,
@@ -131,7 +130,7 @@ pub fn provide(providers: &mut Providers) {
131130
// The `symbol_name` query provides the symbol name for calling a given
132131
// instance from the local crate. In particular, it will also look up the
133132
// correct symbol name of instances from upstream crates.
134-
fn symbol_name_provider(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> ty::SymbolName<'tcx> {
133+
fn symbol_name_provider<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> ty::SymbolName<'tcx> {
135134
let symbol_name = compute_symbol_name(tcx, instance, || {
136135
// This closure determines the instantiating crate for instances that
137136
// need an instantiating-crate-suffix for their symbol name, in order
@@ -151,14 +150,14 @@ fn symbol_name_provider(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> ty::Symb
151150
}
152151

153152
/// This function computes the typeid for the given function ABI.
154-
pub fn typeid_for_fnabi(tcx: TyCtxt<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>) -> String {
153+
pub fn typeid_for_fnabi<'tcx>(tcx: TyCtxt<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>) -> String {
155154
v0::mangle_typeid_for_fnabi(tcx, fn_abi)
156155
}
157156

158157
/// Computes the symbol name for the given instance. This function will call
159158
/// `compute_instantiating_crate` if it needs to factor the instantiating crate
160159
/// into the symbol name.
161-
fn compute_symbol_name(
160+
fn compute_symbol_name<'tcx>(
162161
tcx: TyCtxt<'tcx>,
163162
instance: Instance<'tcx>,
164163
compute_instantiating_crate: impl FnOnce() -> CrateNum,

compiler/rustc_symbol_mangling/src/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct SymbolNamesTest<'tcx> {
3131
tcx: TyCtxt<'tcx>,
3232
}
3333

34-
impl SymbolNamesTest<'tcx> {
34+
impl SymbolNamesTest<'_> {
3535
fn process_attrs(&mut self, def_id: LocalDefId) {
3636
let tcx = self.tcx;
3737
for attr in tcx.get_attrs(def_id.to_def_id()).iter() {
@@ -59,7 +59,7 @@ impl SymbolNamesTest<'tcx> {
5959
}
6060
}
6161

62-
impl hir::itemlikevisit::ItemLikeVisitor<'tcx> for SymbolNamesTest<'tcx> {
62+
impl<'tcx> hir::itemlikevisit::ItemLikeVisitor<'tcx> for SymbolNamesTest<'tcx> {
6363
fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {
6464
self.process_attrs(item.def_id);
6565
}

compiler/rustc_symbol_mangling/src/v0.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::fmt::Write;
1717
use std::iter;
1818
use std::ops::Range;
1919

20-
pub(super) fn mangle(
20+
pub(super) fn mangle<'tcx>(
2121
tcx: TyCtxt<'tcx>,
2222
instance: Instance<'tcx>,
2323
instantiating_crate: Option<CrateNum>,
@@ -56,7 +56,7 @@ pub(super) fn mangle(
5656
std::mem::take(&mut cx.out)
5757
}
5858

59-
pub(super) fn mangle_typeid_for_fnabi(
59+
pub(super) fn mangle_typeid_for_fnabi<'tcx>(
6060
_tcx: TyCtxt<'tcx>,
6161
fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
6262
) -> String {
@@ -118,7 +118,7 @@ struct SymbolMangler<'tcx> {
118118
consts: FxHashMap<&'tcx ty::Const<'tcx>, usize>,
119119
}
120120

121-
impl SymbolMangler<'tcx> {
121+
impl<'tcx> SymbolMangler<'tcx> {
122122
fn push(&mut self, s: &str) {
123123
self.out.push_str(s);
124124
}
@@ -250,7 +250,7 @@ impl SymbolMangler<'tcx> {
250250
}
251251
}
252252

253-
impl Printer<'tcx> for &mut SymbolMangler<'tcx> {
253+
impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
254254
type Error = !;
255255

256256
type Path = Self;

compiler/rustc_trait_selection/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![feature(drain_filter)]
1717
#![feature(derive_default_enum)]
1818
#![feature(hash_drain_filter)]
19-
#![feature(in_band_lifetimes)]
2019
#![feature(let_else)]
2120
#![feature(never_type)]
2221
#![feature(crate_visibility_modifier)]

compiler/rustc_trait_selection/src/opaque_types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct ReverseMapper<'tcx> {
9797
span: Span,
9898
}
9999

100-
impl ReverseMapper<'tcx> {
100+
impl<'tcx> ReverseMapper<'tcx> {
101101
fn new(
102102
tcx: TyCtxt<'tcx>,
103103
tainted_by_errors: bool,
@@ -134,7 +134,7 @@ impl ReverseMapper<'tcx> {
134134
}
135135
}
136136

137-
impl TypeFolder<'tcx> for ReverseMapper<'tcx> {
137+
impl<'tcx> TypeFolder<'tcx> for ReverseMapper<'tcx> {
138138
fn tcx(&self) -> TyCtxt<'tcx> {
139139
self.tcx
140140
}
@@ -338,7 +338,7 @@ impl TypeFolder<'tcx> for ReverseMapper<'tcx> {
338338
/// Requires that trait definitions have been processed so that we can
339339
/// elaborate predicates and walk supertraits.
340340
#[instrument(skip(tcx, predicates), level = "debug")]
341-
crate fn required_region_bounds(
341+
crate fn required_region_bounds<'tcx>(
342342
tcx: TyCtxt<'tcx>,
343343
erased_self_ty: Ty<'tcx>,
344344
predicates: impl Iterator<Item = ty::Predicate<'tcx>>,

compiler/rustc_trait_selection/src/traits/auto_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
219219
}
220220
}
221221

222-
impl AutoTraitFinder<'tcx> {
222+
impl<'tcx> AutoTraitFinder<'tcx> {
223223
/// The core logic responsible for computing the bounds for our synthesized impl.
224224
///
225225
/// To calculate the bounds, we call `SelectionContext.select` in a loop. Like

compiler/rustc_trait_selection/src/traits/chalk_fulfill.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct FulfillmentContext<'tcx> {
1616
relationships: FxHashMap<ty::TyVid, ty::FoundRelationships>,
1717
}
1818

19-
impl FulfillmentContext<'tcx> {
19+
impl FulfillmentContext<'_> {
2020
crate fn new() -> Self {
2121
FulfillmentContext {
2222
obligations: FxIndexSet::default(),
@@ -25,7 +25,7 @@ impl FulfillmentContext<'tcx> {
2525
}
2626
}
2727

28-
impl TraitEngine<'tcx> for FulfillmentContext<'tcx> {
28+
impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
2929
fn normalize_projection_type(
3030
&mut self,
3131
infcx: &InferCtxt<'_, 'tcx>,

compiler/rustc_trait_selection/src/traits/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn codegen_fulfill_obligation<'tcx>(
107107
/// type inference variables that appear in `result` to be
108108
/// unified, and hence we need to process those obligations to get
109109
/// the complete picture of the type.
110-
fn drain_fulfillment_cx_or_panic<T>(
110+
fn drain_fulfillment_cx_or_panic<'tcx, T>(
111111
infcx: &InferCtxt<'_, 'tcx>,
112112
fulfill_cx: &mut FulfillmentContext<'tcx>,
113113
result: T,

0 commit comments

Comments
 (0)