Skip to content

Commit

Permalink
Fix clippy::needless-lifetimes in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Oct 16, 2024
1 parent 618b0cb commit cd60224
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/src/utils/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit cd60224

Please sign in to comment.