diff options
author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-04-16 14:01:43 +1000 |
---|---|---|
committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-04-16 14:19:50 +1000 |
commit | d2b5a64579aace20b1288f346787d0feb76e3742 (patch) | |
tree | e9f44d84f491d2a65d1f60fd1041b5ed6159420e /compiler/rustc_middle/src/ty | |
parent | 32f6e7a38ebc635493f83054f7826140798a1c6c (diff) | |
download | rust-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.rs | 9 | ||||
-rw-r--r-- | compiler/rustc_middle/src/ty/structural_impls.rs | 4 |
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>, } /////////////////////////////////////////////////////////////////////////// |