diff --git a/.github/workflows/der.yml b/.github/workflows/der.yml index 1b9dd849e..f99fe2cad 100644 --- a/.github/workflows/der.yml +++ b/.github/workflows/der.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: # 32-bit Linux - target: i686-unknown-linux-gnu platform: ubuntu-latest - rust: 1.60.0 # MSRV + rust: 1.65.0 # MSRV deps: sudo apt update && sudo apt install gcc-multilib - target: i686-unknown-linux-gnu platform: ubuntu-latest @@ -62,7 +62,7 @@ jobs: # 64-bit Linux - target: x86_64-unknown-linux-gnu platform: ubuntu-latest - rust: 1.60.0 # MSRV + rust: 1.65.0 # MSRV - target: x86_64-unknown-linux-gnu platform: ubuntu-latest rust: stable @@ -71,7 +71,7 @@ jobs: # 64-bit Windows #- target: x86_64-pc-windows-msvc # platform: windows-latest - # rust: 1.60.0 # MSRV + # rust: 1.65.0 # MSRV #- target: x86_64-pc-windows-msvc # platform: windows-latest # rust: stable @@ -93,7 +93,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pkcs1.yml b/.github/workflows/pkcs1.yml index 313cd503e..11bf4d36a 100644 --- a/.github/workflows/pkcs1.yml +++ b/.github/workflows/pkcs1.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pkcs5.yml b/.github/workflows/pkcs5.yml index 287906144..65afa20ed 100644 --- a/.github/workflows/pkcs5.yml +++ b/.github/workflows/pkcs5.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pkcs7.yml b/.github/workflows/pkcs7.yml index c17c3c2aa..a572bacd9 100644 --- a/.github/workflows/pkcs7.yml +++ b/.github/workflows/pkcs7.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -51,7 +51,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pkcs8.yml b/.github/workflows/pkcs8.yml index fb44bba60..bcddf24e8 100644 --- a/.github/workflows/pkcs8.yml +++ b/.github/workflows/pkcs8.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -54,7 +54,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/sec1.yml b/.github/workflows/sec1.yml index 2ff267ad6..3b7ab8b88 100644 --- a/.github/workflows/sec1.yml +++ b/.github/workflows/sec1.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -53,7 +53,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/spki.yml b/.github/workflows/spki.yml index 42febe6ba..bf0bc4419 100644 --- a/.github/workflows/spki.yml +++ b/.github/workflows/spki.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/x509-cert.yml b/.github/workflows/x509-cert.yml index cb693bce3..70cacf336 100644 --- a/.github/workflows/x509-cert.yml +++ b/.github/workflows/x509-cert.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -52,7 +52,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.65.0 # MSRV - stable steps: - uses: actions/checkout@v3 diff --git a/Cargo.lock b/Cargo.lock index 923bac874..50ae300a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -304,7 +304,6 @@ dependencies = [ "hex-literal", "pem-rfc7468", "proptest", - "rustversion", "time", "zeroize", ] @@ -982,12 +981,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustversion" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" - [[package]] name = "rusty-fork" version = "0.3.0" @@ -1140,7 +1133,6 @@ dependencies = [ "base64ct", "der", "hex-literal", - "rustversion", "sha2", "tempfile", ] diff --git a/der/Cargo.toml b/der/Cargo.toml index 6fe2e3354..7421eee57 100644 --- a/der/Cargo.toml +++ b/der/Cargo.toml @@ -20,7 +20,6 @@ const-oid = { version = "=0.10.0-pre", optional = true, path = "../const-oid" } der_derive = { version = "=0.7.0-pre", optional = true, path = "derive" } flagset = { version = "0.4.3", optional = true } pem-rfc7468 = { version = "0.6", optional = true, path = "../pem-rfc7468" } -rustversion = "1.0" time = { version = "0.3.4", optional = true, default-features = false } zeroize = { version = "1.5", optional = true, default-features = false, features = ["alloc"] } diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 89d3b40bf..be15e7590 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -295,7 +295,6 @@ where } } -#[rustversion::since(1.65)] // Generic associated types support is required #[cfg(feature = "alloc")] mod feature_alloc { use super::*; diff --git a/der/src/asn1/bit_string.rs b/der/src/asn1/bit_string.rs index 66d576ad2..d8e64cc2f 100644 --- a/der/src/asn1/bit_string.rs +++ b/der/src/asn1/bit_string.rs @@ -337,7 +337,6 @@ impl ValueOrd for BitString { } } -#[rustversion::since(1.65)] // Generic associated types support is required #[cfg(feature = "alloc")] mod feature_alloc { use super::*; diff --git a/der/src/referenced.rs b/der/src/referenced.rs index bca10004b..dc9a5f3af 100644 --- a/der/src/referenced.rs +++ b/der/src/referenced.rs @@ -1,7 +1,6 @@ //! A module for working with referenced data. /// A trait for borrowing data from an owned struct -#[rustversion::since(1.65)] // Generic associated types support is required pub trait OwnedToRef { /// The resulting type referencing back to Self type Borrowed<'a> @@ -15,7 +14,6 @@ pub trait OwnedToRef { /// A trait for cloning a referenced structure and getting owned objects /// /// This is the pendant to [`OwnedToRef`] -#[rustversion::since(1.65)] // Generic associated types support is required pub trait RefToOwned<'a> { /// The resulting type after obtaining ownership. type Owned: OwnedToRef = Self> @@ -26,26 +24,17 @@ pub trait RefToOwned<'a> { fn to_owned(&self) -> Self::Owned; } -#[rustversion::since(1.65)] // Generic associated types support is required impl OwnedToRef for Option where T: OwnedToRef, { - // TODO: when upgrading to rust 1.65, we can use the new syntax - // MSRV 1.60 requires us to use the old syntax - #[allow(unknown_lints)] - #[allow(deprecated_where_clause_location)] - type Borrowed<'a> - where - T: 'a, - = Option>; + type Borrowed<'a> = Option> where T: 'a; fn to_ref(&self) -> Self::Borrowed<'_> { self.as_ref().map(|o| o.to_ref()) } } -#[rustversion::since(1.65)] // Generic associated types support is required impl<'a, T> RefToOwned<'a> for Option where T: RefToOwned<'a> + 'a, diff --git a/spki/Cargo.toml b/spki/Cargo.toml index 0339a65cb..baaf31262 100644 --- a/spki/Cargo.toml +++ b/spki/Cargo.toml @@ -16,7 +16,6 @@ rust-version = "1.57" [dependencies] der = { version = "=0.7.0-pre", features = ["oid"], path = "../der" } -rustversion = "1.0" # Optional dependencies sha2 = { version = "0.10", optional = true, default-features = false } diff --git a/spki/src/algorithm.rs b/spki/src/algorithm.rs index ee18caa83..1656792ea 100644 --- a/spki/src/algorithm.rs +++ b/spki/src/algorithm.rs @@ -155,7 +155,6 @@ impl<'a> AlgorithmIdentifierRef<'a> { } } -#[rustversion::since(1.65)] // Generic associated types support is required #[cfg(feature = "alloc")] mod feature_alloc { use super::*; diff --git a/spki/src/spki.rs b/spki/src/spki.rs index 0ce2f7952..43114a3cb 100644 --- a/spki/src/spki.rs +++ b/spki/src/spki.rs @@ -174,7 +174,6 @@ impl PemLabel for SubjectPublicKeyInfo { const PEM_LABEL: &'static str = "PUBLIC KEY"; } -#[rustversion::since(1.65)] // Generic associated types support is required #[cfg(feature = "alloc")] mod feature_alloc { use super::*;