]> git.lizzy.rs Git - rust.git/commitdiff
Deny explicit_outlives_requirements in the compiler
authorMatthew Jasper <mjjasper1@gmail.com>
Sat, 22 Jun 2019 16:13:19 +0000 (17:13 +0100)
committerMatthew Jasper <mjjasper1@gmail.com>
Sat, 22 Jun 2019 16:13:19 +0000 (17:13 +0100)
13 files changed:
src/librustc/hir/itemlikevisit.rs
src/librustc/infer/nll_relate/mod.rs
src/librustc/lib.rs
src/librustc/ty/context.rs
src/librustc/ty/query/plumbing.rs
src/librustc_codegen_llvm/lib.rs
src/librustc_codegen_ssa/lib.rs
src/librustc_mir/dataflow/graphviz.rs
src/librustc_mir/dataflow/mod.rs
src/librustc_mir/interpret/intern.rs
src/librustc_mir/lib.rs
src/librustc_mir/util/elaborate_drops.rs
src/librustc_typeck/lib.rs

index bfc9e8f06e235ccc5fb586b7bfd45d7bd789f490..35b181245837f2bf17e6454f7dea2c53cdc0533f 100644 (file)
@@ -51,7 +51,7 @@ pub trait ItemLikeVisitor<'hir> {
     fn visit_impl_item(&mut self, impl_item: &'hir ImplItem);
 }
 
-pub struct DeepVisitor<'v, V: 'v> {
+pub struct DeepVisitor<'v, V> {
     visitor: &'v mut V,
 }
 
index 21489965b1bf66d6f427d36086c03dee84abb11e..a1a93eb5521387ee03fcbd30c2f1371e3a6d80ee 100644 (file)
@@ -800,7 +800,7 @@ fn visit_region(&mut self, r: ty::Region<'tcx>) -> bool {
 /// [blog post]: https://is.gd/0hKvIr
 struct TypeGeneralizer<'me, 'tcx, D>
 where
-    D: TypeRelatingDelegate<'tcx> + 'me,
+    D: TypeRelatingDelegate<'tcx>,
 {
     infcx: &'me InferCtxt<'me, 'tcx>,
 
index e2f2799d9634dfadfd599ea5e66031379476b2ea..257d5159f113195128fc4db2f3c935342bbe45df 100644 (file)
@@ -31,7 +31,6 @@
 #![deny(rust_2018_idioms)]
 #![deny(internal)]
 #![deny(unused_lifetimes)]
-#![allow(explicit_outlives_requirements)]
 
 #![feature(arbitrary_self_types)]
 #![feature(box_patterns)]
index ce785f9a0246bb9493aa89e8bfaf66d6ed97b1c7..28399ed5439f79de9a3bcba7bb9dde3ad7bf3fca 100644 (file)
@@ -231,7 +231,7 @@ pub struct CommonConsts<'tcx> {
     pub err: &'tcx Const<'tcx>,
 }
 
-pub struct LocalTableInContext<'a, V: 'a> {
+pub struct LocalTableInContext<'a, V> {
     local_id_root: Option<DefId>,
     data: &'a ItemLocalMap<V>
 }
@@ -294,7 +294,7 @@ fn index(&self, key: hir::HirId) -> &V {
     }
 }
 
-pub struct LocalTableInContextMut<'a, V: 'a> {
+pub struct LocalTableInContextMut<'a, V> {
     local_id_root: Option<DefId>,
     data: &'a mut ItemLocalMap<V>
 }
@@ -2171,7 +2171,7 @@ pub fn print_debug_stats(self) {
 
 
 /// An entry in an interner.
-struct Interned<'tcx, T: 'tcx+?Sized>(&'tcx T);
+struct Interned<'tcx, T: ?Sized>(&'tcx T);
 
 impl<'tcx, T: 'tcx+?Sized> Clone for Interned<'tcx, T> {
     fn clone(&self) -> Self {
index 0f158d2982a20dc8d2d87772e6cd560fd3782ba3..7d5f984c1b6f24e93f2b74359bcd44819311ab91 100644 (file)
@@ -89,7 +89,7 @@ macro_rules! profq_query_msg {
 
 /// A type representing the responsibility to execute the job in the `job` field.
 /// This will poison the relevant query if dropped.
-pub(super) struct JobOwner<'a, 'tcx, Q: QueryDescription<'tcx> + 'a> {
+pub(super) struct JobOwner<'a, 'tcx, Q: QueryDescription<'tcx>> {
     cache: &'a Lock<QueryCache<'tcx, Q>>,
     key: Q::Key,
     job: Lrc<QueryJob<'tcx>>,
@@ -230,7 +230,7 @@ pub struct CycleError<'tcx> {
 }
 
 /// The result of `try_get_lock`
-pub(super) enum TryGetJob<'a, 'tcx, D: QueryDescription<'tcx> + 'a> {
+pub(super) enum TryGetJob<'a, 'tcx, D: QueryDescription<'tcx>> {
     /// The query is not yet started. Contains a guard to the cache eventually used to start it.
     NotYetStarted(JobOwner<'a, 'tcx, D>),
 
index 1eb6e9a5283bd2e81ed564c06db4e3b5bd552b51..7283aa95b3027e7d9182d596bd9cd0a6bbda3331 100644 (file)
@@ -24,7 +24,6 @@
 #![deny(rust_2018_idioms)]
 #![deny(internal)]
 #![deny(unused_lifetimes)]
-#![allow(explicit_outlives_requirements)]
 
 use back::write::{create_target_machine, create_informational_target_machine};
 use syntax_pos::symbol::Symbol;
index 71393e224e42db145197adacbfd5b92a099c25bb..b76f098773f0b6a26b6758dca781c1f669433537 100644 (file)
@@ -15,7 +15,6 @@
 #![deny(rust_2018_idioms)]
 #![deny(internal)]
 #![deny(unused_lifetimes)]
-#![allow(explicit_outlives_requirements)]
 
 #![recursion_limit="256"]
 
index f62ad2fbef71f06bcd8d3d8e7cac5f55440f761f..7896592eea68582238a68760f310f9332c9336db 100644 (file)
@@ -30,7 +30,7 @@ fn body(&self) -> &Body<'tcx> { self.flow_state.body() }
     fn flow_state(&self) -> &DataflowState<'tcx, Self::BD> { &self.flow_state.flow_state }
 }
 
-struct Graph<'a, 'tcx, MWF:'a, P> where
+struct Graph<'a, 'tcx, MWF, P> where
     MWF: MirWithFlowState<'tcx>
 {
     mbcx: &'a MWF,
index 0728d5b21bbd18f548ebabd5902881204543330e..89b952e9f8b5aaa4031f29e62719f3bc79390e9d 100644 (file)
@@ -181,7 +181,7 @@ pub(crate) fn run<P>(
 
 struct PropagationContext<'b, 'a, 'tcx, O>
 where
-    O: 'b + BitDenotation<'tcx>,
+    O: BitDenotation<'tcx>,
 {
     builder: &'b mut DataflowAnalysis<'a, 'tcx, O>,
 }
index d998f40c86eccf4665f5b80e7a8ab38fb3b1433c..416b66daa05940fc958522e9a3bac1daed7c46f1 100644 (file)
@@ -21,7 +21,7 @@
 };
 use crate::const_eval::{CompileTimeInterpreter, CompileTimeEvalContext};
 
-struct InternVisitor<'rt, 'mir: 'rt, 'tcx: 'rt + 'mir> {
+struct InternVisitor<'rt, 'mir, 'tcx> {
     /// previously encountered safe references
     ref_tracking: &'rt mut RefTracking<(MPlaceTy<'tcx>, Mutability, InternMode)>,
     ecx: &'rt mut CompileTimeEvalContext<'mir, 'tcx>,
index a7cbe84330d899a9e10a5b760cb3649f928361a3..cb02e1a778c93af78f38da3bc6ed78d3db92564e 100644 (file)
@@ -30,7 +30,6 @@
 #![deny(rust_2018_idioms)]
 #![deny(internal)]
 #![deny(unused_lifetimes)]
-#![allow(explicit_outlives_requirements)]
 
 #[macro_use] extern crate log;
 #[macro_use]
index 815d210d36ea4fcbbfbe93e3483be9ac1254b43d..91fc19b71d8ba7407d60619ba74b387091b5681a 100644 (file)
@@ -92,7 +92,7 @@ pub trait DropElaborator<'a, 'tcx>: fmt::Debug {
 #[derive(Debug)]
 struct DropCtxt<'l, 'b, 'tcx, D>
 where
-    D: DropElaborator<'b, 'tcx> + 'l,
+    D: DropElaborator<'b, 'tcx>,
 {
     elaborator: &'l mut D,
 
index cc6f7a07d9621c841099ca8045a359097be8bb47..ec0f431d9b25e211d2dcb0059f13624547a7ffe9 100644 (file)
@@ -75,7 +75,6 @@
 #![deny(rust_2018_idioms)]
 #![deny(internal)]
 #![deny(unused_lifetimes)]
-#![allow(explicit_outlives_requirements)]
 
 #[macro_use] extern crate log;
 #[macro_use] extern crate syntax;