You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clippy Warnings
PS C:\Users\Ross\Documents\miri> .\miri clippy
$ cargo +miri clippy --manifest-path C:\Users\Ross\Documents\miri\Cargo.toml --all-targets
warning: casting `u8` to `u16` may become silently lossy if you later change the type
--> src\shims\os_str.rs:282:58
|
282 | if converted.get(1).copied() == Some(b':' as u16)
| ^^^^^^^^^^^ help: try: `u16::from(b':')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
note: the lint level is defined here
--> src\lib.rs:46:5
|
46 | clippy::cast_lossless,
| ^^^^^^^^^^^^^^^^^^^^^
warning: casting u8 to u16 may become silently lossy if you later change the type
--> src\shims\os_str.rs:283:62
|
283 | && converted.get(2).copied() == Some(b'/' as u16)
| ^^^^^^^^^^^ help: try: u16::from(b'/')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting u8 to u16 may become silently lossy if you later change the type
--> src\shims\os_str.rs:287:45
|
287 | converted.insert(0, b'/' as u16);
| ^^^^^^^^^^^ help: try: u16::from(b'/')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting u8 to u16 may become silently lossy if you later change the type
--> src\shims\os_str.rs:293:58
|
293 | if converted.get(0).copied() == Some(b'\' as u16)
| ^^^^^^^^^^^^ help: try: u16::from(b'\\')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting u8 to u16 may become silently lossy if you later change the type
--> src\shims\os_str.rs:294:62
|
294 | && converted.get(2).copied() == Some(b':' as u16)
| ^^^^^^^^^^^ help: try: u16::from(b':')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting u8 to u16 may become silently lossy if you later change the type
--> src\shims\os_str.rs:295:62
|
295 | && converted.get(3).copied() == Some(b'\' as u16)
| ^^^^^^^^^^^^ help: try: u16::from(b'\\')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
Clippy should be run in CI for all cfgs. In an ideal world the only change that would be needed would be changing this
But there is an issue with this. You need to install the stdlib for each target. The typical way is with rustup and running, for example, rustup target add aarch64-apple-darwin. But this is not supported for custom toolchains like +miri.
I guess we can build a sysroot for each target then run clippy?
The text was updated successfully, but these errors were encountered:
RalfJung
added
A-meta
Not about any part of Miri per se, but about shaping the environment to make something in/with Miri
C-bug
Category: This is a bug.
A-dev
Area: working on Miri as a developer
and removed
A-meta
Not about any part of Miri per se, but about shaping the environment to make something in/with Miri
labels
May 3, 2024
Currently Clippy on Windows fails because of Windows specific code in
https://github.com/rust-lang/miri/blob/bffd41b00bf593bcf655e16748e223f8302f3de0/src/shims/os_str.rs
Clippy Warnings
PS C:\Users\Ross\Documents\miri> .\miri clippy $ cargo +miri clippy --manifest-path C:\Users\Ross\Documents\miri\Cargo.toml --all-targets warning: casting `u8` to `u16` may become silently lossy if you later change the type --> src\shims\os_str.rs:282:58 | 282 | if converted.get(1).copied() == Some(b':' as u16) | ^^^^^^^^^^^ help: try: `u16::from(b':')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless note: the lint level is defined here --> src\lib.rs:46:5 | 46 | clippy::cast_lossless, | ^^^^^^^^^^^^^^^^^^^^^warning: casting
u8
tou16
may become silently lossy if you later change the type--> src\shims\os_str.rs:283:62
|
283 | && converted.get(2).copied() == Some(b'/' as u16)
| ^^^^^^^^^^^ help: try:
u16::from(b'/')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting
u8
tou16
may become silently lossy if you later change the type--> src\shims\os_str.rs:287:45
|
287 | converted.insert(0, b'/' as u16);
| ^^^^^^^^^^^ help: try:
u16::from(b'/')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting
u8
tou16
may become silently lossy if you later change the type--> src\shims\os_str.rs:293:58
|
293 | if converted.get(0).copied() == Some(b'\' as u16)
| ^^^^^^^^^^^^ help: try:
u16::from(b'\\')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting
u8
tou16
may become silently lossy if you later change the type--> src\shims\os_str.rs:294:62
|
294 | && converted.get(2).copied() == Some(b':' as u16)
| ^^^^^^^^^^^ help: try:
u16::from(b':')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
warning: casting
u8
tou16
may become silently lossy if you later change the type--> src\shims\os_str.rs:295:62
|
295 | && converted.get(3).copied() == Some(b'\' as u16)
| ^^^^^^^^^^^^ help: try:
u16::from(b'\\')
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
Clippy should be run in CI for all cfgs. In an ideal world the only change that would be needed would be changing this
miri/.github/workflows/ci.yml
Line 127 in bffd41b
to this
and whatever other targets are needed.
But there is an issue with this. You need to install the stdlib for each target. The typical way is with rustup and running, for example,
rustup target add aarch64-apple-darwin
. But this is not supported for custom toolchains like+miri
.I guess we can build a sysroot for each target then run clippy?
The text was updated successfully, but these errors were encountered: