Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
rustc: Remove needless lifetimes
This commit is contained in:
commit
d23cb738d2
109 changed files with 266 additions and 320 deletions
|
@ -122,7 +122,7 @@ pub fn feature_err_issue<'a>(
|
|||
/// Construct a future incompatibility diagnostic for a feature gate.
|
||||
///
|
||||
/// This diagnostic is only a warning and *does not cause compilation to fail*.
|
||||
pub fn feature_warn<'a>(sess: &'a ParseSess, feature: Symbol, span: Span, explain: &str) {
|
||||
pub fn feature_warn(sess: &ParseSess, feature: Symbol, span: Span, explain: &str) {
|
||||
feature_warn_issue(sess, feature, span, GateIssue::Language, explain);
|
||||
}
|
||||
|
||||
|
@ -134,8 +134,8 @@ pub fn feature_warn<'a>(sess: &'a ParseSess, feature: Symbol, span: Span, explai
|
|||
/// Almost always, you want to use this for a language feature. If so, prefer `feature_warn`.
|
||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
pub fn feature_warn_issue<'a>(
|
||||
sess: &'a ParseSess,
|
||||
pub fn feature_warn_issue(
|
||||
sess: &ParseSess,
|
||||
feature: Symbol,
|
||||
span: Span,
|
||||
issue: GateIssue,
|
||||
|
@ -160,7 +160,7 @@ pub fn feature_warn_issue<'a>(
|
|||
}
|
||||
|
||||
/// Adds the diagnostics for a feature to an existing error.
|
||||
pub fn add_feature_diagnostics<'a>(err: &mut Diagnostic, sess: &'a ParseSess, feature: Symbol) {
|
||||
pub fn add_feature_diagnostics(err: &mut Diagnostic, sess: &ParseSess, feature: Symbol) {
|
||||
add_feature_diagnostics_for_issue(err, sess, feature, GateIssue::Language);
|
||||
}
|
||||
|
||||
|
@ -169,9 +169,9 @@ pub fn add_feature_diagnostics<'a>(err: &mut Diagnostic, sess: &'a ParseSess, fe
|
|||
/// This variant allows you to control whether it is a library or language feature.
|
||||
/// Almost always, you want to use this for a language feature. If so, prefer
|
||||
/// `add_feature_diagnostics`.
|
||||
pub fn add_feature_diagnostics_for_issue<'a>(
|
||||
pub fn add_feature_diagnostics_for_issue(
|
||||
err: &mut Diagnostic,
|
||||
sess: &'a ParseSess,
|
||||
sess: &ParseSess,
|
||||
feature: Symbol,
|
||||
issue: GateIssue,
|
||||
) {
|
||||
|
|
|
@ -3,7 +3,7 @@ use rustc_data_structures::profiling::VerboseTimingGuard;
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
impl Session {
|
||||
pub fn timer<'a>(&'a self, what: &'static str) -> VerboseTimingGuard<'a> {
|
||||
pub fn timer(&self, what: &'static str) -> VerboseTimingGuard<'_> {
|
||||
self.prof.verbose_generic_activity(what)
|
||||
}
|
||||
pub fn time<R>(&self, what: &'static str, f: impl FnOnce() -> R) -> R {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue