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

remove trailing semicolon from macro #12

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

escobar-west
Copy link
Contributor

@escobar-west escobar-west commented Feb 28, 2023

According to rust-lang/rust#79813, trailing semicolons in expression macro bodies will eventually be made into a hard error. This PR is to remove the trailing semicolon.

I discovered this issue when I was running cargo check --future-imcompat-report on my binary crate which lists console_log as a dependency. Below is a snippet of the cargo output:

warning: trailing semicolon in macro used in expression position
--> /Users/victorsuriel/.cargo/registry/src/github.com-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 rust-lang/rust#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)

@erwanvivien
Copy link

Fixes #11

Copy link
Owner

@iamcodemaker iamcodemaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. I'll get this merged and pushed out.

@iamcodemaker iamcodemaker merged commit c99a116 into iamcodemaker:master Mar 10, 2023
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Mar 15, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [console_log](https://github.com/iamcodemaker/console_log) | dependencies | patch | `0.2.1` -> `0.2.2` |

---

### Release Notes

<details>
<summary>iamcodemaker/console_log</summary>

### [`v0.2.2`](https://github.com/iamcodemaker/console_log/releases/tag/0.2.2)

#### What's Changed

-   remove trailing semicolon from macro by [@&#8203;escobar-west](https://github.com/escobar-west) in iamcodemaker/console_log#12

#### New Contributors

This is the first time generating release notes, so not all of these contributions are in this release. I still wanted to recognize the contributions.

-   [@&#8203;azriel91](https://github.com/azriel91) made their first contribution in iamcodemaker/console_log#6
-   [@&#8203;neurosie](https://github.com/neurosie) made their first contribution in iamcodemaker/console_log#7
-   [@&#8203;dependabot-preview](https://github.com/dependabot-preview) made their first contribution in iamcodemaker/console_log#8
-   [@&#8203;chidea](https://github.com/chidea) made their first contribution in iamcodemaker/console_log#10
-   [@&#8203;escobar-west](https://github.com/escobar-west) made their first contribution in iamcodemaker/console_log#12

**Full Changelog**: https://github.com/iamcodemaker/console_log/commits/0.2.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTkuMiIsInVwZGF0ZWRJblZlciI6IjM0LjE1OS4yIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1814
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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

Successfully merging this pull request may close these issues.

3 participants