未验证 提交 07c82e18 编写于 作者: M Mazdak Farrokhzad 提交者: GitHub

Rollup merge of #62057 - matthewjasper:deny-unnecessary-outlives, r=Mark-Simulacrum

Deny explicit_outlives_requirements in the compiler
......@@ -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,
}
......
......@@ -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>,
......
......@@ -31,7 +31,6 @@
#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]
#![allow(explicit_outlives_requirements)]
#![feature(arbitrary_self_types)]
#![feature(box_patterns)]
......
......@@ -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 {
......
......@@ -89,7 +89,7 @@ fn default() -> QueryCache<'tcx, M> {
/// 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>),
......
......@@ -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;
......
......@@ -15,7 +15,6 @@
#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]
#![allow(explicit_outlives_requirements)]
#![recursion_limit="256"]
......
......@@ -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,
......
......@@ -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>,
}
......
......@@ -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>,
......
......@@ -30,7 +30,6 @@
#![deny(rust_2018_idioms)]
#![deny(internal)]
#![deny(unused_lifetimes)]
#![allow(explicit_outlives_requirements)]
#[macro_use] extern crate log;
#[macro_use]
......
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册