Skip to content

Fix if-let chains for compilation on rustc v1.85#28

Closed
trevarj wants to merge 1 commit into
rust-lang:mainfrom
trevarj:fix_build_rustc-1.85
Closed

Fix if-let chains for compilation on rustc v1.85#28
trevarj wants to merge 1 commit into
rust-lang:mainfrom
trevarj:fix_build_rustc-1.85

Conversation

@trevarj

@trevarj trevarj commented Feb 2, 2026

Copy link
Copy Markdown

if-let chains are unstable until 1.88, so rewrite in a more functional way that
keeps the same logic and allows compilation on earlier rustc versions.

if-let chains are unstable until 1.88, so rewrite in a more functional way that
keeps the same logic and allows compilation on earlier rustc versions.
@trevarj trevarj force-pushed the fix_build_rustc-1.85 branch from 0870a9f to df80dcd Compare February 2, 2026 13:46
@trevarj

trevarj commented Feb 2, 2026

Copy link
Copy Markdown
Author

I think the clippy error regarding is_multiple_of_2 can be safely ignored, since it is also not on older rustc versions.

@bjorn3

bjorn3 commented Feb 2, 2026

Copy link
Copy Markdown
Member

What do you want to use ar_archive_writer for that you need support for older rustc versions? This crate was created to be used as dependency of rustc itself, which is always compiled with a single fixed rustc version.

@trevarj

trevarj commented Feb 2, 2026

Copy link
Copy Markdown
Author

@bjorn3

What do you want to use ar_archive_writer for that you need support for older rustc versions?

It is deeply nested in a dependency of a library I want to use.

➜ cargo tree -i ar_archive_writer
ar_archive_writer v0.5.1
└── psm v0.1.29
    └── stacker v0.1.22
        └── teloxide-core v0.13.0
            └── teloxide v0.17.0

This crate was created to be used as dependency of rustc itself, which is always compiled with a single fixed rustc version.

I see. That makes sense.

Not a problem though! You can close this then and I will just [patch] using my fork. Thanks

@bjorn3

bjorn3 commented Feb 2, 2026

Copy link
Copy Markdown
Member

I wasn't aware that psm used ar_archive_writer. Looks like it was added in rust-lang/stacker#128, breaking the stated MSRV of 1.63: rust-lang/stacker#139

@bjorn3

bjorn3 commented Jun 9, 2026

Copy link
Copy Markdown
Member

#33 added `rust-version = "1.88". For stacker this should be enough to force using an older version of ar_archive_writer if necessary.

@bjorn3 bjorn3 closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants