diff -Nru rust-memoffset-0.6.4/Cargo.toml rust-memoffset-0.6.5/Cargo.toml --- rust-memoffset-0.6.4/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/Cargo.toml 1970-01-01 00:00:01.000000000 +0000 @@ -3,16 +3,15 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] name = "memoffset" -version = "0.6.4" +version = "0.6.5" authors = ["Gilad Naaman "] description = "offset_of functionality for Rust structs." readme = "README.md" diff -Nru rust-memoffset-0.6.4/Cargo.toml.orig rust-memoffset-0.6.5/Cargo.toml.orig --- rust-memoffset-0.6.4/Cargo.toml.orig 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/Cargo.toml.orig 1973-11-29 21:33:09.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "memoffset" -version = "0.6.4" +version = "0.6.5" authors = ["Gilad Naaman "] description = "offset_of functionality for Rust structs." license = "MIT" diff -Nru rust-memoffset-0.6.4/.cargo_vcs_info.json rust-memoffset-0.6.5/.cargo_vcs_info.json --- rust-memoffset-0.6.4/.cargo_vcs_info.json 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/.cargo_vcs_info.json 1970-01-01 00:00:01.000000000 +0000 @@ -1,5 +1,5 @@ { "git": { - "sha1": "bbd58f2cbe92d3424d8c3161c46dd5d022c30437" + "sha1": "01e2e42ef0d833682c27b0f40a2cc748d86b2dc3" } } diff -Nru rust-memoffset-0.6.4/debian/cargo-checksum.json rust-memoffset-0.6.5/debian/cargo-checksum.json --- rust-memoffset-0.6.4/debian/cargo-checksum.json 2021-11-28 21:07:15.000000000 +0000 +++ rust-memoffset-0.6.5/debian/cargo-checksum.json 2022-06-27 17:02:25.000000000 +0000 @@ -1 +1 @@ -{"package":"59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9","files":{}} +{"package":"5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce","files":{}} diff -Nru rust-memoffset-0.6.4/debian/changelog rust-memoffset-0.6.5/debian/changelog --- rust-memoffset-0.6.4/debian/changelog 2021-11-28 21:07:15.000000000 +0000 +++ rust-memoffset-0.6.5/debian/changelog 2022-06-27 17:02:25.000000000 +0000 @@ -1,3 +1,11 @@ +rust-memoffset (0.6.5-1) unstable; urgency=medium + + * Team upload. + * Package memoffset 0.6.5 from crates.io using debcargo 2.5.0 + + fixes building the "unstable_const" feature with rustc 1.59 + + -- Peter Michael Green Mon, 27 Jun 2022 17:02:25 +0000 + rust-memoffset (0.6.4-1) unstable; urgency=medium * Team upload. diff -Nru rust-memoffset-0.6.4/debian/control rust-memoffset-0.6.5/debian/control --- rust-memoffset-0.6.4/debian/control 2021-11-28 21:07:15.000000000 +0000 +++ rust-memoffset-0.6.5/debian/control 2022-06-27 17:02:25.000000000 +0000 @@ -2,7 +2,7 @@ Section: rust Priority: optional Build-Depends: debhelper (>= 12), - dh-cargo (>= 24), + dh-cargo (>= 25), cargo:native , rustc:native , libstd-rust-dev , @@ -30,9 +30,9 @@ librust-memoffset-0.6-dev (= ${binary:Version}), librust-memoffset-0.6+default-dev (= ${binary:Version}), librust-memoffset-0.6+unstable-const-dev (= ${binary:Version}), - librust-memoffset-0.6.4-dev (= ${binary:Version}), - librust-memoffset-0.6.4+default-dev (= ${binary:Version}), - librust-memoffset-0.6.4+unstable-const-dev (= ${binary:Version}) + librust-memoffset-0.6.5-dev (= ${binary:Version}), + librust-memoffset-0.6.5+default-dev (= ${binary:Version}), + librust-memoffset-0.6.5+unstable-const-dev (= ${binary:Version}) Description: Offset_of functionality for Rust structs - Rust source code This package contains the source for the Rust memoffset crate, packaged by debcargo for use with cargo and dh-cargo. diff -Nru rust-memoffset-0.6.4/debian/copyright rust-memoffset-0.6.5/debian/copyright --- rust-memoffset-0.6.4/debian/copyright 2021-11-28 21:07:15.000000000 +0000 +++ rust-memoffset-0.6.5/debian/copyright 2022-06-27 17:02:25.000000000 +0000 @@ -4,12 +4,12 @@ Source: https://github.com/Gilnaa/memoffset Files: * -Copyright: 2017-2018 Gilad Naaman +Copyright: 2017-2021 Gilad Naaman License: MIT Files: debian/* Copyright: - 2018-2019 Debian Rust Maintainers + 2018-2022 Debian Rust Maintainers 2018-2019 Wolfgang Silbermayr License: MIT diff -Nru rust-memoffset-0.6.4/debian/copyright.debcargo.hint rust-memoffset-0.6.5/debian/copyright.debcargo.hint --- rust-memoffset-0.6.4/debian/copyright.debcargo.hint 2021-11-28 21:07:15.000000000 +0000 +++ rust-memoffset-0.6.5/debian/copyright.debcargo.hint 2022-06-27 17:02:25.000000000 +0000 @@ -49,8 +49,8 @@ Files: debian/* Copyright: - 2018-2021 Debian Rust Maintainers - 2018-2021 Wolfgang Silbermayr + 2018-2022 Debian Rust Maintainers + 2018-2022 Wolfgang Silbermayr License: MIT License: MIT diff -Nru rust-memoffset-0.6.4/debian/tests/control rust-memoffset-0.6.5/debian/tests/control --- rust-memoffset-0.6.4/debian/tests/control 2021-11-28 21:07:15.000000000 +0000 +++ rust-memoffset-0.6.5/debian/tests/control 2022-06-27 17:02:25.000000000 +0000 @@ -1,19 +1,19 @@ -Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.4 --all-targets --all-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.5 --all-targets --all-features Features: test-name=rust-memoffset:@ Depends: dh-cargo (>= 18), librust-doc-comment-0.3+default-dev, @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.4 --all-targets +Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.5 --all-targets Features: test-name=librust-memoffset-dev:default Depends: dh-cargo (>= 18), librust-doc-comment-0.3+default-dev, @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.4 --all-targets --no-default-features --features unstable_const +Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.5 --all-targets --no-default-features --features unstable_const Features: test-name=librust-memoffset-dev:unstable_const Depends: dh-cargo (>= 18), librust-doc-comment-0.3+default-dev, @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.4 --all-targets --no-default-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test memoffset 0.6.5 --all-targets --no-default-features Features: test-name=librust-memoffset-dev: Depends: dh-cargo (>= 18), librust-doc-comment-0.3+default-dev, @ Restrictions: allow-stderr, skip-not-installable diff -Nru rust-memoffset-0.6.4/.github/workflows/ci.yml rust-memoffset-0.6.5/.github/workflows/ci.yml --- rust-memoffset-0.6.4/.github/workflows/ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/.github/workflows/ci.yml 1973-11-29 21:33:09.000000000 +0000 @@ -0,0 +1,86 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + name: Test Suite + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - nightly + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + - name: Run cargo test + run: cargo test + + test-msrv: + name: Test Suite + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - 1.19.0 # Oldest supported (first version with numeric fields in struct patterns) + - 1.20.0 # Oldest supported with tuple_ty + - 1.31.0 # Oldest supported with allow(clippy) + - 1.36.0 # Oldest supported with MaybeUninit + - 1.40.0 # Oldest supported with cfg(doctest) + - 1.51.0 # Oldest supported with ptr::addr_of! + - stable + - beta + - nightly + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + - name: Run cargo test + # Exclude doctests here, as we don't want to clutter docs themselves + # with backwards compatibility workarounds. + run: cargo test --lib + + nightly: + name: Test Suite (nightly features) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - name: Run cargo test + # `--lib` prevents doctests from being run. + # This is due to `unstable_const` requiring extra `feature(...)` directives + # which the doctests do not have. + run: cargo test --all-features --lib + + miri: + name: Test Suite (Miri) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Test with Miri + run: ci/miri.sh + + style: + name: lints and formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.51.0 # pin a version for reproducible results + components: rustfmt + override: true + - name: Check warnings + run: RUSTFLAGS="-D warnings" cargo check --all-targets + - name: Check formatting + run: cargo fmt -- --check diff -Nru rust-memoffset-0.6.4/README.md rust-memoffset-0.6.5/README.md --- rust-memoffset-0.6.4/README.md 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/README.md 1973-11-29 21:33:09.000000000 +0000 @@ -1,6 +1,6 @@ # memoffset # -[![](http://meritbadge.herokuapp.com/memoffset)](https://crates.io/crates/memoffset) +[![](https://img.shields.io/crates/v/memoffset.svg)](https://crates.io/crates/memoffset) C-Like `offset_of` functionality for Rust structs. @@ -21,17 +21,9 @@ These versions will compile fine with rustc versions greater or equal to 1.19. -Add the following lines at the top of your `main.rs` or `lib.rs` files. - -```rust,ignore -#[macro_use] -extern crate memoffset; -``` - ## Examples ## ```rust -#[macro_use] -extern crate memoffset; +use memoffset::{offset_of, span_of}; #[repr(C, packed)] struct Foo { @@ -69,5 +61,5 @@ Your crate root: (`lib.rs`/`main.rs`) ```rust,ignore -#![feature(const_ptr_offset_from, const_maybe_uninit_as_ptr, const_raw_ptr_deref, const_refs_to_cell)] +#![feature(const_ptr_offset_from, const_refs_to_cell)] ``` diff -Nru rust-memoffset-0.6.4/src/lib.rs rust-memoffset-0.6.5/src/lib.rs --- rust-memoffset-0.6.4/src/lib.rs 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/src/lib.rs 1973-11-29 21:33:09.000000000 +0000 @@ -24,8 +24,7 @@ //! //! ## Examples //! ``` -//! #[macro_use] -//! extern crate memoffset; +//! use memoffset::{offset_of, span_of}; //! //! #[repr(C, packed)] //! struct HelpMeIAmTrappedInAStructFactory { @@ -59,12 +58,7 @@ #![no_std] #![cfg_attr( feature = "unstable_const", - feature( - const_ptr_offset_from, - const_maybe_uninit_as_ptr, - const_raw_ptr_deref, - const_refs_to_cell, - ) + feature(const_ptr_offset_from, const_refs_to_cell) )] #[macro_use] @@ -75,7 +69,7 @@ #[cfg(doctest)] doctest!("../README.md"); -/// Hiden module for things the macros need to access. +/// Hidden module for things the macros need to access. #[doc(hidden)] pub mod __priv { #[doc(hidden)] diff -Nru rust-memoffset-0.6.4/src/offset_of.rs rust-memoffset-0.6.5/src/offset_of.rs --- rust-memoffset-0.6.4/src/offset_of.rs 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/src/offset_of.rs 1973-11-29 21:33:09.000000000 +0000 @@ -72,8 +72,7 @@ /// /// ## Examples /// ``` -/// #[macro_use] -/// extern crate memoffset; +/// use memoffset::offset_of; /// /// #[repr(C, packed)] /// struct Foo { @@ -103,8 +102,7 @@ /// /// ## Examples /// ``` -/// #[macro_use] -/// extern crate memoffset; +/// use memoffset::offset_of_tuple; /// /// fn main() { /// assert!(offset_of_tuple!((u8, u32), 1) >= 0, "Tuples do not have a defined layout"); diff -Nru rust-memoffset-0.6.4/src/span_of.rs rust-memoffset-0.6.5/src/span_of.rs --- rust-memoffset-0.6.4/src/span_of.rs 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/src/span_of.rs 1973-11-29 21:33:09.000000000 +0000 @@ -59,8 +59,7 @@ /// /// ## Examples /// ``` -/// #[macro_use] -/// extern crate memoffset; +/// use memoffset::span_of; /// /// #[repr(C)] /// struct Florp { diff -Nru rust-memoffset-0.6.4/.travis.yml rust-memoffset-0.6.5/.travis.yml --- rust-memoffset-0.6.4/.travis.yml 1970-01-01 00:00:00.000000000 +0000 +++ rust-memoffset-0.6.5/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -sudo: false -language: rust -cache: - cargo: true -matrix: - include: - - name: miri - env: TRAVIS_MIRI_JOB # make sure the cache is not shared with other "nightly" jobs - rust: nightly - script: - - sh ci/miri.sh - - - rust: 1.19.0 # Oldest supported (first version with numeric fields in struct patterns) - - rust: 1.20.0 # Oldest supported with tuple_ty - - rust: 1.31.0 # Oldest supported with allow(clippy) - - rust: 1.36.0 # Oldest supported with MaybeUninit - - rust: 1.40.0 # Oldest supported with cfg(doctest) - - rust: 1.51.0 # Oldest supported with ptr::addr_of! - - rust: stable - - rust: beta - - rust: nightly - - - name: all-features - rust: nightly - script: - # `--lib` added to prevent doctests from being compiled. - # This is due to `unstable_const` requiring extra `feature(...)` directives - # which the doctests do not have. - - cargo test --verbose --all-features --lib - - - name: rustfmt - rust: 1.36.0 - install: - - rustup component add rustfmt - script: - - cargo fmt -- --check - - - name: deny-warnings - env: RUSTFLAGS="-D warnings" - rust: 1.33.0 # `stable`: Locking down for consistent behavior - script: - - cargo check --tests - -install: -- rustc -Vv -- cargo -V - -script: -- rm -rf target/debug/deps/*memoffset* # Avoid rustdoc problems -- cargo test --verbose