-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied
Description
Summary
I am very sorry for not providing a minimum reproducible example! Please run:
RUST_BACKTRACE=1 cargo clippy --fix
On this commit.
Version
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-unknown-linux-gnu
release: 1.79.0
LLVM version: 18.1.7
Error output
Backtrace
warning: failed to automatically apply fixes suggested by rustc to crate `mistralrs_core`
after fixes were automatically applied the compiler reported errors within these files:
* mistralrs-core/src/pipeline/inputs_processor.rs
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust-clippy/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag
The following errors were reported:
error[E0308]: mismatched types
--> mistralrs-core/src/pipeline/inputs_processor.rs:119:24
|
77 | seqlen_offsets.push(offset);
| -------------- ------ this argument has type `(usize, usize)`...
| |
| ... which causes `seqlen_offsets` to have type `std::vec::Vec<(usize, usize)>`
...
119 | positions: seqlen_offsets,
| ^^^^^^^^^^^^^^ expected `Vec<usize>`, found `Vec<(usize, usize)>`
|
= note: expected struct `std::vec::Vec<usize>`
found struct `std::vec::Vec<(usize, usize)>`
error[E0605]: non-primitive cast: `(usize, usize)` as `i64`
--> mistralrs-core/src/pipeline/inputs_processor.rs:93:22
|
93 | (*seqlen_offsets.get(i).unwrap() as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
error[E0605]: non-primitive cast: `(usize, usize)` as `i64`
--> mistralrs-core/src/pipeline/inputs_processor.rs:94:27
|
94 | ..*seqlen_offsets.get(i).unwrap() as i64 + max_len as i64)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied