mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
rustc: remove leftover lifetimes with no bounds from where clauses.
This commit is contained in:
@@ -207,8 +207,6 @@ impl DepNode {
|
||||
pub fn new<'a, 'tcx>(tcx: TyCtxt<'tcx>,
|
||||
dep: DepConstructor<'tcx>)
|
||||
-> DepNode
|
||||
where 'tcx,
|
||||
'tcx
|
||||
{
|
||||
match dep {
|
||||
$(
|
||||
|
||||
@@ -48,7 +48,6 @@ pub fn super_lattice_tys<'a, 'tcx, L>(
|
||||
) -> RelateResult<'tcx, Ty<'tcx>>
|
||||
where
|
||||
L: LatticeDir<'a, 'tcx>,
|
||||
'tcx,
|
||||
{
|
||||
debug!("{}.lattice_tys({:?}, {:?})",
|
||||
this.tag(),
|
||||
|
||||
@@ -697,7 +697,6 @@ fn evaluate_predicates_recursively<'a, 'o, I>(
|
||||
) -> Result<EvaluationResult, OverflowError>
|
||||
where
|
||||
I: IntoIterator<Item = PredicateObligation<'tcx>>,
|
||||
'tcx,
|
||||
{
|
||||
let mut result = EvaluatedToOk;
|
||||
for obligation in predicates {
|
||||
|
||||
@@ -511,7 +511,6 @@ fn decode_tagged<'a, 'tcx, D, T, V>(decoder: &mut D,
|
||||
where T: Decodable + Eq + ::std::fmt::Debug,
|
||||
V: Decodable,
|
||||
D: DecoderWithPosition,
|
||||
'tcx,
|
||||
{
|
||||
let start_pos = decoder.position();
|
||||
|
||||
|
||||
@@ -1088,7 +1088,7 @@ fn suggest_changing_assoc_types(ty: &hir::Ty, err: &mut DiagnosticBuilder<'_>) {
|
||||
|
||||
// We use a HIR visitor to walk the type.
|
||||
use rustc::hir::intravisit::{self, Visitor};
|
||||
struct WalkAssocTypes<'a, 'db> where 'db {
|
||||
struct WalkAssocTypes<'a, 'db> {
|
||||
err: &'a mut DiagnosticBuilder<'db>
|
||||
}
|
||||
impl<'a, 'db, 'v> Visitor<'v> for WalkAssocTypes<'a, 'db> {
|
||||
|
||||
@@ -293,10 +293,7 @@ fn load_proc_macro<'b> (
|
||||
&mut self,
|
||||
locate_ctxt: &mut locator::Context<'b>,
|
||||
path_kind: PathKind,
|
||||
) -> Option<(LoadResult, Option<Library>)>
|
||||
where
|
||||
'a
|
||||
{
|
||||
) -> Option<(LoadResult, Option<Library>)> {
|
||||
// Use a new locator Context so trying to load a proc macro doesn't affect the error
|
||||
// message we emit
|
||||
let mut proc_macro_locator = locate_ctxt.clone();
|
||||
|
||||
@@ -1693,7 +1693,7 @@ fn check_if_path_or_subpath_is_moved(
|
||||
fn move_path_closest_to<'a>(
|
||||
&mut self,
|
||||
place: &'a Place<'tcx>,
|
||||
) -> Result<(&'a Place<'tcx>, MovePathIndex), NoMovePathFound> where 'cx {
|
||||
) -> Result<(&'a Place<'tcx>, MovePathIndex), NoMovePathFound> {
|
||||
let mut last_prefix = place;
|
||||
for prefix in self.prefixes(place, PrefixSet::All) {
|
||||
if let Some(mpi) = self.move_path_for_place(prefix) {
|
||||
|
||||
@@ -58,12 +58,7 @@ pub(super) fn trace(
|
||||
}
|
||||
|
||||
/// Contextual state for the type-liveness generator.
|
||||
struct LivenessContext<'me, 'typeck, 'flow, 'tcx>
|
||||
where
|
||||
'typeck,
|
||||
'flow,
|
||||
'tcx,
|
||||
{
|
||||
struct LivenessContext<'me, 'typeck, 'flow, 'tcx> {
|
||||
/// Current type-checker, giving us our inference context etc.
|
||||
typeck: &'me mut TypeChecker<'typeck, 'tcx>,
|
||||
|
||||
@@ -96,12 +91,7 @@ struct DropData<'tcx> {
|
||||
region_constraint_data: Option<Rc<Vec<QueryRegionConstraint<'tcx>>>>,
|
||||
}
|
||||
|
||||
struct LivenessResults<'me, 'typeck, 'flow, 'tcx>
|
||||
where
|
||||
'typeck,
|
||||
'flow,
|
||||
'tcx,
|
||||
{
|
||||
struct LivenessResults<'me, 'typeck, 'flow, 'tcx> {
|
||||
cx: LivenessContext<'me, 'typeck, 'flow, 'tcx>,
|
||||
|
||||
/// Set of points that define the current local.
|
||||
|
||||
@@ -1691,7 +1691,7 @@ fn bind_matched_candidate_for_arm_body<'b>(
|
||||
&mut self,
|
||||
block: BasicBlock,
|
||||
bindings: impl IntoIterator<Item = &'b Binding<'tcx>>,
|
||||
) where 'tcx {
|
||||
) {
|
||||
debug!("bind_matched_candidate_for_arm_body(block={:?})", block);
|
||||
|
||||
let re_erased = self.hir.tcx().lifetimes.re_erased;
|
||||
|
||||
@@ -392,9 +392,7 @@ fn is_uninhabited(&self, ty: Ty<'tcx>) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
fn is_non_exhaustive_variant<'p>(&self, pattern: &'p Pattern<'tcx>) -> bool
|
||||
where 'a
|
||||
{
|
||||
fn is_non_exhaustive_variant<'p>(&self, pattern: &'p Pattern<'tcx>) -> bool {
|
||||
match *pattern.kind {
|
||||
PatternKind::Variant { adt_def, variant_index, .. } => {
|
||||
let ref variant = adt_def.variants[variant_index];
|
||||
|
||||
@@ -769,7 +769,6 @@ fn numbered_codegen_unit_name(
|
||||
fn debug_dump<'a, 'b, 'tcx, I>(tcx: TyCtxt<'tcx>, label: &str, cgus: I)
|
||||
where
|
||||
I: Iterator<Item = &'b CodegenUnit<'tcx>>,
|
||||
'tcx,
|
||||
{
|
||||
if cfg!(debug_assertions) {
|
||||
debug!("{}", label);
|
||||
|
||||
Reference in New Issue
Block a user