Skip to content
Permalink
Browse files

rustc: remove 'x: 'y bounds (except from comments/strings).

  • Loading branch information...
eddyb committed Jun 14, 2019
1 parent 44fb88d commit b25b466a887d8ceaef533e542431fdec7e70f10f
Showing with 305 additions and 305 deletions.
  1. +1 −1 src/librustc/cfg/construct.rs
  2. +1 −1 src/librustc/cfg/graphviz.rs
  3. +2 −2 src/librustc/dep_graph/dep_node.rs
  4. +1 −1 src/librustc/hir/intravisit.rs
  5. +4 −4 src/librustc/hir/lowering.rs
  6. +6 −6 src/librustc/hir/map/hir_id_validator.rs
  7. +2 −2 src/librustc/infer/at.rs
  8. +1 −1 src/librustc/infer/canonical/canonicalizer.rs
  9. +2 −2 src/librustc/infer/combine.rs
  10. +1 −1 src/librustc/infer/equate.rs
  11. +1 −1 src/librustc/infer/error_reporting/nice_region_error/mod.rs
  12. +1 −1 src/librustc/infer/freshen.rs
  13. +1 −1 src/librustc/infer/fudge.rs
  14. +1 −1 src/librustc/infer/glb.rs
  15. +2 −2 src/librustc/infer/lattice.rs
  16. +1 −1 src/librustc/infer/lexical_region_resolve/graphviz.rs
  17. +1 −1 src/librustc/infer/lexical_region_resolve/mod.rs
  18. +1 −1 src/librustc/infer/lub.rs
  19. +1 −1 src/librustc/infer/mod.rs
  20. +3 −3 src/librustc/infer/nll_relate/mod.rs
  21. +1 −1 src/librustc/infer/opaque_types/mod.rs
  22. +1 −1 src/librustc/infer/outlives/env.rs
  23. +1 −1 src/librustc/infer/outlives/obligations.rs
  24. +1 −1 src/librustc/infer/outlives/verify.rs
  25. +4 −4 src/librustc/infer/resolve.rs
  26. +1 −1 src/librustc/infer/sub.rs
  27. +2 −2 src/librustc/lint/context.rs
  28. +2 −2 src/librustc/middle/dead.rs
  29. +1 −1 src/librustc/middle/entry.rs
  30. +1 −1 src/librustc/middle/expr_use_visitor.rs
  31. +1 −1 src/librustc/middle/free_region.rs
  32. +2 −2 src/librustc/middle/liveness.rs
  33. +3 −3 src/librustc/middle/reachable.rs
  34. +2 −2 src/librustc/middle/resolve_lifetime.rs
  35. +4 −4 src/librustc/middle/stability.rs
  36. +1 −1 src/librustc/middle/weak_lang_items.rs
  37. +2 −2 src/librustc/mir/mod.rs
  38. +3 −3 src/librustc/mir/traversal.rs
  39. +1 −1 src/librustc/traits/error_reporting.rs
  40. +1 −1 src/librustc/traits/fulfill.rs
  41. +1 −1 src/librustc/traits/project.rs
  42. +1 −1 src/librustc/traits/query/normalize.rs
  43. +5 −5 src/librustc/traits/select.rs
  44. +1 −1 src/librustc/ty/query/on_disk_cache.rs
  45. +2 −2 src/librustc/ty/query/plumbing.rs
  46. +1 −1 src/librustc/ty/wf.rs
  47. +1 −1 src/librustc_borrowck/borrowck/check_loans.rs
  48. +3 −3 src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs
  49. +1 −1 src/librustc_borrowck/borrowck/gather_loans/lifetime.rs
  50. +1 −1 src/librustc_borrowck/borrowck/gather_loans/mod.rs
  51. +1 −1 src/librustc_borrowck/borrowck/gather_loans/restrictions.rs
  52. +1 −1 src/librustc_borrowck/borrowck/mod.rs
  53. +1 −1 src/librustc_borrowck/graphviz.rs
  54. +1 −1 src/librustc_codegen_llvm/builder.rs
  55. +1 −1 src/librustc_codegen_llvm/context.rs
  56. +1 −1 src/librustc_codegen_llvm/lib.rs
  57. +5 −5 src/librustc_codegen_ssa/README.md
  58. +12 −12 src/librustc_codegen_ssa/base.rs
  59. +4 −4 src/librustc_codegen_ssa/common.rs
  60. +1 −1 src/librustc_codegen_ssa/glue.rs
  61. +1 −1 src/librustc_codegen_ssa/meth.rs
  62. +3 −3 src/librustc_codegen_ssa/mir/analyze.rs
  63. +2 −2 src/librustc_codegen_ssa/mir/block.rs
  64. +1 −1 src/librustc_codegen_ssa/mir/constant.rs
  65. +6 −6 src/librustc_codegen_ssa/mir/mod.rs
  66. +3 −3 src/librustc_codegen_ssa/mir/operand.rs
  67. +3 −3 src/librustc_codegen_ssa/mir/place.rs
  68. +4 −4 src/librustc_codegen_ssa/mir/rvalue.rs
  69. +1 −1 src/librustc_codegen_ssa/mir/statement.rs
  70. +2 −2 src/librustc_codegen_ssa/mono_item.rs
  71. +1 −1 src/librustc_codegen_ssa/traits/backend.rs
  72. +1 −1 src/librustc_codegen_ssa/traits/builder.rs
  73. +1 −1 src/librustc_driver/pretty.rs
  74. +1 −1 src/librustc_lint/builtin.rs
  75. +1 −1 src/librustc_lint/types.rs
  76. +1 −1 src/librustc_metadata/creader.rs
  77. +3 −3 src/librustc_metadata/decoder.rs
  78. +1 −1 src/librustc_mir/borrow_check/borrow_set.rs
  79. +1 −1 src/librustc_mir/borrow_check/flows.rs
  80. +3 −3 src/librustc_mir/borrow_check/mod.rs
  81. +1 −1 src/librustc_mir/borrow_check/nll/constraint_generation.rs
  82. +2 −2 src/librustc_mir/borrow_check/nll/explain_borrow/find_use.rs
  83. +1 −1 src/librustc_mir/borrow_check/nll/invalidation.rs
  84. +2 −2 src/librustc_mir/borrow_check/nll/region_infer/graphviz.rs
  85. +1 −1 src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs
  86. +1 −1 src/librustc_mir/borrow_check/nll/type_check/free_region_relations.rs
  87. +6 −6 src/librustc_mir/borrow_check/nll/type_check/liveness/trace.rs
  88. +3 −3 src/librustc_mir/borrow_check/nll/type_check/mod.rs
  89. +1 −1 src/librustc_mir/borrow_check/nll/type_check/relate_tys.rs
  90. +1 −1 src/librustc_mir/borrow_check/nll/universal_regions.rs
  91. +1 −1 src/librustc_mir/borrow_check/prefixes.rs
  92. +1 −1 src/librustc_mir/borrow_check/used_muts.rs
  93. +3 −3 src/librustc_mir/build/matches/mod.rs
  94. +1 −1 src/librustc_mir/build/mod.rs
  95. +3 −3 src/librustc_mir/dataflow/impls/borrowed_locals.rs
  96. +1 −1 src/librustc_mir/dataflow/impls/borrows.rs
  97. +7 −7 src/librustc_mir/dataflow/impls/mod.rs
  98. +2 −2 src/librustc_mir/dataflow/impls/storage_liveness.rs
  99. +11 −11 src/librustc_mir/dataflow/mod.rs
  100. +2 −2 src/librustc_mir/dataflow/move_paths/builder.rs
  101. +1 −1 src/librustc_mir/hair/cx/mod.rs
  102. +6 −6 src/librustc_mir/hair/cx/to_ref.rs
  103. +13 −13 src/librustc_mir/hair/pattern/_match.rs
  104. +4 −4 src/librustc_mir/hair/pattern/check_match.rs
  105. +1 −1 src/librustc_mir/hair/pattern/mod.rs
  106. +2 −2 src/librustc_mir/interpret/eval_context.rs
  107. +1 −1 src/librustc_mir/interpret/snapshot.rs
  108. +1 −1 src/librustc_mir/interpret/visitor.rs
  109. +2 −2 src/librustc_mir/monomorphize/collector.rs
  110. +2 −2 src/librustc_mir/monomorphize/partitioning.rs
  111. +1 −1 src/librustc_mir/shim.rs
  112. +1 −1 src/librustc_mir/transform/check_unsafety.rs
  113. +2 −2 src/librustc_mir/transform/elaborate_drops.rs
  114. +3 −3 src/librustc_mir/transform/generator.rs
  115. +1 −1 src/librustc_mir/transform/inline.rs
  116. +1 −1 src/librustc_mir/transform/mod.rs
  117. +1 −1 src/librustc_mir/transform/promote_consts.rs
  118. +2 −2 src/librustc_mir/transform/simplify.rs
  119. +1 −1 src/librustc_mir/transform/uniform_array_move_out.rs
  120. +2 −2 src/librustc_mir/util/elaborate_drops.rs
  121. +1 −1 src/librustc_passes/loops.rs
  122. +1 −1 src/librustc_passes/rvalue_promotion.rs
  123. +5 −5 src/librustc_privacy/lib.rs
  124. +1 −1 src/librustc_resolve/build_reduced_graph.rs
  125. +1 −1 src/librustc_resolve/check_unused.rs
  126. +1 −1 src/librustc_resolve/diagnostics.rs
  127. +1 −1 src/librustc_resolve/lib.rs
  128. +1 −1 src/librustc_resolve/macros.rs
  129. +5 −5 src/librustc_resolve/resolve_imports.rs
  130. +3 −3 src/librustc_save_analysis/dump_visitor.rs
  131. +3 −3 src/librustc_save_analysis/lib.rs
  132. +1 −1 src/librustc_traits/chalk_context/mod.rs
  133. +1 −1 src/librustc_traits/chalk_context/resolvent_ops.rs
  134. +1 −1 src/librustc_traits/chalk_context/unify.rs
  135. +1 −1 src/librustc_traits/type_op.rs
  136. +1 −1 src/librustc_typeck/check/autoderef.rs
  137. +1 −1 src/librustc_typeck/check/generator_interior.rs
  138. +1 −1 src/librustc_typeck/check/method/suggest.rs
  139. +4 −4 src/librustc_typeck/check/mod.rs
  140. +2 −2 src/librustc_typeck/check/writeback.rs
  141. +1 −1 src/librustc_typeck/check_unused.rs
  142. +1 −1 src/librustc_typeck/collect.rs
  143. +1 −1 src/librustc_typeck/outlives/implicit_infer.rs
  144. +1 −1 src/librustc_typeck/variance/constraints.rs
  145. +1 −1 src/librustc_typeck/variance/solve.rs
  146. +1 −1 src/librustc_typeck/variance/terms.rs
  147. +1 −1 src/librustdoc/passes/check_code_block_syntax.rs
  148. +1 −1 src/librustdoc/test.rs
  149. +1 −1 src/libserialize/json.rs
  150. +2 −2 src/libsyntax/ext/expand.rs
  151. +1 −1 src/libsyntax/ext/placeholders.rs
  152. +2 −2 src/libsyntax/ext/tt/macro_parser.rs
  153. +1 −1 src/libsyntax_ext/deriving/generic/mod.rs
  154. +1 −1 src/libsyntax_ext/format.rs
@@ -7,7 +7,7 @@ use crate::ty::{self, TyCtxt};
use crate::hir::{self, PatKind};
use crate::hir::def_id::DefId;

struct CFGBuilder<'a, 'tcx: 'a> {
struct CFGBuilder<'a, 'tcx> {
tcx: TyCtxt<'tcx>,
owner_def_id: DefId,
tables: &'a ty::TypeckTables<'tcx>,
@@ -11,7 +11,7 @@ use crate::ty::TyCtxt;
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
pub type Edge<'a> = &'a cfg::CFGEdge;

pub struct LabelledCFG<'a, 'tcx: 'a> {
pub struct LabelledCFG<'a, 'tcx> {
pub tcx: TyCtxt<'tcx>,
pub cfg: &'a cfg::CFG,
pub name: String,
@@ -207,8 +207,8 @@ macro_rules! define_dep_nodes {
pub fn new<'a, 'tcx>(tcx: TyCtxt<'tcx>,
dep: DepConstructor<'tcx>)
-> DepNode
where 'tcx: 'a,
'tcx: 'a
where 'tcx,
'tcx
{
match dep {
$(
@@ -74,7 +74,7 @@ impl<'a> FnKind<'a> {
///
/// See the comments on `ItemLikeVisitor` for more details on the overall
/// visit strategy.
pub enum NestedVisitorMap<'this, 'tcx: 'this> {
pub enum NestedVisitorMap<'this, 'tcx> {
/// Do not visit any nested things. When you add a new
/// "non-nested" thing, you will want to audit such uses to see if
/// they remain valid.
@@ -415,7 +415,7 @@ impl<'a> LoweringContext<'a> {
/// needed from arbitrary locations in the crate,
/// e.g., the number of lifetime generic parameters
/// declared for every type and trait definition.
struct MiscCollector<'tcx, 'interner: 'tcx> {
struct MiscCollector<'tcx, 'interner> {
lctx: &'tcx mut LoweringContext<'interner>,
hir_id_owner: Option<NodeId>,
}
@@ -561,7 +561,7 @@ impl<'a> LoweringContext<'a> {
}
}

struct ItemLowerer<'tcx, 'interner: 'tcx> {
struct ItemLowerer<'tcx, 'interner> {
lctx: &'tcx mut LoweringContext<'interner>,
}

@@ -1788,7 +1788,7 @@ impl<'a> LoweringContext<'a> {
// This visitor walks over `impl Trait` bounds and creates defs for all lifetimes that
// appear in the bounds, excluding lifetimes that are created within the bounds.
// E.g., `'a`, `'b`, but not `'c` in `impl for<'c> SomeTrait<'a, 'b, 'c>`.
struct ImplTraitLifetimeCollector<'r, 'a: 'r> {
struct ImplTraitLifetimeCollector<'r, 'a> {
context: &'r mut LoweringContext<'a>,
parent: DefIndex,
exist_ty_id: NodeId,
@@ -1799,7 +1799,7 @@ impl<'a> LoweringContext<'a> {
output_lifetime_params: Vec<hir::GenericParam>,
}

impl<'r, 'a: 'r, 'v> hir::intravisit::Visitor<'v> for ImplTraitLifetimeCollector<'r, 'a> {
impl<'r, 'a, 'v> hir::intravisit::Visitor<'v> for ImplTraitLifetimeCollector<'r, 'a> {
fn nested_visit_map<'this>(
&'this mut self,
) -> hir::intravisit::NestedVisitorMap<'this, 'v> {
@@ -26,19 +26,19 @@ pub fn check_crate<'hir>(hir_map: &hir::map::Map<'hir>) {
}
}

struct HirIdValidator<'a, 'hir: 'a> {
struct HirIdValidator<'a, 'hir> {
hir_map: &'a hir::map::Map<'hir>,
owner_def_index: Option<DefIndex>,
hir_ids_seen: FxHashSet<ItemLocalId>,
errors: &'a Lock<Vec<String>>,
}

struct OuterVisitor<'a, 'hir: 'a> {
struct OuterVisitor<'a, 'hir> {
hir_map: &'a hir::map::Map<'hir>,
errors: &'a Lock<Vec<String>>,
}

impl<'a, 'hir: 'a> OuterVisitor<'a, 'hir> {
impl<'a, 'hir> OuterVisitor<'a, 'hir> {
fn new_inner_visitor(&self,
hir_map: &'a hir::map::Map<'hir>)
-> HirIdValidator<'a, 'hir> {
@@ -51,7 +51,7 @@ impl<'a, 'hir: 'a> OuterVisitor<'a, 'hir> {
}
}

impl<'a, 'hir: 'a> ItemLikeVisitor<'hir> for OuterVisitor<'a, 'hir> {
impl<'a, 'hir> ItemLikeVisitor<'hir> for OuterVisitor<'a, 'hir> {
fn visit_item(&mut self, i: &'hir hir::Item) {
let mut inner_visitor = self.new_inner_visitor(self.hir_map);
inner_visitor.check(i.hir_id, |this| intravisit::walk_item(this, i));
@@ -68,7 +68,7 @@ impl<'a, 'hir: 'a> ItemLikeVisitor<'hir> for OuterVisitor<'a, 'hir> {
}
}

impl<'a, 'hir: 'a> HirIdValidator<'a, 'hir> {
impl<'a, 'hir> HirIdValidator<'a, 'hir> {
#[cold]
#[inline(never)]
fn error(&self, f: impl FnOnce() -> String) {
@@ -133,7 +133,7 @@ impl<'a, 'hir: 'a> HirIdValidator<'a, 'hir> {
}
}

impl<'a, 'hir: 'a> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
impl<'a, 'hir> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {

fn nested_visit_map<'this>(&'this mut self)
-> intravisit::NestedVisitorMap<'this, 'hir> {
@@ -30,13 +30,13 @@ use super::*;
use crate::ty::Const;
use crate::ty::relate::{Relate, TypeRelation};

pub struct At<'a, 'tcx: 'a> {
pub struct At<'a, 'tcx> {
pub infcx: &'a InferCtxt<'a, 'tcx>,
pub cause: &'a ObligationCause<'tcx>,
pub param_env: ty::ParamEnv<'tcx>,
}

pub struct Trace<'a, 'tcx: 'a> {
pub struct Trace<'a, 'tcx> {
at: At<'a, 'tcx>,
a_is_expected: bool,
trace: TypeTrace<'tcx>,
@@ -275,7 +275,7 @@ impl CanonicalizeRegionMode for CanonicalizeFreeRegionsOtherThanStatic {
}
}

struct Canonicalizer<'cx, 'tcx: 'cx> {
struct Canonicalizer<'cx, 'tcx> {
infcx: Option<&'cx InferCtxt<'cx, 'tcx>>,
tcx: TyCtxt<'tcx>,
variables: SmallVec<[CanonicalVarInfo; 8]>,
@@ -44,7 +44,7 @@ use syntax::ast;
use syntax_pos::{Span, DUMMY_SP};

#[derive(Clone)]
pub struct CombineFields<'infcx, 'tcx: 'infcx> {
pub struct CombineFields<'infcx, 'tcx> {
pub infcx: &'infcx InferCtxt<'infcx, 'tcx>,
pub trace: TypeTrace<'tcx>,
pub cause: Option<ty::relate::Cause>,
@@ -355,7 +355,7 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> {
}
}

struct Generalizer<'cx, 'tcx: 'cx> {
struct Generalizer<'cx, 'tcx> {
infcx: &'cx InferCtxt<'cx, 'tcx>,

/// The span, used when creating new type variables and things.
@@ -11,7 +11,7 @@ use crate::mir::interpret::ConstValue;
use crate::infer::unify_key::replace_if_possible;

/// Ensures `a` is made equal to `b`. Returns `a` on success.
pub struct Equate<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
pub struct Equate<'combine, 'infcx, 'tcx> {
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
}
@@ -30,7 +30,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
}
}

pub struct NiceRegionError<'cx, 'tcx: 'cx> {
pub struct NiceRegionError<'cx, 'tcx> {
infcx: &'cx InferCtxt<'cx, 'tcx>,
error: Option<RegionResolutionError<'tcx>>,
regions: Option<(Span, ty::Region<'tcx>, ty::Region<'tcx>)>,
@@ -41,7 +41,7 @@ use std::collections::hash_map::Entry;
use super::InferCtxt;
use super::unify_key::ToType;

pub struct TypeFreshener<'a, 'tcx: 'a> {
pub struct TypeFreshener<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
ty_freshen_count: u32,
const_freshen_count: u32,
@@ -133,7 +133,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
}
}

pub struct InferenceFudger<'a, 'tcx: 'a> {
pub struct InferenceFudger<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
type_vars: (Range<TyVid>, Vec<TypeVariableOrigin>),
int_vars: Range<IntVid>,
@@ -8,7 +8,7 @@ use crate::ty::{self, Ty, TyCtxt};
use crate::ty::relate::{Relate, RelateResult, TypeRelation};

/// "Greatest lower bound" (common subtype)
pub struct Glb<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
pub struct Glb<'combine, 'infcx, 'tcx> {
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
}
@@ -27,7 +27,7 @@ use crate::ty::TyVar;
use crate::ty::{self, Ty};
use crate::ty::relate::{RelateResult, TypeRelation};

pub trait LatticeDir<'f, 'tcx: 'f>: TypeRelation<'tcx> {
pub trait LatticeDir<'f, 'tcx>: TypeRelation<'tcx> {
fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>;

fn cause(&self) -> &ObligationCause<'tcx>;
@@ -48,7 +48,7 @@ pub fn super_lattice_tys<'a, 'tcx, L>(
) -> RelateResult<'tcx, Ty<'tcx>>
where
L: LatticeDir<'a, 'tcx>,
'tcx: 'a,
'tcx,
{
debug!("{}.lattice_tys({:?}, {:?})",
this.tag(),
@@ -107,7 +107,7 @@ pub fn maybe_print_constraints_for<'a, 'tcx>(
}
}

struct ConstraintGraph<'a, 'tcx: 'a> {
struct ConstraintGraph<'a, 'tcx> {
graph_name: String,
region_rels: &'a RegionRelations<'a, 'tcx>,
map: &'a BTreeMap<Constraint<'tcx>, SubregionOrigin<'tcx>>,
@@ -93,7 +93,7 @@ struct RegionAndOrigin<'tcx> {

type RegionGraph<'tcx> = Graph<(), Constraint<'tcx>>;

struct LexicalResolver<'cx, 'tcx: 'cx> {
struct LexicalResolver<'cx, 'tcx> {
region_rels: &'cx RegionRelations<'cx, 'tcx>,
var_infos: VarInfos,
data: RegionConstraintData<'tcx>,
@@ -8,7 +8,7 @@ use crate::ty::{self, Ty, TyCtxt};
use crate::ty::relate::{Relate, RelateResult, TypeRelation};

/// "Least upper bound" (common supertype)
pub struct Lub<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
pub struct Lub<'combine, 'infcx, 'tcx> {
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
}
@@ -585,7 +585,7 @@ impl<'tcx> InferOk<'tcx, ()> {
}

#[must_use = "once you start a snapshot, you should always consume it"]
pub struct CombinedSnapshot<'a, 'tcx: 'a> {
pub struct CombinedSnapshot<'a, 'tcx> {
projection_cache_snapshot: traits::ProjectionCacheSnapshot,
type_snapshot: type_variable::Snapshot<'tcx>,
const_snapshot: ut::Snapshot<ut::InPlace<ty::ConstVid<'tcx>>>,
@@ -38,7 +38,7 @@ pub enum NormalizationStrategy {
Eager,
}

pub struct TypeRelating<'me, 'tcx: 'me, D>
pub struct TypeRelating<'me, 'tcx, D>
where
D: TypeRelatingDelegate<'tcx>,
{
@@ -741,7 +741,7 @@ where
/// binder depth, and finds late-bound regions targeting the
/// `for<..`>. For each of those, it creates an entry in
/// `bound_region_scope`.
struct ScopeInstantiator<'me, 'tcx: 'me> {
struct ScopeInstantiator<'me, 'tcx> {
next_region: &'me mut dyn FnMut(ty::BoundRegion) -> ty::Region<'tcx>,
// The debruijn index of the scope we are instantiating.
target_index: ty::DebruijnIndex,
@@ -798,7 +798,7 @@ impl<'me, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'me, 'tcx> {
/// scopes.
///
/// [blog post]: https://is.gd/0hKvIr
struct TypeGeneralizer<'me, 'tcx: 'me, D>
struct TypeGeneralizer<'me, 'tcx, D>
where
D: TypeRelatingDelegate<'tcx> + 'me,
{
@@ -723,7 +723,7 @@ impl TypeFolder<'tcx> for ReverseMapper<'tcx> {
}
}

struct Instantiator<'a, 'tcx: 'a> {
struct Instantiator<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
parent_def_id: DefId,
body_id: hir::HirId,
@@ -67,7 +67,7 @@ pub struct OutlivesEnvironment<'tcx> {
/// because of implied bounds.
pub type RegionBoundPairs<'tcx> = Vec<(ty::Region<'tcx>, GenericKind<'tcx>)>;

impl<'a, 'tcx: 'a> OutlivesEnvironment<'tcx> {
impl<'a, 'tcx> OutlivesEnvironment<'tcx> {
pub fn new(param_env: ty::ParamEnv<'tcx>) -> Self {
let mut env = OutlivesEnvironment {
param_env,
@@ -226,7 +226,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
/// via a "delegate" of type `D` -- this is usually the `infcx`, which
/// accrues them into the `region_obligations` code, but for NLL we
/// use something else.
pub struct TypeOutlives<'cx, 'tcx: 'cx, D>
pub struct TypeOutlives<'cx, 'tcx, D>
where
D: TypeOutlivesDelegate<'tcx>,
{
@@ -12,7 +12,7 @@ use crate::util::captures::Captures;
/// via a "delegate" of type `D` -- this is usually the `infcx`, which
/// accrues them into the `region_obligations` code, but for NLL we
/// use something else.
pub struct VerifyBoundCx<'cx, 'tcx: 'cx> {
pub struct VerifyBoundCx<'cx, 'tcx> {
tcx: TyCtxt<'tcx>,
region_bound_pairs: &'cx RegionBoundPairs<'tcx>,
implicit_region_bound: Option<ty::Region<'tcx>>,
@@ -12,7 +12,7 @@ use crate::ty::fold::{TypeFolder, TypeVisitor};
/// been unified with (similar to `shallow_resolve`, but deep). This is
/// useful for printing messages etc but also required at various
/// points for correctness.
pub struct OpportunisticVarResolver<'a, 'tcx: 'a> {
pub struct OpportunisticVarResolver<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
}

@@ -50,7 +50,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticVarResolver<'a, 'tcx> {
/// The opportunistic type and region resolver is similar to the
/// opportunistic type resolver, but also opportunistically resolves
/// regions. It is useful for canonicalization.
pub struct OpportunisticTypeAndRegionResolver<'a, 'tcx: 'a> {
pub struct OpportunisticTypeAndRegionResolver<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
}

@@ -101,7 +101,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticTypeAndRegionResolver<'a, 'tcx>
/// type variables that don't yet have a value. The first unresolved type is stored.
/// It does not construct the fully resolved type (which might
/// involve some hashing and so forth).
pub struct UnresolvedTypeFinder<'a, 'tcx: 'a> {
pub struct UnresolvedTypeFinder<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,

/// Used to find the type parameter name and location for error reporting.
@@ -171,7 +171,7 @@ where

// N.B. This type is not public because the protocol around checking the
// `err` field is not enforcable otherwise.
struct FullTypeResolver<'a, 'tcx: 'a> {
struct FullTypeResolver<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
err: Option<FixupError<'tcx>>,
}
@@ -11,7 +11,7 @@ use crate::mir::interpret::ConstValue;
use std::mem;

/// Ensures `a` is made a subtype of `b`. Returns `a` on success.
pub struct Sub<'combine, 'infcx: 'combine, 'tcx: 'infcx> {
pub struct Sub<'combine, 'infcx, 'tcx> {
fields: &'combine mut CombineFields<'infcx, 'tcx>,
a_is_expected: bool,
}
@@ -507,7 +507,7 @@ impl LintStore {
}

/// Context for lint checking after type checking.
pub struct LateContext<'a, 'tcx: 'a> {
pub struct LateContext<'a, 'tcx> {
/// Type context we're checking in.
pub tcx: TyCtxt<'tcx>,

@@ -533,7 +533,7 @@ pub struct LateContext<'a, 'tcx: 'a> {
only_module: bool,
}

pub struct LateContextAndPass<'a, 'tcx: 'a, T: LateLintPass<'a, 'tcx>> {
pub struct LateContextAndPass<'a, 'tcx, T: LateLintPass<'a, 'tcx>> {
context: LateContext<'a, 'tcx>,
pass: T,
}

0 comments on commit b25b466

Please sign in to comment.
You can’t perform that action at this time.