Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9cf10bc

Browse files
committed
Auto merge of rust-lang#124271 - GuillaumeGomez:rollup-7st9wd7, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - rust-lang#115913 (checked_ilog: improve performance) - rust-lang#124178 ([cleanup] [llvm backend] Prevent creating the same `Instance::mono` multiple times) - rust-lang#124183 (Stop taking `ParamTy`/`ParamConst`/`EarlyParamRegion`/`AliasTy` by ref) - rust-lang#124217 (coverage: Prepare for improved branch coverage) - rust-lang#124230 (Stabilize generic `NonZero`.) - rust-lang#124252 (Improve ICE message for forbidden dep-graph reads.) - rust-lang#124268 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 25087e0 + 000d0f9 commit 9cf10bc

File tree

116 files changed

+1241
-278
lines changed

Some content is hidden

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

116 files changed

+1241
-278
lines changed

compiler/rustc_attr/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![allow(internal_features)]
88
#![feature(rustdoc_internals)]
99
#![doc(rust_logo)]
10-
#![feature(generic_nonzero)]
1110
#![feature(let_chains)]
1211

1312
#[macro_use]

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
13201320
.into_iter()
13211321
.map(|err| match err.obligation.predicate.kind().skip_binder() {
13221322
PredicateKind::Clause(ty::ClauseKind::Trait(predicate)) => {
1323-
match predicate.self_ty().kind() {
1323+
match *predicate.self_ty().kind() {
13241324
ty::Param(param_ty) => Ok((
13251325
generics.type_param(param_ty, tcx),
13261326
predicate.trait_ref.print_only_trait_path().to_string(),

compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
10701070
// LL | blk();
10711071
// | ----- this value implements `FnOnce`, which causes it to be moved when called
10721072
// ```
1073-
if let ty::Param(param_ty) = self_ty.kind()
1073+
if let ty::Param(param_ty) = *self_ty.kind()
10741074
&& let generics = self.infcx.tcx.generics_of(self.mir_def_id())
10751075
&& let param = generics.type_param(param_ty, self.infcx.tcx)
10761076
&& let Some(hir_generics) = self

compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ impl<'ll> CodegenCx<'ll, '_> {
260260

261261
#[instrument(level = "debug", skip(self, llty))]
262262
pub(crate) fn get_static_inner(&self, def_id: DefId, llty: &'ll Type) -> &'ll Value {
263-
if let Some(&g) = self.instances.borrow().get(&Instance::mono(self.tcx, def_id)) {
263+
let instance = Instance::mono(self.tcx, def_id);
264+
if let Some(&g) = self.instances.borrow().get(&instance) {
264265
trace!("used cached value");
265266
return g;
266267
}
@@ -273,7 +274,7 @@ impl<'ll> CodegenCx<'ll, '_> {
273274
statics defined in the same CGU, but did not for `{def_id:?}`"
274275
);
275276

276-
let sym = self.tcx.symbol_name(Instance::mono(self.tcx, def_id)).name;
277+
let sym = self.tcx.symbol_name(instance).name;
277278
let fn_attrs = self.tcx.codegen_fn_attrs(def_id);
278279

279280
debug!(?sym, ?fn_attrs);
@@ -363,7 +364,7 @@ impl<'ll> CodegenCx<'ll, '_> {
363364
}
364365
}
365366

366-
self.instances.borrow_mut().insert(Instance::mono(self.tcx, def_id), g);
367+
self.instances.borrow_mut().insert(instance, g);
367368
g
368369
}
369370

compiler/rustc_const_eval/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Rust MIR: a lowered representation of Rust.
1111
#![feature(assert_matches)]
1212
#![feature(box_patterns)]
1313
#![feature(decl_macro)]
14-
#![feature(generic_nonzero)]
1514
#![feature(let_chains)]
1615
#![feature(slice_ptr_get)]
1716
#![feature(strict_provenance)]

compiler/rustc_data_structures/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#![feature(cfg_match)]
2121
#![feature(core_intrinsics)]
2222
#![feature(extend_one)]
23-
#![feature(generic_nonzero)]
2423
#![feature(hash_raw_entry)]
2524
#![feature(hasher_prefixfree_extras)]
2625
#![feature(lazy_cell)]

compiler/rustc_errors/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![feature(box_patterns)]
1616
#![feature(error_reporter)]
1717
#![feature(extract_if)]
18-
#![feature(generic_nonzero)]
1918
#![feature(let_chains)]
2019
#![feature(negative_impls)]
2120
#![feature(never_type)]

compiler/rustc_feature/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
//! symbol to the `accepted` or `removed` modules respectively.
1313
1414
#![allow(internal_features)]
15-
#![feature(generic_nonzero)]
1615
#![feature(rustdoc_internals)]
1716
#![doc(rust_logo)]
1817
#![feature(lazy_cell)]

compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ This API is completely unstable and subject to change.
6363
#![feature(rustdoc_internals)]
6464
#![allow(internal_features)]
6565
#![feature(control_flow_enum)]
66-
#![feature(generic_nonzero)]
6766
#![feature(if_let_guard)]
6867
#![feature(is_sorted)]
6968
#![feature(iter_intersperse)]

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
26972697

26982698
fn point_at_param_definition(&self, err: &mut Diag<'_>, param: ty::ParamTy) {
26992699
let generics = self.tcx.generics_of(self.body_id);
2700-
let generic_param = generics.type_param(&param, self.tcx);
2700+
let generic_param = generics.type_param(param, self.tcx);
27012701
if let ty::GenericParamDefKind::Type { synthetic: true, .. } = generic_param.kind {
27022702
return;
27032703
}

0 commit comments

Comments
 (0)