From 8e4b018e44d9bc7b9ca90a1659a73e69dbaf1936 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 15 Sep 2024 21:03:57 +0900 Subject: [PATCH 1/2] ci: update nightly to nightly-2024-09-15 --- .github/workflows/ci.yml | 5 ++++- ci/miri.sh | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0658a142..d0136c47b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ on: env: RUSTFLAGS: -Dwarnings RUST_BACKTRACE: 1 - nightly: nightly-2022-11-12 + nightly: nightly-2024-09-15 defaults: run: @@ -136,6 +136,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install Rust + run: rustup update $nightly && rustup default $nightly - name: Miri run: ci/miri.sh @@ -160,6 +162,7 @@ jobs: - minrust - cross - tsan + - miri - loom runs-on: ubuntu-latest steps: diff --git a/ci/miri.sh b/ci/miri.sh index 0158756cd..7df29f360 100755 --- a/ci/miri.sh +++ b/ci/miri.sh @@ -1,8 +1,7 @@ #!/bin/bash set -e -rustup toolchain install nightly --component miri -rustup override set nightly +rustup component add miri cargo miri setup export MIRIFLAGS="-Zmiri-strict-provenance" From 9559b4869403c8fa9aee2772153cce6ea10c294c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 15 Sep 2024 21:09:14 +0900 Subject: [PATCH 2/2] fix missing_docs warning for cfg(all(loom, test)) functions ``` error: missing documentation for an associated function --> src/bytes.rs:146:5 | 146 | pub fn new() -> Self { | ^^^^^^^^^^^^^^^^^^^^ | = note: `-D missing-docs` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(missing_docs)]` error: missing documentation for an associated function --> src/bytes.rs:176:5 | 176 | pub fn from_static(bytes: &'static [u8]) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` --- src/bytes.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bytes.rs b/src/bytes.rs index da0ba3a6f..ec95e802d 100644 --- a/src/bytes.rs +++ b/src/bytes.rs @@ -142,6 +142,7 @@ impl Bytes { Bytes::from_static(EMPTY) } + /// Creates a new empty `Bytes`. #[cfg(all(loom, test))] pub fn new() -> Self { const EMPTY: &[u8] = &[]; @@ -172,6 +173,7 @@ impl Bytes { } } + /// Creates a new `Bytes` from a static slice. #[cfg(all(loom, test))] pub fn from_static(bytes: &'static [u8]) -> Self { Bytes {