Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contain code that will be rejected by future version of Rust #11

Closed
erwanvivien opened this issue Feb 23, 2023 · 3 comments
Closed

Contain code that will be rejected by future version of Rust #11

erwanvivien opened this issue Feb 23, 2023 · 3 comments

Comments

@erwanvivien
Copy link

erwanvivien commented Feb 23, 2023

I get

warning: the following packages contain code that will be rejected by a future version of Rust: console_log v0.2.0

When compiling my project https://github.com/erwanvivien/gifski on branch wasm32 using

RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals" cargo build --target=wasm32-unknown-unknown --release -Z build-std=panic_abort,std

I don't know if it's normal?

@iamcodemaker
Copy link
Owner

🤔 I'll need to look into that.

@iamcodemaker
Copy link
Owner

I don't see this warning when building locally with cargo build --release. Additionally when running the command provided, I get an error indicating that the -Z flag is only supported on nightly. I'm not using nightly and don't have time to try and chase this down. If you (or anyone else) want's to take a crack at figuring out what's causing this, pull requests are welcome. Having said that, it does not seem like a serious issue and should be safe to ignore.

@erwanvivien
Copy link
Author

You were right, I found the log and it's very simple bug:

$ cargo report future-incompatibilities --id 1
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):

  - [email protected]
  - Repository: https://github.com/iamcodemaker/console_log
  - Detailed warning command: `cargo report future-incompatibilities --id 1 --package [email protected]`

- 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 `console_log v0.2.1` currently triggers the following future incompatibility lints:
> warning: trailing semicolon in macro used in expression position
>   --> /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/console_log-0.2.1/src/style.rs:19:83
>    |
> 19 |                 concat!("color: white; padding: 0 3px; background: ", $color, ";");
>    |                                                                                   ^
> ...
> 24 |             trace: bg_color!("gray"),
>    |                    ----------------- 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 `bg_color` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>   --> /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/console_log-0.2.1/src/style.rs:19:83
>    |
> 19 |                 concat!("color: white; padding: 0 3px; background: ", $color, ";");
>    |                                                                                   ^
> ...
> 25 |             debug: bg_color!("blue"),
>    |                    ----------------- 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 `bg_color` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>   --> /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/console_log-0.2.1/src/style.rs:19:83
>    |
> 19 |                 concat!("color: white; padding: 0 3px; background: ", $color, ";");
>    |                                                                                   ^
> ...
> 26 |             info: bg_color!("green"),
>    |                   ------------------ 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 `bg_color` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>   --> /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/console_log-0.2.1/src/style.rs:19:83
>    |
> 19 |                 concat!("color: white; padding: 0 3px; background: ", $color, ";");
>    |                                                                                   ^
> ...
> 27 |             warn: bg_color!("orange"),
>    |                   ------------------- 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 `bg_color` (in Nightly builds, run with -Z macro-backtrace for more info)
> 
> warning: trailing semicolon in macro used in expression position
>   --> /root/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/console_log-0.2.1/src/style.rs:19:83
>    |
> 19 |                 concat!("color: white; padding: 0 3px; background: ", $color, ";");
>    |                                                                                   ^
> ...
> 28 |             error: bg_color!("darkred"),
>    |                    -------------------- 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 `bg_color` (in Nightly builds, run with -Z macro-backtrace for more info)
> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants