Skip to content

Commit 07c82e1

Browse files
authored
Rollup merge of #62057 - matthewjasper:deny-unnecessary-outlives, r=Mark-Simulacrum
Deny explicit_outlives_requirements in the compiler
2 parents 675ac94 + d0311e7 commit 07c82e1

File tree

13 files changed

+11
-16
lines changed

13 files changed

+11
-16
lines changed

src/librustc/hir/itemlikevisit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub trait ItemLikeVisitor<'hir> {
5151
fn visit_impl_item(&mut self, impl_item: &'hir ImplItem);
5252
}
5353

54-
pub struct DeepVisitor<'v, V: 'v> {
54+
pub struct DeepVisitor<'v, V> {
5555
visitor: &'v mut V,
5656
}
5757

src/librustc/infer/nll_relate/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ impl<'me, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'me, 'tcx> {
800800
/// [blog post]: https://is.gd/0hKvIr
801801
struct TypeGeneralizer<'me, 'tcx, D>
802802
where
803-
D: TypeRelatingDelegate<'tcx> + 'me,
803+
D: TypeRelatingDelegate<'tcx>,
804804
{
805805
infcx: &'me InferCtxt<'me, 'tcx>,
806806

src/librustc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#![deny(rust_2018_idioms)]
3232
#![deny(internal)]
3333
#![deny(unused_lifetimes)]
34-
#![allow(explicit_outlives_requirements)]
3534

3635
#![feature(arbitrary_self_types)]
3736
#![feature(box_patterns)]

src/librustc/ty/context.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ pub struct CommonConsts<'tcx> {
231231
pub err: &'tcx Const<'tcx>,
232232
}
233233

234-
pub struct LocalTableInContext<'a, V: 'a> {
234+
pub struct LocalTableInContext<'a, V> {
235235
local_id_root: Option<DefId>,
236236
data: &'a ItemLocalMap<V>
237237
}
@@ -294,7 +294,7 @@ impl<'a, V> ::std::ops::Index<hir::HirId> for LocalTableInContext<'a, V> {
294294
}
295295
}
296296

297-
pub struct LocalTableInContextMut<'a, V: 'a> {
297+
pub struct LocalTableInContextMut<'a, V> {
298298
local_id_root: Option<DefId>,
299299
data: &'a mut ItemLocalMap<V>
300300
}
@@ -2171,7 +2171,7 @@ impl<'tcx> TyCtxt<'tcx> {
21712171

21722172

21732173
/// An entry in an interner.
2174-
struct Interned<'tcx, T: 'tcx+?Sized>(&'tcx T);
2174+
struct Interned<'tcx, T: ?Sized>(&'tcx T);
21752175

21762176
impl<'tcx, T: 'tcx+?Sized> Clone for Interned<'tcx, T> {
21772177
fn clone(&self) -> Self {

src/librustc/ty/query/plumbing.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ macro_rules! profq_query_msg {
8989

9090
/// A type representing the responsibility to execute the job in the `job` field.
9191
/// This will poison the relevant query if dropped.
92-
pub(super) struct JobOwner<'a, 'tcx, Q: QueryDescription<'tcx> + 'a> {
92+
pub(super) struct JobOwner<'a, 'tcx, Q: QueryDescription<'tcx>> {
9393
cache: &'a Lock<QueryCache<'tcx, Q>>,
9494
key: Q::Key,
9595
job: Lrc<QueryJob<'tcx>>,
@@ -230,7 +230,7 @@ pub struct CycleError<'tcx> {
230230
}
231231

232232
/// The result of `try_get_lock`
233-
pub(super) enum TryGetJob<'a, 'tcx, D: QueryDescription<'tcx> + 'a> {
233+
pub(super) enum TryGetJob<'a, 'tcx, D: QueryDescription<'tcx>> {
234234
/// The query is not yet started. Contains a guard to the cache eventually used to start it.
235235
NotYetStarted(JobOwner<'a, 'tcx, D>),
236236

src/librustc_codegen_llvm/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![deny(rust_2018_idioms)]
2525
#![deny(internal)]
2626
#![deny(unused_lifetimes)]
27-
#![allow(explicit_outlives_requirements)]
2827

2928
use back::write::{create_target_machine, create_informational_target_machine};
3029
use syntax_pos::symbol::Symbol;

src/librustc_codegen_ssa/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![deny(rust_2018_idioms)]
1616
#![deny(internal)]
1717
#![deny(unused_lifetimes)]
18-
#![allow(explicit_outlives_requirements)]
1918

2019
#![recursion_limit="256"]
2120

src/librustc_mir/dataflow/graphviz.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<'a, 'tcx, BD> MirWithFlowState<'tcx> for DataflowBuilder<'a, 'tcx, BD>
3030
fn flow_state(&self) -> &DataflowState<'tcx, Self::BD> { &self.flow_state.flow_state }
3131
}
3232

33-
struct Graph<'a, 'tcx, MWF:'a, P> where
33+
struct Graph<'a, 'tcx, MWF, P> where
3434
MWF: MirWithFlowState<'tcx>
3535
{
3636
mbcx: &'a MWF,

src/librustc_mir/dataflow/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ where
181181

182182
struct PropagationContext<'b, 'a, 'tcx, O>
183183
where
184-
O: 'b + BitDenotation<'tcx>,
184+
O: BitDenotation<'tcx>,
185185
{
186186
builder: &'b mut DataflowAnalysis<'a, 'tcx, O>,
187187
}

src/librustc_mir/interpret/intern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use super::{
2121
};
2222
use crate::const_eval::{CompileTimeInterpreter, CompileTimeEvalContext};
2323

24-
struct InternVisitor<'rt, 'mir: 'rt, 'tcx: 'rt + 'mir> {
24+
struct InternVisitor<'rt, 'mir, 'tcx> {
2525
/// previously encountered safe references
2626
ref_tracking: &'rt mut RefTracking<(MPlaceTy<'tcx>, Mutability, InternMode)>,
2727
ecx: &'rt mut CompileTimeEvalContext<'mir, 'tcx>,

src/librustc_mir/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
3030
#![deny(rust_2018_idioms)]
3131
#![deny(internal)]
3232
#![deny(unused_lifetimes)]
33-
#![allow(explicit_outlives_requirements)]
3433

3534
#[macro_use] extern crate log;
3635
#[macro_use]

src/librustc_mir/util/elaborate_drops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub trait DropElaborator<'a, 'tcx>: fmt::Debug {
9292
#[derive(Debug)]
9393
struct DropCtxt<'l, 'b, 'tcx, D>
9494
where
95-
D: DropElaborator<'b, 'tcx> + 'l,
95+
D: DropElaborator<'b, 'tcx>,
9696
{
9797
elaborator: &'l mut D,
9898

src/librustc_typeck/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ This API is completely unstable and subject to change.
7575
#![deny(rust_2018_idioms)]
7676
#![deny(internal)]
7777
#![deny(unused_lifetimes)]
78-
#![allow(explicit_outlives_requirements)]
7978

8079
#[macro_use] extern crate log;
8180
#[macro_use] extern crate syntax;

0 commit comments

Comments
 (0)