diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c72a07e3b04e..409686883ae6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -420,8 +420,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/rust-toolchain@master with: + toolchain: nightly-2024-02-08 components: "rust-src" - name: Cache cargo registry uses: Swatinem/rust-cache@v2 @@ -429,20 +430,20 @@ jobs: key: sqlite_bundled-cargo-${{ hashFiles('**/Cargo.toml') }} - name: Test diesel-cli - run: cargo +nightly test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "sqlite-bundled" + run: cargo +${{steps.toolchain.outputs.name} test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "sqlite-bundled" - name: Run diesel_tests with ASAN enabled env: RUSTFLAGS: -Zsanitizer=address ASAN_OPTIONS: detect_stack_use_after_return=1 - run: cargo +nightly -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "sqlite libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu + run: cargo +${{steps.toolchain.outputs.name} -Z build-std test --manifest-path diesel_tests/Cargo.toml --no-default-features --features "sqlite libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu - name: Run diesel tests with ASAN enabled env: RUSTDOCFLAGS: -Zsanitizer=address RUSTFLAGS: -Zsanitizer=address ASAN_OPTIONS: detect_stack_use_after_return=1 - run: cargo +nightly -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "sqlite extras libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu + run: cargo +${{steps.toolchain.outputs.name} -Z build-std test --manifest-path diesel/Cargo.toml --no-default-features --features "sqlite extras libsqlite3-sys libsqlite3-sys/bundled libsqlite3-sys/with-asan" --target x86_64-unknown-linux-gnu minimal_rust_version: name: Check Minimal supported rust version (1.70.0) diff --git a/diesel/src/pg/types/json.rs b/diesel/src/pg/types/json.rs index 059c86341ae6..9f43addf5e2e 100644 --- a/diesel/src/pg/types/json.rs +++ b/diesel/src/pg/types/json.rs @@ -46,9 +46,13 @@ impl ToSql for serde_json::Value { } } -#[cfg(tests)] +#[cfg(test)] mod tests { - use crate::query_builder::bind_types::ByteWrapper; + use crate::deserialize::FromSql; + use crate::pg::{Pg, PgValue}; + use crate::query_builder::bind_collector::ByteWrapper; + use crate::serialize::{Output, ToSql}; + use crate::sql_types; #[test] fn json_to_sql() { diff --git a/rust-toolchain b/rust-toolchain index 7c7053aa2388..32a6ce3c719b 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.75.0 +1.76.0