Fix clippy::needless-lifetimes in bootstrap

This commit is contained in:
Josh Stone 2024-10-15 20:53:26 -07:00
parent 618b0cb046
commit cd60224af7
4 changed files with 7 additions and 7 deletions

View File

@ -1096,7 +1096,7 @@ tool_extended!((self, builder),
Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, add_bins_to_sysroot = ["rustfmt", "cargo-fmt"];
);
impl<'a> Builder<'a> {
impl Builder<'_> {
/// Gets a `BootstrapCommand` which is ready to run `tool` in `stage` built for
/// `host`.
pub fn tool_cmd(&self, tool: Tool) -> BootstrapCommand {

View File

@ -63,7 +63,7 @@ pub struct Builder<'a> {
pub paths: Vec<PathBuf>,
}
impl<'a> Deref for Builder<'a> {
impl Deref for Builder<'_> {
type Target = Build;
fn deref(&self) -> &Self::Target {

View File

@ -996,7 +996,7 @@ impl<'de> Deserialize<'de> for RustOptimize {
struct OptimizeVisitor;
impl<'de> serde::de::Visitor<'de> for OptimizeVisitor {
impl serde::de::Visitor<'_> for OptimizeVisitor {
type Value = RustOptimize;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
@ -1071,7 +1071,7 @@ impl<'de> Deserialize<'de> for LldMode {
{
struct LldModeVisitor;
impl<'de> serde::de::Visitor<'de> for LldModeVisitor {
impl serde::de::Visitor<'_> for LldModeVisitor {
type Value = LldMode;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

View File

@ -39,17 +39,17 @@ impl PartialEq<str> for Interned<String> {
*self == other
}
}
impl<'a> PartialEq<&'a str> for Interned<String> {
impl PartialEq<&str> for Interned<String> {
fn eq(&self, other: &&str) -> bool {
**self == **other
}
}
impl<'a, T> PartialEq<&'a Interned<T>> for Interned<T> {
impl<T> PartialEq<&Interned<T>> for Interned<T> {
fn eq(&self, other: &&Self) -> bool {
self.0 == other.0
}
}
impl<'a, T> PartialEq<Interned<T>> for &'a Interned<T> {
impl<T> PartialEq<Interned<T>> for &Interned<T> {
fn eq(&self, other: &Interned<T>) -> bool {
self.0 == other.0
}