Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {

assert_eq!(tcx.trait_impl_of_assoc(def_id), None);
self.prove_clauses(
args.terms().map(|t| ty::ClauseKind::WellFormed(t.into())),
args.terms().map(|t| ty::ClauseKind::WellFormed(t)),
locations,
ConstraintCategory::Boring,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
_ => return interp_ok(false),
}

trace!("{:?}", self.dump_place(&dest.clone().into()));
trace!("{:?}", self.dump_place(&dest));
self.return_to_block(ret)?;
interp_ok(true)
}
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_middle/src/ptrauth/discriminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ fn compute_fn_ptr_type_discriminator<'tcx>(

enc.push(b'E');

let hash = enc.finish();

hash.into()
enc.finish()
}

// Clang disc type.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2322,7 +2322,7 @@ impl<'a> Parser<'a> {
Applicability::MaybeIncorrect,
);
}
Err(err.into())
Err(err)
}

/// Handle encountering a symbol in a generic argument list that is not a `,` or `>`. In this
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_privacy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,7 @@ impl<'tcx> EmbargoVisitor<'tcx> {
max_vis: Option<ty::Visibility>,
level: Level,
) -> bool {
let private_vis =
ty::Visibility::Restricted(self.tcx.parent_module_from_def_id(def_id).into());
let private_vis = ty::Visibility::Restricted(self.tcx.parent_module_from_def_id(def_id));
if max_vis != Some(private_vis) {
return self.effective_visibilities.update(
def_id,
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1608,15 +1608,15 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
ValuePairs::TraitRefs(_) => (false, Mismatch::Fixed("trait")),
ValuePairs::Aliases(ExpectedFound { expected, .. }) => {
let def_id = match expected.kind {
ty::AliasTermKind::ProjectionTy { def_id } => def_id.into(),
ty::AliasTermKind::InherentTy { def_id } => def_id.into(),
ty::AliasTermKind::OpaqueTy { def_id } => def_id.into(),
ty::AliasTermKind::FreeTy { def_id } => def_id.into(),
ty::AliasTermKind::AnonConst { def_id } => def_id.into(),
ty::AliasTermKind::ProjectionConst { def_id } => def_id.into(),
ty::AliasTermKind::FreeConst { def_id } => def_id.into(),
ty::AliasTermKind::InherentConstSelf { def_id } => def_id.into(),
ty::AliasTermKind::InherentConstImpl { def_id } => def_id.into(),
ty::AliasTermKind::ProjectionTy { def_id }
| ty::AliasTermKind::InherentTy { def_id }
| ty::AliasTermKind::OpaqueTy { def_id }
| ty::AliasTermKind::FreeTy { def_id }
| ty::AliasTermKind::AnonConst { def_id }
| ty::AliasTermKind::ProjectionConst { def_id }
| ty::AliasTermKind::FreeConst { def_id }
| ty::AliasTermKind::InherentConstSelf { def_id }
| ty::AliasTermKind::InherentConstImpl { def_id } => def_id,
};
(false, Mismatch::Fixed(self.tcx.def_descr(def_id)))
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_traits/src/normalize_projection_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ fn normalize_canonicalized_inherent_projection<'tcx>(
let normalized_term = traits::normalize_inherent_projection(
selcx,
param_env,
goal.into(),
goal,
cause,
0,
&mut obligations,
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/raw_vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ impl<A: Allocator> RawVecInner<A> {
unsafe {
let alloc_size = elem_layout.size().unchecked_mul(self.cap.as_inner());
let layout = Layout::from_size_align_unchecked(alloc_size, elem_layout.align());
Some((self.ptr.into(), layout))
Some((self.ptr, layout))
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@ pub(crate) fn print_const(tcx: TyCtxt<'_>, n: ty::Const<'_>) -> String {
match n.kind() {
ty::ConstKind::Alias(_, ty::AliasConst { kind, .. }) => {
let def_id: DefId = match kind {
ty::AliasConstKind::Projection { def_id } => def_id.into(),
ty::AliasConstKind::InherentSelf { def_id } => def_id.into(),
ty::AliasConstKind::InherentImpl { def_id } => def_id.into(),
ty::AliasConstKind::Free { def_id } => def_id.into(),
ty::AliasConstKind::Anon { def_id } => def_id.into(),
ty::AliasConstKind::Projection { def_id }
| ty::AliasConstKind::InherentSelf { def_id }
| ty::AliasConstKind::InherentImpl { def_id }
| ty::AliasConstKind::Free { def_id }
| ty::AliasConstKind::Anon { def_id } => def_id,
};
if let Some(local_def_id) = def_id.as_local()
&& let Some(body_id) = tcx.hir_maybe_body_owned_by(local_def_id)
Expand Down
Loading