Commit 98ee748
rust: device: avoid trailing ; in printing macros
commit a19bda8 upstream.
These macros are used like expressions, so they should not emit a
semicolon. This is being turned into a hard error in a future release of
Rust.
error: trailing semicolon in macro used in expression position
--> drivers/gpu/nova-core/firmware/fsp.rs:79:34
|
79 | .inspect_err(|_| dev_err!(dev, "FMC firmware missing '{}' section\n", name))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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: this error originates in the macro `dev_err` (in Nightly builds, run with -Z macro-backtrace for more info)
[ I was doubly surprised since upstream made it a deny-by-default lint
a year ago for Rust 1.91.0, and yet we didn't see it; plus I hadn't
seen this in my CI even yesterday.
It turns out this just landed into today's nightly (nightly-2026-07-16,
using upstream commit d0babd8b6):
Link: rust-lang/rust#159222
which says:
"The `semicolon_in_expressions_from_macros` lint previously
suppressed warnings about non-local macros. This masks
a lint that will subsequently become a hard error."
So that explains it. And this is the PR that will make it a hard error
at some point in the future:
Link: rust-lang/rust#159218
Thus starting with Rust 1.99.0 (expected 2026-10-01), we will be
seeing the deny-by-default lint above, so clean it up already.
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.18.y and later.
Link: rust-lang/rust#79813
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: rust-lang/rust#159218
Link: rust-lang/rust#159222
Link: https://patch.msgid.link/20260716-device-trail-semicolon-v1-1-f48e9dcfae15@google.com
[ Fixed typo. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent bcaba70 commit 98ee748
1 file changed
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | | - | |
741 | | - | |
742 | | - | |
| 740 | + | |
743 | 741 | | |
744 | 742 | | |
745 | 743 | | |
| |||
766 | 764 | | |
767 | 765 | | |
768 | 766 | | |
769 | | - | |
| 767 | + | |
770 | 768 | | |
771 | 769 | | |
772 | 770 | | |
| |||
792 | 790 | | |
793 | 791 | | |
794 | 792 | | |
795 | | - | |
| 793 | + | |
796 | 794 | | |
797 | 795 | | |
798 | 796 | | |
| |||
818 | 816 | | |
819 | 817 | | |
820 | 818 | | |
821 | | - | |
| 819 | + | |
822 | 820 | | |
823 | 821 | | |
824 | 822 | | |
| |||
844 | 842 | | |
845 | 843 | | |
846 | 844 | | |
847 | | - | |
| 845 | + | |
848 | 846 | | |
849 | 847 | | |
850 | 848 | | |
| |||
870 | 868 | | |
871 | 869 | | |
872 | 870 | | |
873 | | - | |
| 871 | + | |
874 | 872 | | |
875 | 873 | | |
876 | 874 | | |
| |||
896 | 894 | | |
897 | 895 | | |
898 | 896 | | |
899 | | - | |
| 897 | + | |
900 | 898 | | |
901 | 899 | | |
902 | 900 | | |
| |||
922 | 920 | | |
923 | 921 | | |
924 | 922 | | |
925 | | - | |
| 923 | + | |
926 | 924 | | |
927 | 925 | | |
928 | 926 | | |
| |||
948 | 946 | | |
949 | 947 | | |
950 | 948 | | |
951 | | - | |
| 949 | + | |
952 | 950 | | |
0 commit comments