Skip to content

Commit 9528dd0

Browse files
authored
Merge pull request #2042 from Kobzol/bump-msrv
Bump MSRV to 1.81
2 parents bf70880 + dea9f1e commit 9528dd0

File tree

18 files changed

+31
-42
lines changed

18 files changed

+31
-42
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- master
6-
pull_request: {}
6+
pull_request: { }
77
schedule:
88
- cron: "0 12 * * 1" # Every Monday at 12:00 UTC
99

@@ -26,7 +26,7 @@ jobs:
2626
rustup default $RUST_TOOLCHAIN_VERSION
2727
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
2828
env:
29-
RUST_TOOLCHAIN_VERSION: 1.75.0
29+
RUST_TOOLCHAIN_VERSION: 1.81.0
3030

3131
- uses: Swatinem/rust-cache@v2
3232
with:

collector/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "collector"
44
version = "0.1.0"
55
edition = "2021"
66
description = "Collects Rust performance data"
7-
rust-version = "1.75.0"
7+
rust-version = "1.81.0"
88

99
[dependencies]
1010
anyhow = { workspace = true }

collector/src/artifact_stats.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ impl ArtifactStats {
107107
/// Normalizes the following things, in the following order:
108108
/// - Demangles the symbol.
109109
/// - Removes `.cold` and `.warm` from the end of the symbol, to merge cold and hot parts of a function
110-
/// into the same symbol.
110+
/// into the same symbol.
111111
/// - Removes rustc hashes from the symbol, e.g. `foo::[abcdef]` -> `foo::[]` or
112-
/// `foo::abcd` -> `foo`.
112+
/// `foo::abcd` -> `foo`.
113113
/// - Removes suffixes after a dot from the symbol, e.g. `anon.abcdef.123` -> `anon` or
114-
/// `foo.llvm.123` -> `foo`.
114+
/// `foo.llvm.123` -> `foo`.
115115
///
116116
/// These modifications should remove things added by LLVM in the LTO/PGO phase.
117117
/// See more information here: https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html#vendor-specific-suffix

collector/src/bin/rustc-fake.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,7 @@ fn main() {
118118

119119
let prof_out_dir = create_self_profile_dir();
120120
if wrapper == "PerfStatSelfProfile" {
121-
cmd.arg(&format!(
122-
"-Zself-profile={}",
123-
prof_out_dir.to_str().unwrap()
124-
));
121+
cmd.arg(format!("-Zself-profile={}", prof_out_dir.to_str().unwrap()));
125122
let _ = fs::remove_dir_all(&prof_out_dir);
126123
let _ = fs::create_dir_all(&prof_out_dir);
127124
}
@@ -189,10 +186,7 @@ fn main() {
189186

190187
let prof_out_dir = create_self_profile_dir();
191188
if wrapper == "XperfStatSelfProfile" {
192-
tool.arg(&format!(
193-
"-Zself-profile={}",
194-
prof_out_dir.to_str().unwrap()
195-
));
189+
tool.arg(format!("-Zself-profile={}", prof_out_dir.to_str().unwrap()));
196190
let _ = fs::remove_dir_all(&prof_out_dir);
197191
let _ = fs::create_dir_all(&prof_out_dir);
198192
}

collector/src/compile/execute/bencher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'a> BenchProcessor<'a> {
120120
}
121121
}
122122

123-
impl<'a> Processor for BenchProcessor<'a> {
123+
impl Processor for BenchProcessor<'_> {
124124
fn perf_tool(&self) -> PerfTool {
125125
if self.is_first_collection && self.is_self_profile {
126126
if cfg!(unix) {
@@ -309,7 +309,7 @@ impl SelfProfileS3Upload {
309309
.arg("INTELLIGENT_TIERING")
310310
.arg("--only-show-errors")
311311
.arg(upload.path())
312-
.arg(&format!(
312+
.arg(format!(
313313
"s3://rustc-perf/{}",
314314
&prefix.join(filename).to_str().unwrap()
315315
))

collector/src/compile/execute/mod.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,7 @@ fn process_stat_output(
583583
// In any case it's better than crashing the collector and looping indefinitely trying
584584
// to to complete a run -- which happens if we propagate `parse_self_profile`'s errors
585585
// up to the caller.
586-
if let Ok(self_profile_data) = parse_self_profile(dir, krate) {
587-
self_profile_data
588-
} else {
589-
(None, None)
590-
}
586+
parse_self_profile(dir, krate).unwrap_or_default()
591587
}
592588
_ => (None, None),
593589
};
@@ -640,9 +636,11 @@ fn parse_self_profile(
640636
// `perf` pid. So just blindly look in the directory to hopefully find it.
641637
for entry in fs::read_dir(dir)? {
642638
let entry = entry?;
643-
if entry.file_name().to_str().map_or(false, |s| {
644-
s.starts_with(&crate_name) && s.ends_with("mm_profdata")
645-
}) {
639+
if entry
640+
.file_name()
641+
.to_str()
642+
.is_some_and(|s| s.starts_with(&crate_name) && s.ends_with("mm_profdata"))
643+
{
646644
full_path = Some(entry.path());
647645
break;
648646
}

collector/src/compile/execute/profiler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<'a> ProfileProcessor<'a> {
106106
}
107107
}
108108

109-
impl<'a> Processor for ProfileProcessor<'a> {
109+
impl Processor for ProfileProcessor<'_> {
110110
fn perf_tool(&self) -> PerfTool {
111111
PerfTool::ProfileTool(self.profiler)
112112
}

collector/src/compile/execute/rustc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ async fn record(
9191
.arg("--set")
9292
.arg("rust.deny-warnings=false")
9393
.arg("--set")
94-
.arg(&format!("build.rustc={}", fake_rustc.to_str().unwrap()))
94+
.arg(format!("build.rustc={}", fake_rustc.to_str().unwrap()))
9595
.env("RUSTC_PERF_REAL_RUSTC", &toolchain.components.rustc)
9696
.arg("--set")
97-
.arg(&format!(
97+
.arg(format!(
9898
"build.cargo={}",
9999
toolchain.components.cargo.to_str().unwrap()
100100
))

collector/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<'de> Deserialize<'de> for Bound {
8585
{
8686
struct BoundVisitor;
8787

88-
impl<'de> serde::de::Visitor<'de> for BoundVisitor {
88+
impl serde::de::Visitor<'_> for BoundVisitor {
8989
type Value = Bound;
9090

9191
fn visit_str<E>(self, value: &str) -> ::std::result::Result<Bound, E>

database/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'de> Deserialize<'de> for Date {
113113
{
114114
struct DateVisitor;
115115

116-
impl<'de> serde::de::Visitor<'de> for DateVisitor {
116+
impl serde::de::Visitor<'_> for DateVisitor {
117117
type Value = Date;
118118

119119
fn visit_str<E>(self, value: &str) -> ::std::result::Result<Date, E>

0 commit comments

Comments
 (0)