cezarmathe / btrfsutil-rs

Safe wrappers for libbtrfsutil.
https://crates.io/crates/btrfsutil
MIT License
6 stars 5 forks source link

"warning: the following packages contain code that will be rejected by a future version of Rust: btrfsutil v0.1" #34

Closed joshhansen closed 1 year ago

joshhansen commented 1 year ago

btrfsutil 0.1.0 contains code that will become an error in the future, as reported to me by rustc 1.71.0:


$ cargo report future-incompatibilities --id 1 --package btrfsutil@0.1.0
The following warnings were discovered during the build. These warnings are an
indication that the packages contain code that will become an error in a
future release of Rust. These warnings typically cover changes to close
soundness problems, unintended or undocumented behavior, or critical problems
that cannot be fixed in a backwards-compatible fashion, and are not expected
to be in wide use.

Each warning should contain a link for more information on what the warning
means and how to resolve it.

To solve this problem, you can try the following approaches:

- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):

  - btrfsutil@0.1.0
  - Repository: https://github.com/cezarmathe/btrfsutil-rs
  - Detailed warning command: `cargo report future-incompatibilities --id 1 --package btrfsutil@0.1.0`

- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section

The package `btrfsutil v0.1.0` currently triggers the following future incompatibility lints:
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/lib.rs:138:23
>     |
> 138 |             Err(e) => glue_error!(GlueError::Utf8Error(e)),
>     |                       ------------------------------------ in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/lib.rs:207:18
>     |
> 207 |             _ => glue_error!(GlueError::UnknownErrno(errno)),
>     |                  ------------------------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>   --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>    |
> 88 |         panic!("Glue error: {}", $glue_err);
>    |                                            ^
>    |
>   ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/common.rs:19:17
>    |
> 19 |         None => glue_error!(GlueError::BadPath(path)),
>    |                 ------------------------------------- in this macro invocation
>    |
>    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>    = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>    = note: this warning originates in the macro `glue_error` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>   --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>    |
> 88 |         panic!("Glue error: {}", $glue_err);
>    |                                            ^
>    |
>   ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/common.rs:23:19
>    |
> 23 |         Err(e) => glue_error!(GlueError::NulError(e)),
>    |                   ----------------------------------- in this macro invocation
>    |
>    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>    = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>    = note: this warning originates in the macro `glue_error` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol.rs:207:23
>     |
> 207 |             Err(e) => glue_error!(GlueError::Utf8Error(e)),
>     |                       ------------------------------------ in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:146:26
>     |
> 146 |         let uuid: Uuid = handle_uuid!(&src.uuid);
>     |                          ----------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_uuid` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:147:37
>     |
> 147 |         let parent_uuid_val: Uuid = handle_uuid!(&src.parent_uuid);
>     |                                     ------------------------------ in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_uuid` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:148:39
>     |
> 148 |         let received_uuid_val: Uuid = handle_uuid!(&src.received_uuid);
>     |                                       -------------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_uuid` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:149:36
>     |
> 149 |         let ctime: NaiveDateTime = handle_timespec!(src.ctime);
>     |                                    --------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_timespec` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:150:36
>     |
> 150 |         let otime: NaiveDateTime = handle_timespec!(src.otime);
>     |                                    --------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_timespec` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:151:40
>     |
> 151 |         let stime_val: NaiveDateTime = handle_timespec!(src.stime);
>     |                                        --------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_timespec` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: trailing semicolon in macro used in expression position
>    --> /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/error/glue.rs:88:44
>     |
> 88  |         panic!("Glue error: {}", $glue_err);
>     |                                            ^
>     |
>    ::: /home/josh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btrfsutil-0.1.0/src/subvolume/subvol_info.rs:152:40
>     |
> 152 |         let rtime_val: NaiveDateTime = handle_timespec!(src.rtime);
>     |                                        --------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `glue_error` which comes from the expansion of the macro `handle_timespec` (in Nightly builds, run with -Z macro-backtrace for more info)```
joshhansen commented 1 year ago

Fixed on master