Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: remove 'x: 'y bounds (except where necessary or from comments/strings). #61891

Merged
merged 6 commits into from
Jun 18, 2019
Merged
Changes from 1 commit
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 src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
@@ -204,7 +204,7 @@ macro_rules! define_dep_nodes {
impl DepNode {
#[allow(unreachable_code, non_snake_case)]
#[inline(always)]
pub fn new<'a, 'tcx>(tcx: TyCtxt<'tcx>,
pub fn new<'tcx>(tcx: TyCtxt<'tcx>,
dep: DepConstructor<'tcx>)
-> DepNode
{
2 changes: 1 addition & 1 deletion src/librustc/middle/liveness.rs
Original file line number Diff line number Diff line change
@@ -352,7 +352,7 @@ impl IrMaps<'tcx> {
}
}

fn visit_fn<'a, 'tcx>(
fn visit_fn<'tcx>(
ir: &mut IrMaps<'tcx>,
fk: FnKind<'tcx>,
decl: &'tcx hir::FnDecl,
2 changes: 1 addition & 1 deletion src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
@@ -690,7 +690,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
/// Evaluates the predicates in `predicates` recursively. Note that
/// this applies projections in the predicates, and therefore
/// is run within an inference probe.
fn evaluate_predicates_recursively<'a, 'o, I>(
fn evaluate_predicates_recursively<'o, I>(
&mut self,
stack: TraitObligationStackList<'o, 'tcx>,
predicates: I,
2 changes: 1 addition & 1 deletion src/librustc/ty/query/on_disk_cache.rs
Original file line number Diff line number Diff line change
@@ -505,7 +505,7 @@ impl<'a, 'tcx> DecoderWithPosition for CacheDecoder<'a, 'tcx> {

// Decode something that was encoded with encode_tagged() and verify that the
// tag matches and the correct amount of bytes was read.
fn decode_tagged<'a, 'tcx, D, T, V>(decoder: &mut D,
fn decode_tagged<D, T, V>(decoder: &mut D,
expected_tag: T)
-> Result<V, D::Error>
where T: Decodable + Eq + ::std::fmt::Debug,
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/lib.rs
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
) {
unsafe { allocator::codegen(tcx, mods, kind) }
}
fn compile_codegen_unit<'a, 'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString) {
fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString) {
base::compile_codegen_unit(tcx, cgu_name);
}
fn target_machine_factory(
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/traits/backend.rs
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Se
mods: &mut Self::Module,
kind: AllocatorKind,
);
fn compile_codegen_unit<'a, 'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString);
fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString);
// If find_features is true this won't access `sess.crate_types` by assuming
// that `is_pie_binary` is false. When we discover LLVM target features
// `sess.crate_types` is uninitialized so we cannot access it.
12 changes: 6 additions & 6 deletions src/librustc_mir/hair/cx/to_ref.rs
Original file line number Diff line number Diff line change
@@ -8,31 +8,31 @@ pub trait ToRef {
fn to_ref(self) -> Self::Output;
}

impl<'a, 'tcx> ToRef for &'tcx hir::Expr {
impl<'tcx> ToRef for &'tcx hir::Expr {
type Output = ExprRef<'tcx>;

fn to_ref(self) -> ExprRef<'tcx> {
ExprRef::Hair(self)
}
}

impl<'a, 'tcx> ToRef for &'tcx P<hir::Expr> {
impl<'tcx> ToRef for &'tcx P<hir::Expr> {
type Output = ExprRef<'tcx>;

fn to_ref(self) -> ExprRef<'tcx> {
ExprRef::Hair(&**self)
}
}

impl<'a, 'tcx> ToRef for Expr<'tcx> {
impl<'tcx> ToRef for Expr<'tcx> {
type Output = ExprRef<'tcx>;

fn to_ref(self) -> ExprRef<'tcx> {
ExprRef::Mirror(Box::new(self))
}
}

impl<'a, 'tcx, T, U> ToRef for &'tcx Option<T>
impl<'tcx, T, U> ToRef for &'tcx Option<T>
where &'tcx T: ToRef<Output = U>
{
type Output = Option<U>;
@@ -42,7 +42,7 @@ impl<'a, 'tcx, T, U> ToRef for &'tcx Option<T>
}
}

impl<'a, 'tcx, T, U> ToRef for &'tcx Vec<T>
impl<'tcx, T, U> ToRef for &'tcx Vec<T>
where &'tcx T: ToRef<Output = U>
{
type Output = Vec<U>;
@@ -52,7 +52,7 @@ impl<'a, 'tcx, T, U> ToRef for &'tcx Vec<T>
}
}

impl<'a, 'tcx, T, U> ToRef for &'tcx P<[T]>
impl<'tcx, T, U> ToRef for &'tcx P<[T]>
where &'tcx T: ToRef<Output = U>
{
type Output = Vec<U>;
8 changes: 4 additions & 4 deletions src/librustc_mir/hair/pattern/_match.rs
Original file line number Diff line number Diff line change
@@ -983,7 +983,7 @@ enum MissingCtors<'tcx> {
// (The split logic gives a performance win, because we always need to know if
// the set is empty, but we rarely need the full set, and it can be expensive
// to compute the full set.)
fn compute_missing_ctors<'a, 'tcx>(
fn compute_missing_ctors<'tcx>(
info: MissingCtorsInfo,
tcx: TyCtxt<'tcx>,
all_ctors: &Vec<Constructor<'tcx>>,
@@ -1518,7 +1518,7 @@ fn should_treat_range_exhaustively(tcx: TyCtxt<'tcx>, ctor: &Constructor<'tcx>)
/// boundaries for each interval range, sort them, then create constructors for each new interval
/// between every pair of boundary points. (This essentially sums up to performing the intuitive
/// merging operation depicted above.)
fn split_grouped_constructors<'p, 'a, 'tcx>(
fn split_grouped_constructors<'p, 'tcx>(
tcx: TyCtxt<'tcx>,
ctors: Vec<Constructor<'tcx>>,
&Matrix(ref m): &Matrix<'p, 'tcx>,
@@ -1596,7 +1596,7 @@ fn split_grouped_constructors<'p, 'a, 'tcx>(
}

/// Checks whether there exists any shared value in either `ctor` or `pat` by intersecting them.
fn constructor_intersects_pattern<'p, 'a, 'tcx>(
fn constructor_intersects_pattern<'p, 'tcx>(
tcx: TyCtxt<'tcx>,
ctor: &Constructor<'tcx>,
pat: &'p Pattern<'tcx>,
@@ -1686,7 +1686,7 @@ fn constructor_covered_by_range<'tcx>(
}
}

fn patterns_for_variant<'p, 'a, 'tcx>(
fn patterns_for_variant<'p, 'tcx>(
subpatterns: &'p [FieldPattern<'tcx>],
wild_patterns: &[&'p Pattern<'tcx>])
-> SmallVec<[&'p Pattern<'tcx>; 2]>
2 changes: 1 addition & 1 deletion src/librustc_mir/monomorphize/collector.rs
Original file line number Diff line number Diff line change
@@ -345,7 +345,7 @@ fn collect_roots<'tcx>(tcx: TyCtxt<'tcx>, mode: MonoItemCollectionMode) -> Vec<M
}

// Collect all monomorphized items reachable from `starting_point`
fn collect_items_rec<'a, 'tcx>(
fn collect_items_rec<'tcx>(
tcx: TyCtxt<'tcx>,
starting_point: MonoItem<'tcx>,
visited: MTRef<'_, MTLock<FxHashSet<MonoItem<'tcx>>>>,