Skip to content

Commit 6c0c6d6

Browse files
committed
Auto merge of #106103 - matthiaskrgr:rollup-8xe9ddz, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #105970 (docs/test: add UI test and long-form error docs for E0462) - #105975 (rustc: Remove needless lifetimes) - #106069 (rustdoc: use a more evocative name for CSS/JS `#titles`) - #106084 (fix vec::IntoIter::drop on high-alignment ZST) - #106091 (Use correct CSS pseudo-element selector) - #106093 (rustdoc: remove no-op CSS from `.docblock-short`) - #106102 (Fix `triagebot.toml`) Failed merges: - #106028 (docs/test: add UI test and long-form error docs for `E0461`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2c3f284 + da4be75 commit 6c0c6d6

File tree

133 files changed

+426
-402
lines changed

Some content is hidden

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

133 files changed

+426
-402
lines changed

compiler/rustc_ast/src/util/comments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn beautify_doc_string(data: Symbol, kind: CommentKind) -> Symbol {
5151
if i != 0 || j != lines.len() { Some((i, j)) } else { None }
5252
}
5353

54-
fn get_horizontal_trim<'a>(lines: &'a [&str], kind: CommentKind) -> Option<String> {
54+
fn get_horizontal_trim(lines: &[&str], kind: CommentKind) -> Option<String> {
5555
let mut i = usize::MAX;
5656
let mut first = true;
5757

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ fn compute_hir_hash(
414414
})
415415
}
416416

417-
pub fn lower_to_hir<'hir>(tcx: TyCtxt<'hir>, (): ()) -> hir::Crate<'hir> {
417+
pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
418418
let sess = tcx.sess;
419419
let krate = tcx.untracked_crate.steal();
420420
let mut resolver = tcx.resolver_for_lowering(()).steal();

compiler/rustc_borrowck/src/consumers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ pub use super::{
2828
/// that shows how to do this at `src/test/run-make/obtain-borrowck/`.
2929
///
3030
/// * Polonius is highly unstable, so expect regular changes in its signature or other details.
31-
pub fn get_body_with_borrowck_facts<'tcx>(
32-
tcx: TyCtxt<'tcx>,
31+
pub fn get_body_with_borrowck_facts(
32+
tcx: TyCtxt<'_>,
3333
def: ty::WithOptConstParam<LocalDefId>,
34-
) -> BodyWithBorrowckFacts<'tcx> {
34+
) -> BodyWithBorrowckFacts<'_> {
3535
let (input_body, promoted) = tcx.mir_promoted(def);
3636
let infcx = tcx.infer_ctxt().with_opaque_type_inference(DefiningAnchor::Bind(def.did)).build();
3737
let input_body: &Body<'_> = &input_body.borrow();

compiler/rustc_borrowck/src/diagnostics/find_all_local_uses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::mir::{Body, Local, Location};
99
/// Find all uses of (including assignments to) a [`Local`].
1010
///
1111
/// Uses `BTreeSet` so output is deterministic.
12-
pub(super) fn find<'tcx>(body: &Body<'tcx>, local: Local) -> BTreeSet<Location> {
12+
pub(super) fn find(body: &Body<'_>, local: Local) -> BTreeSet<Location> {
1313
let mut visitor = AllLocalUsesVisitor { for_local: local, uses: BTreeSet::default() };
1414
visitor.visit_body(body);
1515
visitor.uses

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ pub fn provide(providers: &mut Providers) {
124124
};
125125
}
126126

127-
fn mir_borrowck<'tcx>(
128-
tcx: TyCtxt<'tcx>,
129-
def: ty::WithOptConstParam<LocalDefId>,
130-
) -> &'tcx BorrowCheckResult<'tcx> {
127+
fn mir_borrowck(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> &BorrowCheckResult<'_> {
131128
let (input_body, promoted) = tcx.mir_promoted(def);
132129
debug!("run query mir_borrowck: {}", tcx.def_path_str(def.did.to_def_id()));
133130

compiler/rustc_borrowck/src/type_check/free_region_relations.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl UniversalRegionRelations<'_> {
8585
/// outlives `fr` and (b) is not local.
8686
///
8787
/// (*) If there are multiple competing choices, we return all of them.
88-
pub(crate) fn non_local_upper_bounds<'a>(&'a self, fr: RegionVid) -> Vec<RegionVid> {
88+
pub(crate) fn non_local_upper_bounds(&self, fr: RegionVid) -> Vec<RegionVid> {
8989
debug!("non_local_upper_bound(fr={:?})", fr);
9090
let res = self.non_local_bounds(&self.inverse_outlives, fr);
9191
assert!(!res.is_empty(), "can't find an upper bound!?");
@@ -148,9 +148,9 @@ impl UniversalRegionRelations<'_> {
148148
/// Helper for `non_local_upper_bounds` and `non_local_lower_bounds`.
149149
/// Repeatedly invokes `postdom_parent` until we find something that is not
150150
/// local. Returns `None` if we never do so.
151-
fn non_local_bounds<'a>(
151+
fn non_local_bounds(
152152
&self,
153-
relation: &'a TransitiveRelation<RegionVid>,
153+
relation: &TransitiveRelation<RegionVid>,
154154
fr0: RegionVid,
155155
) -> Vec<RegionVid> {
156156
// This method assumes that `fr0` is one of the universally

compiler/rustc_builtin_macros/src/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ pub fn parse_asm_args<'a>(
352352
///
353353
/// This function must be called immediately after the option token is parsed.
354354
/// Otherwise, the suggestion will be incorrect.
355-
fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
355+
fn err_duplicate_option(p: &mut Parser<'_>, symbol: Symbol, span: Span) {
356356
let mut err = p
357357
.sess
358358
.span_diagnostic

compiler/rustc_codegen_gcc/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn linkage_to_gcc(linkage: Linkage) -> FunctionType {
5252
}
5353
}
5454

55-
pub fn compile_codegen_unit<'tcx>(tcx: TyCtxt<'tcx>, cgu_name: Symbol, supports_128bit_integers: bool) -> (ModuleCodegen<GccContext>, u64) {
55+
pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, supports_128bit_integers: bool) -> (ModuleCodegen<GccContext>, u64) {
5656
let prof_timer = tcx.prof.generic_activity("codegen_module");
5757
let start_time = Instant::now();
5858

compiler/rustc_codegen_gcc/src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn bytes_in_context<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, bytes: &[u8]) ->
4444
context.new_array_constructor(None, typ, &elements)
4545
}
4646

47-
pub fn type_is_pointer<'gcc>(typ: Type<'gcc>) -> bool {
47+
pub fn type_is_pointer(typ: Type<'_>) -> bool {
4848
typ.get_pointee().is_some()
4949
}
5050

compiler/rustc_codegen_gcc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl ExtraBackendMethods for GccCodegenBackend {
161161
mods
162162
}
163163

164-
fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: Symbol) -> (ModuleCodegen<Self::Module>, u64) {
164+
fn compile_codegen_unit(&self, tcx: TyCtxt<'_>, cgu_name: Symbol) -> (ModuleCodegen<Self::Module>, u64) {
165165
base::compile_codegen_unit(tcx, cgu_name, *self.supports_128bit_integers.lock().expect("lock"))
166166
}
167167

0 commit comments

Comments
 (0)