From 93aa5a969be27e04f1a197e1837482d94873c8a2 Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Wed, 13 Apr 2022 15:25:36 +1000 Subject: [PATCH 1/4] Soft-deprecate this crate --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cc6a0d9..c17da1b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![CI](https://github.com/lambda-fairy/if_chain/actions/workflows/ci.yml/badge.svg)](https://github.com/lambda-fairy/if_chain/actions/workflows/ci.yml) [![Cargo](https://img.shields.io/crates/v/if_chain.svg)](https://crates.io/crates/if_chain) +**If you're using Rust 1.62 or newer, check out [`if let` chains](https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md) instead. This crate is still available for earlier versions of Rust.** + This crate provides a single macro called `if_chain!`. `if_chain!` lets you write long chains of nested `if` and `if let` statements without the associated rightward drift. It also supports multiple patterns (e.g. `if let Foo(a) | Bar(a) = b`) in places where Rust would normally not allow them. From 4d4dd958f5e9dac49ee2339ba04b730fb47af82a Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Wed, 13 Apr 2022 15:26:50 +1000 Subject: [PATCH 2/4] Update lib.rs --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 687935a..a0b786d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,8 @@ //! This crate provides a single macro called `if_chain!`. //! +//! **If you're using Rust 1.62 or newer, check out [`if let` chains][rfc] instead. +//! This crate is still available for earlier versions of Rust.** +//! //! `if_chain!` lets you write long chains of nested `if` and `if let` //! statements without the associated rightward drift. It also supports multiple //! patterns (e.g. `if let Foo(a) | Bar(a) = b`) in places where Rust would @@ -7,6 +10,7 @@ //! //! See the associated [blog post] for the background behind this crate. //! +//! [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md //! [blog post]: https://lambda.xyz/blog/if-chain //! //! # Note about recursion limits From 05607278443bb923539305b95b7332fc7951476b Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Sat, 30 Aug 2025 01:03:49 +1000 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c17da1b..7641715 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/lambda-fairy/if_chain/actions/workflows/ci.yml/badge.svg)](https://github.com/lambda-fairy/if_chain/actions/workflows/ci.yml) [![Cargo](https://img.shields.io/crates/v/if_chain.svg)](https://crates.io/crates/if_chain) -**If you're using Rust 1.62 or newer, check out [`if let` chains](https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md) instead. This crate is still available for earlier versions of Rust.** +**If you're using Rust 1.88 or newer, check out [`if let` chains](https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#let-chains) instead. This crate is still available for earlier versions of Rust.** This crate provides a single macro called `if_chain!`. From e9da8197aaf507496a8bfc382491ba3c6a8fec95 Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Sat, 30 Aug 2025 01:04:46 +1000 Subject: [PATCH 4/4] Update lib.rs --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a0b786d..883b78a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ //! This crate provides a single macro called `if_chain!`. //! -//! **If you're using Rust 1.62 or newer, check out [`if let` chains][rfc] instead. +//! **If you're using Rust 1.88 or newer, check out [`if let` chains][rust] instead. //! This crate is still available for earlier versions of Rust.** //! //! `if_chain!` lets you write long chains of nested `if` and `if let` @@ -10,7 +10,7 @@ //! //! See the associated [blog post] for the background behind this crate. //! -//! [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md +//! [rust]: https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#let-chains //! [blog post]: https://lambda.xyz/blog/if-chain //! //! # Note about recursion limits