mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
rustc_codegen_*: deny(unused_lifetimes).
This commit is contained in:
@@ -112,7 +112,7 @@ fn codegen_inline_asm(
|
||||
}
|
||||
}
|
||||
|
||||
impl AsmMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
||||
impl AsmMethods for CodegenCx<'ll, 'tcx> {
|
||||
fn codegen_global_asm(&self, ga: &hir::GlobalAsm) {
|
||||
let asm = CString::new(ga.asm.as_str().as_bytes()).unwrap();
|
||||
unsafe {
|
||||
|
||||
@@ -1074,8 +1074,8 @@ fn do_not_inline(&mut self, llret: &'ll Value) {
|
||||
}
|
||||
}
|
||||
|
||||
impl StaticBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
fn get_static(&mut self, def_id: DefId) -> &'ll Value {
|
||||
impl StaticBuilderMethods for Builder<'a, 'll, 'tcx> {
|
||||
fn get_static(&mut self, def_id: DefId) -> &'ll Value {
|
||||
// Forward to the `get_static` method of `CodegenCx`
|
||||
self.cx().get_static(def_id)
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#![allow(dead_code)]
|
||||
#![deny(rust_2018_idioms)]
|
||||
#![deny(internal)]
|
||||
#![deny(unused_lifetimes)]
|
||||
#![allow(explicit_outlives_requirements)]
|
||||
|
||||
#![recursion_limit="256"]
|
||||
|
||||
@@ -272,7 +272,7 @@ pub fn funclet_bb(self, for_bb: mir::BasicBlock) -> Option<mir::BasicBlock> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn cleanup_kinds<'a, 'tcx>(mir: &mir::Body<'tcx>) -> IndexVec<mir::BasicBlock, CleanupKind> {
|
||||
pub fn cleanup_kinds<'tcx>(mir: &mir::Body<'tcx>) -> IndexVec<mir::BasicBlock, CleanupKind> {
|
||||
fn discover_masters<'tcx>(result: &mut IndexVec<mir::BasicBlock, CleanupKind>,
|
||||
mir: &mir::Body<'tcx>) {
|
||||
for (bb, data) in mir.basic_blocks().iter_enumerated() {
|
||||
|
||||
@@ -223,7 +223,7 @@ fn codegen_switchint_terminator<'b>(
|
||||
}
|
||||
}
|
||||
|
||||
fn codegen_return_terminator<'b>(
|
||||
fn codegen_return_terminator(
|
||||
&mut self,
|
||||
mut bx: Bx,
|
||||
) {
|
||||
|
||||
@@ -12,6 +12,6 @@ fn codegen_inline_asm(
|
||||
) -> bool;
|
||||
}
|
||||
|
||||
pub trait AsmMethods<'tcx> {
|
||||
pub trait AsmMethods {
|
||||
fn codegen_global_asm(&self, ga: &GlobalAsm);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ pub trait BuilderMethods<'a, 'tcx: 'a>:
|
||||
+ AbiBuilderMethods<'tcx>
|
||||
+ IntrinsicCallMethods<'tcx>
|
||||
+ AsmBuilderMethods<'tcx>
|
||||
+ StaticBuilderMethods<'tcx>
|
||||
+ StaticBuilderMethods
|
||||
+ HasParamEnv<'tcx>
|
||||
+ HasTargetSpec
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ pub trait CodegenMethods<'tcx>:
|
||||
+ StaticMethods
|
||||
+ DebugInfoMethods<'tcx>
|
||||
+ DeclareMethods<'tcx>
|
||||
+ AsmMethods<'tcx>
|
||||
+ AsmMethods
|
||||
+ PreDefineMethods<'tcx>
|
||||
+ HasParamEnv<'tcx>
|
||||
+ HasTyCtxt<'tcx>
|
||||
@@ -74,7 +74,7 @@ impl<'tcx, T> CodegenMethods<'tcx> for T where
|
||||
+ StaticMethods
|
||||
+ DebugInfoMethods<'tcx>
|
||||
+ DeclareMethods<'tcx>
|
||||
+ AsmMethods<'tcx>
|
||||
+ AsmMethods
|
||||
+ PreDefineMethods<'tcx>
|
||||
+ HasParamEnv<'tcx>
|
||||
+ HasTyCtxt<'tcx>
|
||||
|
||||
@@ -8,7 +8,7 @@ pub trait StaticMethods: BackendTypes {
|
||||
fn codegen_static(&self, def_id: DefId, is_mutable: bool);
|
||||
}
|
||||
|
||||
pub trait StaticBuilderMethods<'tcx>: BackendTypes {
|
||||
pub trait StaticBuilderMethods: BackendTypes {
|
||||
fn get_static(&mut self, def_id: DefId) -> Self::Value;
|
||||
fn static_panic_msg(
|
||||
&mut self,
|
||||
|
||||
@@ -101,7 +101,7 @@ pub trait LayoutTypeMethods<'tcx>: Backend<'tcx> {
|
||||
fn is_backend_immediate(&self, layout: TyLayout<'tcx>) -> bool;
|
||||
fn is_backend_scalar_pair(&self, layout: TyLayout<'tcx>) -> bool;
|
||||
fn backend_field_index(&self, layout: TyLayout<'tcx>, index: usize) -> u64;
|
||||
fn scalar_pair_element_backend_type<'a>(
|
||||
fn scalar_pair_element_backend_type(
|
||||
&self,
|
||||
layout: TyLayout<'tcx>,
|
||||
index: usize,
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#![deny(rust_2018_idioms)]
|
||||
#![deny(internal)]
|
||||
#![deny(unused_lifetimes)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc;
|
||||
|
||||
Reference in New Issue
Block a user