summaryrefslogtreecommitdiff
path: root/compiler/rustc_middle/src/ty
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-04-16 14:01:43 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-04-16 14:19:50 +1000
commitd2b5a64579aace20b1288f346787d0feb76e3742 (patch)
treee9f44d84f491d2a65d1f60fd1041b5ed6159420e /compiler/rustc_middle/src/ty
parent32f6e7a38ebc635493f83054f7826140798a1c6c (diff)
downloadrust-d2b5a64579aace20b1288f346787d0feb76e3742.tar.gz
Simplify `CloneLiftImpls` and `TrivialTypeTraversalImpls`.
They both allow for a lifetime other than `'tcx`, but this isn't needed.
Diffstat (limited to 'compiler/rustc_middle/src/ty')
-rw-r--r--compiler/rustc_middle/src/ty/context.rs9
-rw-r--r--compiler/rustc_middle/src/ty/structural_impls.rs4
2 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 63f7cc2ee73..e5356581e6e 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -1329,9 +1329,12 @@ nop_list_lift! {bound_variable_kinds; ty::BoundVariableKind => ty::BoundVariable
// This is the impl for `&'a InternalSubsts<'a>`.
nop_list_lift! {substs; GenericArg<'a> => GenericArg<'tcx>}
-CloneLiftImpls! { for<'tcx> {
- Constness, traits::WellFormedLoc, ImplPolarity, crate::mir::ReturnConstraint,
-} }
+CloneLiftImpls! {
+ Constness,
+ traits::WellFormedLoc,
+ ImplPolarity,
+ crate::mir::ReturnConstraint,
+}
macro_rules! sty_debug_print {
($fmt: expr, $ctxt: expr, $($variant: ident),*) => {{
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs
index 5c604bb6db2..59c05739b3c 100644
--- a/compiler/rustc_middle/src/ty/structural_impls.rs
+++ b/compiler/rustc_middle/src/ty/structural_impls.rs
@@ -276,9 +276,7 @@ TrivialTypeTraversalAndLiftImpls! {
}
TrivialTypeTraversalAndLiftImpls! {
- for<'tcx> {
- ty::ValTree<'tcx>,
- }
+ ty::ValTree<'tcx>,
}
///////////////////////////////////////////////////////////////////////////