Skip to content

Commit f4b2f68

Browse files
committed
Auto merge of #146285 - matthiaskrgr:rollup-oaokoo3, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #146200 (Simplify rustdoc-gui tester by calling directly browser-ui-test) - #146236 (gpu offload: change suspicious map into filter) - #146240 (DynamicConfig: use canonical clone impl) - #146251 (rustc_middle: clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 76863e3 + 0194860 commit f4b2f68

File tree

12 files changed

+55
-890
lines changed

12 files changed

+55
-890
lines changed

compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fn gen_define_handling<'ll>(
193193
// reference) types.
194194
let num_ptr_types = types
195195
.iter()
196-
.map(|&x| matches!(cx.type_kind(x), rustc_codegen_ssa::common::TypeKind::Pointer))
196+
.filter(|&x| matches!(cx.type_kind(x), rustc_codegen_ssa::common::TypeKind::Pointer))
197197
.count();
198198

199199
// We do not know their size anymore at this level, so hardcode a placeholder.

compiler/rustc_middle/src/mir/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ impl<'tcx> Display for Const<'tcx> {
579579
}
580580

581581
///////////////////////////////////////////////////////////////////////////
582-
/// Const-related utilities
582+
// Const-related utilities
583583

584584
impl<'tcx> TyCtxt<'tcx> {
585585
pub fn span_as_caller_location(self, span: Span) -> ConstValue {

compiler/rustc_middle/src/mir/statement.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,14 @@ impl<'tcx> Place<'tcx> {
408408
self.as_ref().project_deeper(more_projections, tcx)
409409
}
410410

411-
pub fn ty_from<D: ?Sized>(
411+
pub fn ty_from<D>(
412412
local: Local,
413413
projection: &[PlaceElem<'tcx>],
414414
local_decls: &D,
415415
tcx: TyCtxt<'tcx>,
416416
) -> PlaceTy<'tcx>
417417
where
418-
D: HasLocalDecls<'tcx>,
418+
D: ?Sized + HasLocalDecls<'tcx>,
419419
{
420420
PlaceTy::from_ty(local_decls.local_decls()[local].ty).multi_projection_ty(tcx, projection)
421421
}
@@ -529,9 +529,9 @@ impl<'tcx> PlaceRef<'tcx> {
529529
Place { local: self.local, projection: tcx.mk_place_elems(new_projections) }
530530
}
531531

532-
pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> PlaceTy<'tcx>
532+
pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> PlaceTy<'tcx>
533533
where
534-
D: HasLocalDecls<'tcx>,
534+
D: ?Sized + HasLocalDecls<'tcx>,
535535
{
536536
Place::ty_from(self.local, self.projection, local_decls, tcx)
537537
}
@@ -630,19 +630,19 @@ impl<'tcx> Operand<'tcx> {
630630
if let ty::FnDef(def_id, args) = *const_ty.kind() { Some((def_id, args)) } else { None }
631631
}
632632

633-
pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
633+
pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
634634
where
635-
D: HasLocalDecls<'tcx>,
635+
D: ?Sized + HasLocalDecls<'tcx>,
636636
{
637637
match self {
638638
&Operand::Copy(ref l) | &Operand::Move(ref l) => l.ty(local_decls, tcx).ty,
639639
Operand::Constant(c) => c.const_.ty(),
640640
}
641641
}
642642

643-
pub fn span<D: ?Sized>(&self, local_decls: &D) -> Span
643+
pub fn span<D>(&self, local_decls: &D) -> Span
644644
where
645-
D: HasLocalDecls<'tcx>,
645+
D: ?Sized + HasLocalDecls<'tcx>,
646646
{
647647
match self {
648648
&Operand::Copy(ref l) | &Operand::Move(ref l) => {
@@ -674,7 +674,7 @@ impl<'tcx> ConstOperand<'tcx> {
674674
}
675675

676676
///////////////////////////////////////////////////////////////////////////
677-
/// Rvalues
677+
// Rvalues
678678

679679
pub enum RvalueInitializationState {
680680
Shallow,
@@ -721,9 +721,9 @@ impl<'tcx> Rvalue<'tcx> {
721721
}
722722
}
723723

724-
pub fn ty<D: ?Sized>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
724+
pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
725725
where
726-
D: HasLocalDecls<'tcx>,
726+
D: ?Sized + HasLocalDecls<'tcx>,
727727
{
728728
match *self {
729729
Rvalue::Use(ref operand) => operand.ty(local_decls, tcx),

compiler/rustc_middle/src/ty/codec.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,7 @@ impl<'tcx, E: TyEncoder<'tcx>> Encodable<E> for ty::ParamEnv<'tcx> {
216216
#[inline]
217217
fn decode_arena_allocable<'tcx, D: TyDecoder<'tcx>, T: ArenaAllocatable<'tcx> + Decodable<D>>(
218218
decoder: &mut D,
219-
) -> &'tcx T
220-
where
221-
D: TyDecoder<'tcx>,
222-
{
219+
) -> &'tcx T {
223220
decoder.interner().arena.alloc(Decodable::decode(decoder))
224221
}
225222

@@ -230,10 +227,7 @@ fn decode_arena_allocable_slice<
230227
T: ArenaAllocatable<'tcx> + Decodable<D>,
231228
>(
232229
decoder: &mut D,
233-
) -> &'tcx [T]
234-
where
235-
D: TyDecoder<'tcx>,
236-
{
230+
) -> &'tcx [T] {
237231
decoder.interner().arena.alloc_from_iter(<Vec<T> as Decodable<D>>::decode(decoder))
238232
}
239233

compiler/rustc_query_impl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'tcx, C: QueryCache, const ANON: bool, const DEPTH_LIMIT: bool, const FEEDA
5858
for DynamicConfig<'tcx, C, ANON, DEPTH_LIMIT, FEEDABLE>
5959
{
6060
fn clone(&self) -> Self {
61-
DynamicConfig { dynamic: self.dynamic }
61+
*self
6262
}
6363
}
6464

0 commit comments

Comments
 (0)