Skip to content

Commit 414318d

Browse files
authored
[meta] update rust to 1.84 (#7334)
We're moving three versions ahead, so this is something we should do with some caution. However there's at least one important illumos-specific fix that's in 1.84 (rust-lang/rust#132984) so we should definitely move over. I've verified that rust-lang/rust#132064 no longer affects us. To be more precise, its impact has been mostly taken care of -- there's still a small regression, see [this comment](rust-lang/rust#132064 (comment)), but the Rust team has said it's one that should get better in the next few months.
1 parent 90898fb commit 414318d

File tree

42 files changed

+99
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+99
-113
lines changed

clients/dpd-client/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// That test passes for code that lives in omicron, but fails for code imported
1010
// by omicron.
1111
#![allow(rustdoc::broken_intra_doc_links)]
12-
// Temporary workaround while Rust is being updated to 1.84.
13-
#![allow(unknown_lints)]
1412

1513
use std::net::IpAddr;
1614

cockroach-admin/types/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ where
7575
D: serde::Deserializer<'de>,
7676
{
7777
struct CockroachTimestampVisitor;
78-
impl<'de> de::Visitor<'de> for CockroachTimestampVisitor {
78+
impl de::Visitor<'_> for CockroachTimestampVisitor {
7979
type Value = DateTime<Utc>;
8080

8181
fn expecting(
@@ -185,7 +185,7 @@ where
185185
{
186186
struct CockroachNodeMembershipVisitor;
187187

188-
impl<'de> de::Visitor<'de> for CockroachNodeMembershipVisitor {
188+
impl de::Visitor<'_> for CockroachNodeMembershipVisitor {
189189
type Value = NodeMembership;
190190

191191
fn expecting(

common/src/api/external/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl MessagePair {
147147

148148
struct MessagePairDisplayInternal<'a>(&'a MessagePair);
149149

150-
impl<'a> Display for MessagePairDisplayInternal<'a> {
150+
impl Display for MessagePairDisplayInternal<'_> {
151151
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
152152
write!(f, "{}", self.0.external_message)?;
153153
if !self.0.internal_context.is_empty() {

dev-tools/downloader/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ async fn download_file_and_verify(
458458
Ok(())
459459
}
460460

461-
impl<'a> Downloader<'a> {
461+
impl Downloader<'_> {
462462
async fn download_cargo_hack(&self) -> Result<()> {
463463
let os = os_name()?;
464464
let arch = arch()?;

dev-tools/omdb/src/bin/omdb/mgs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ fn show_sp_ids(sp_ids: &[SpIdentifier]) -> Result<(), anyhow::Error> {
197197
slot: u32,
198198
}
199199

200-
impl<'a> From<&'a SpIdentifier> for SpIdRow {
200+
impl From<&SpIdentifier> for SpIdRow {
201201
fn from(id: &SpIdentifier) -> Self {
202202
SpIdRow { type_: sp_type_to_str(&id.type_), slot: id.slot }
203203
}
@@ -224,7 +224,7 @@ fn show_sps_from_ignition(
224224
system_type: String,
225225
}
226226

227-
impl<'a> From<&'a SpIgnitionInfo> for IgnitionRow {
227+
impl From<&SpIgnitionInfo> for IgnitionRow {
228228
fn from(value: &SpIgnitionInfo) -> Self {
229229
IgnitionRow {
230230
type_: sp_type_to_str(&value.id.type_),

dev-tools/releng/src/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl Job {
164164
}
165165
}
166166

167-
impl<'a> Selector<'a> {
167+
impl Selector<'_> {
168168
#[track_caller]
169169
pub(crate) fn after(self, other: impl AsRef<str>) -> Self {
170170
let (sender, receiver) = oneshot::channel();

dns-server/src/storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ struct UpdateGuard<'store, 'req_id> {
711711
finished: bool,
712712
}
713713

714-
impl<'a, 'b> UpdateGuard<'a, 'b> {
714+
impl UpdateGuard<'_, '_> {
715715
async fn finish(mut self) {
716716
let store = self.store;
717717
let mut update = store.updating.lock().await;
@@ -732,7 +732,7 @@ impl<'a, 'b> UpdateGuard<'a, 'b> {
732732
}
733733
}
734734

735-
impl<'a, 'b> Drop for UpdateGuard<'a, 'b> {
735+
impl Drop for UpdateGuard<'_, '_> {
736736
fn drop(&mut self) {
737737
// UpdateGuard exists because we must enforce at most one Update is
738738
// happening at a time, but we also want to catch the case where an

illumos-utils/src/svc.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ mod inner {
2525
// properties to not exist when the command returns.
2626
//
2727
// We workaround this by querying for these properties in a loop.
28-
pub async fn wait_for_service<'a, 'b>(
28+
//
29+
// TODO: remove this when clippy no longer flags
30+
// https://github.com/rust-lang/rust-clippy/issues/13923 (ideally we'd have
31+
// used `expect` but on 1.84, it says that it's unfulfilled even though it
32+
// is fulfilled?)
33+
#[allow(clippy::needless_lifetimes)]
34+
pub async fn wait_for_service<'a>(
2935
zone: Option<&'a str>,
30-
fmri: &'b str,
36+
fmri: &str,
3137
log: Logger,
3238
) -> Result<(), Error> {
3339
let name = smf::PropertyName::new("restarter", "state").unwrap();

installinator/src/write.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ struct SlotWriteContext<'a> {
352352
progress: DriveWriteProgress,
353353
}
354354

355-
impl<'a> SlotWriteContext<'a> {
355+
impl SlotWriteContext<'_> {
356356
fn register_steps<'b>(
357357
&'b self,
358358
engine: &UpdateEngine<'b, WriteSpec>,
@@ -518,12 +518,12 @@ struct ArtifactsToWrite<'a> {
518518

519519
impl ArtifactsToWrite<'_> {
520520
/// Attempt to write the host phase 2 image.
521-
async fn write_host_phase_2<'b, WT: WriteTransport>(
521+
async fn write_host_phase_2<WT: WriteTransport>(
522522
&self,
523523
log: &Logger,
524524
slot: M2Slot,
525525
destinations: &ArtifactDestination,
526-
transport: &'b mut WT,
526+
transport: &mut WT,
527527
cx: &StepContext<WriteSpec>,
528528
) -> Result<StepResult<Option<usize>, WriteSpec>, WriteError> {
529529
let block_size = write_artifact_impl(

internal-dns/types/src/diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<'a> DnsDiff<'a> {
136136
}
137137
}
138138

139-
impl<'a> std::fmt::Display for DnsDiff<'a> {
139+
impl std::fmt::Display for DnsDiff<'_> {
140140
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
141141
let names_changed = !self.is_empty();
142142
let zone_name = &self.zone_name;

0 commit comments

Comments
 (0)