diff --git a/crates/tor-basic-utils/semver.md b/crates/tor-basic-utils/semver.md new file mode 100644 index 0000000000000000000000000000000000000000..1d78aafd630756dcbe3c8faea97306ed3b376714 --- /dev/null +++ b/crates/tor-basic-utils/semver.md @@ -0,0 +1,2 @@ +BREAKING: Removed flatten(). + diff --git a/crates/tor-basic-utils/src/lib.rs b/crates/tor-basic-utils/src/lib.rs index 9093d61e4266c7c6432091eb30e2c3cce45821d0..75d6090d638a991af443be66a6a8f2843ff19f53 100644 --- a/crates/tor-basic-utils/src/lib.rs +++ b/crates/tor-basic-utils/src/lib.rs @@ -111,7 +111,7 @@ pub fn iter_join( separator: &str, iter: impl Iterator + Clone, ) -> impl fmt::Display { - // TODO: This can be replaced with `std::fmt::from_fn()` once stabilised and within our MSRV. + // TODO MSRV 1.93: Replace with `std::fmt::from_fn()`? struct Fmt<'a, I: Iterator + Clone> { /// Separates items in `iter`. separator: &'a str, @@ -578,21 +578,6 @@ macro_rules! derive_serde_raw { { // ---------------------------------------------------------------------- -/// Flatten a `Result, E>` into a `Result`. -/// -/// See [`Result::flatten`], which is not available -/// at our current MSRV. -// TODO MSRV 1.89: When our MSRV is at least 1.89, -// remove this function and replace uses with `Result::flatten`. -pub fn flatten(x: Result, E>) -> Result { - match x { - Ok(Ok(x)) => Ok(x), - Err(e) | Ok(Err(e)) => Err(e), - } -} - -// ---------------------------------------------------------------------- - /// Asserts that the type of the expression implements the given trait. /// /// Example: diff --git a/crates/tor-config/src/derive.rs b/crates/tor-config/src/derive.rs index 9363643bf05c2a3201c3bd2683c7dae3b5d4b547..b78e43d1db91849f55a1a8c4fec2fe934bb1bab4 100644 --- a/crates/tor-config/src/derive.rs +++ b/crates/tor-config/src/derive.rs @@ -2506,17 +2506,15 @@ mod test { #[derive(Deftly, Clone, Debug, PartialEq)] #[derive_deftly(TorConfig)] pub(super) struct CfgEnabled { - // MSRV 1.88: Use "true" instead. #[deftly(tor_config( default, - cfg = "all()", + cfg = "true", cfg_desc = "with eschaton immenentization" ))] pub(super) flower_power: u32, - // MSRV 1.88: Use "true" instead. #[deftly(tor_config( default, - cfg = "all()", + cfg = "true", cfg_reject, cfg_desc = "with eschaton immenentization" ))] @@ -2526,16 +2524,15 @@ mod test { #[derive(Deftly, Clone, Debug, PartialEq)] #[derive_deftly(TorConfig)] pub(super) struct CfgDisabled { - // MSRV 1.88: Use "false" instead. #[deftly(tor_config( default, - cfg = "any()", + cfg = "false", cfg_desc = "with resublimated thiotimoline" ))] pub(super) time_travel: u32, #[deftly(tor_config( default, - cfg = "any()", + cfg = "false", cfg_reject, cfg_desc = "with resublimated thiotimoline" ))] diff --git a/crates/tor-hsservice/src/config.rs b/crates/tor-hsservice/src/config.rs index 1258c0ffa1434e5c76cadffd8ab27789ef75dd95..6eb7d856ebca0ba9b568d2fa8da2568636310638 100644 --- a/crates/tor-hsservice/src/config.rs +++ b/crates/tor-hsservice/src/config.rs @@ -16,9 +16,9 @@ pub mod restricted_discovery; // Only exported with pub visibility if the restricted-discovery feature is enabled. #[cfg(not(feature = "restricted-discovery"))] -// Use cfg(all()) to prevent this from being documented as +// Use cfg(true) to prevent this from being documented as // "Available on non-crate feature `restricted-discovery` only" -#[cfg_attr(docsrs, doc(cfg(all())))] +#[cfg_attr(docsrs, doc(cfg(true)))] pub(crate) mod restricted_discovery; /// Configuration for one onion service. diff --git a/crates/tor-llcrypto/src/cipher.rs b/crates/tor-llcrypto/src/cipher.rs index 66fc9d2b44230e047dba2f864594f10e3c642144..27d54503f113728e12f330e1a6b5c041e235e1ee 100644 --- a/crates/tor-llcrypto/src/cipher.rs +++ b/crates/tor-llcrypto/src/cipher.rs @@ -7,7 +7,7 @@ /// /// These ciphers implement the `cipher::StreamCipher` trait, so use /// the [`cipher`](https://docs.rs/cipher) crate to access them. -#[cfg_attr(docsrs, doc(cfg(all())))] +#[cfg_attr(docsrs, doc(cfg(true)))] #[cfg(not(feature = "with-openssl"))] pub mod aes { // These implement StreamCipher. @@ -22,7 +22,7 @@ pub mod aes { /// /// These ciphers implement the `cipher::StreamCipher` trait, so use /// the [`cipher`](https://docs.rs/cipher) crate to access them. -#[cfg_attr(docsrs, doc(cfg(all())))] +#[cfg_attr(docsrs, doc(cfg(true)))] #[cfg(feature = "with-openssl")] pub mod aes { use cipher::generic_array::GenericArray; diff --git a/crates/tor-proto/src/util/poll_all.rs b/crates/tor-proto/src/util/poll_all.rs index 556d9734a0cc5194a4aae7823f8b472974e2f504..904e7861d8cfd8679a0f96b8104e7871591d2677 100644 --- a/crates/tor-proto/src/util/poll_all.rs +++ b/crates/tor-proto/src/util/poll_all.rs @@ -151,12 +151,6 @@ mod test { fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { self.poll_count += 1; - // TODO MSRV 1.87: Remove this allow. - #[allow( - clippy::comparison_chain, - reason = "This is more readable than a match, and the lint is - moved to clippy::pedantic in 1.87." - )] if self.poll_count == self.resolve_after { Poll::Ready(self.resolve_after) } else if self.poll_count > self.resolve_after { diff --git a/doc/dev/SecurityResponse.md b/doc/dev/SecurityResponse.md index c59880104161743ab77ff95145f84144e089c401..1f71226ac0287d7dd2f82c2b477a949b745e8e7a 100644 --- a/doc/dev/SecurityResponse.md +++ b/doc/dev/SecurityResponse.md @@ -55,7 +55,7 @@ anywhere in our whole stack. and check out the tag for the version we're using. * Use cargo's `[patch]` mechanism to redirect all uses of that crate, to the one you've just checked out. - * Put `#![cfg(any())]` at the top of the affected crate's `lib.rs` + * Put `#![cfg(false)]` at the top of the affected crate's `lib.rs` and verify that that breaks the build. Now you know the `patch` is effective. * Somehow sabotage the affected method, eg by deleting or renaming it.