Skip to content

WIP: reuse string bitmap #447

WIP: reuse string bitmap

WIP: reuse string bitmap #447

GitHub Actions / clippy failed Nov 25, 2024 in 1s

clippy

23 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 23
Warning 0
Note 0
Help 0

Versions

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check failure on line 187 in src/util/string.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type annotations needed

error[E0282]: type annotations needed
   --> src/util/string.rs:187:33
    |
187 |                 let mut quote = block.bs_bits.wrapping_sub(1) & block.quote_bits;
    |                                 ^^^^^^^^^^^^^ cannot infer type

Check failure on line 890 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `bs_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `bs_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:890:33
    |
890 |                 let cnt = block.bs_index();
    |                                 ^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `bs_index` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 889 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `has_backslash` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `has_backslash` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:889:22
    |
889 |             if block.has_backslash() {
    |                      ^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `has_backslash` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 885 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `unescaped_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `unescaped_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:885:37
    |
885 |                 self.read.eat(block.unescaped_index());
    |                                     ^^^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `unescaped_index` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 884 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `has_unescaped` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `has_unescaped` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:884:22
    |
884 |             if block.has_unescaped() {
    |                      ^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `has_unescaped` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 878 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `quote_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `quote_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:878:33
    |
878 |                 let cnt = block.quote_index();
    |                                 ^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `quote_index` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 875 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:875:21
    |
875 |             block = StringBlock::new(&v);
    |                     ^^^^^^^^^^^^^^^^^^^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::StringBlock`
   --> src/util/string.rs:39:34
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    |                                  ^^^^ required by this bound in `StringBlock`

Check failure on line 877 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `has_quote_first` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `has_quote_first` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:877:22
    |
877 |             if block.has_quote_first() {
    |                      ^^^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `has_quote_first` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 874 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:874:30
    |
874 |             let v = unsafe { load(chunk.as_ptr()) };
    |                              ^^^^^^^^^^^^^^^^^^^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::load`
   --> src/util/string.rs:92:30
    |
92  | pub(crate) unsafe fn load<V: Simd>(ptr: *const u8) -> V {
    |                              ^^^^ required by this bound in `load`

Check failure on line 875 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:875:38
    |
875 |             block = StringBlock::new(&v);
    |                     ---------------- ^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |                     |
    |                     required by a bound introduced by this call
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::StringBlock::<S>::new`
   --> src/util/string.rs:46:9
    |
46  | impl<S: Simd> StringBlock<S> {
    |         ^^^^ required by this bound in `StringBlock::<S>::new`
...
50  |     pub fn new(v: &S) -> Self {
    |            --- required by a bound in this associated function

Check failure on line 871 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied in `util::string::StringBlock<u64>`

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied in `util::string::StringBlock<u64>`
   --> src/parser.rs:871:13
    |
871 |         let mut block: StringBlock<u64>;
    |             ^^^^^^^^^ within `util::string::StringBlock<u64>`, the trait `sonic_simd::Simd` is not implemented for `u64`, which is required by `util::string::StringBlock<u64>: std::marker::Sized`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required because it appears within the type `util::string::StringBlock<u64>`
   --> src/util/string.rs:39:19
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    |                   ^^^^^^^^^^^
    = note: all local variables must have a statically known size
    = help: unsized locals are gated as an unstable feature
help: consider borrowing here
    |
871 |         let mut block: &StringBlock<u64>;
    |                        +

Check failure on line 871 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:871:24
    |
871 |         let mut block: StringBlock<u64>;
    |                        ^^^^^^^^^^^^^^^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::StringBlock`
   --> src/util/string.rs:39:34
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    |                                  ^^^^ required by this bound in `StringBlock`

Check failure on line 826 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `bs_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `bs_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:826:33
    |
826 |                 let cnt = block.bs_index();
    |                                 ^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `bs_index` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 824 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `has_backslash` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `has_backslash` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:824:22
    |
824 |             if block.has_backslash() {
    |                      ^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `has_backslash` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 816 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `quote_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `quote_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:816:33
    |
816 |                 let cnt = block.quote_index();
    |                                 ^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `quote_index` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 815 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `has_quote_first` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `has_quote_first` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:815:22
    |
815 |             if block.has_quote_first() {
    |                      ^^^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `has_quote_first` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 813 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

no method named `write_to_slice_unaligned_unchecked` found for type `u64` in the current scope

error[E0599]: no method named `write_to_slice_unaligned_unchecked` found for type `u64` in the current scope
   --> src/parser.rs:813:15
    |
813 |             v.write_to_slice_unaligned_unchecked(chunk);
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `u64`

Check failure on line 807 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `unescaped_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `unescaped_index` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:807:37
    |
807 |                 self.read.eat(block.unescaped_index());
    |                                     ^^^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `unescaped_index` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 804 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:804:21
    |
804 |             block = StringBlock::new(&v);
    |                     ^^^^^^^^^^^^^^^^^^^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::StringBlock`
   --> src/util/string.rs:39:34
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    |                                  ^^^^ required by this bound in `StringBlock`

Check failure on line 806 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the method `has_unescaped` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied

error[E0599]: the method `has_unescaped` exists for struct `StringBlock<u64>`, but its trait bounds were not satisfied
   --> src/parser.rs:806:22
    |
806 |             if block.has_unescaped() {
    |                      ^^^^^^^^^^^^^ method cannot be called on `StringBlock<u64>` due to unsatisfied trait bounds
    |
   ::: src/util/string.rs:39:1
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    | -------------------------------------- method `has_unescaped` not found for this struct
    |
note: trait bound `u64: sonic_simd::Simd` was not satisfied
   --> src/util/string.rs:59:9
    |
59  | impl<S: Simd> StringBlock<S> {
    |         ^^^^  --------------
    |         |
    |         unsatisfied trait bound introduced here

Check failure on line 803 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:803:30
    |
803 |             let v = unsafe { load(chunk.as_ptr()) };
    |                              ^^^^^^^^^^^^^^^^^^^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::load`
   --> src/util/string.rs:92:30
    |
92  | pub(crate) unsafe fn load<V: Simd>(ptr: *const u8) -> V {
    |                              ^^^^ required by this bound in `load`

Check failure on line 804 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:804:38
    |
804 |             block = StringBlock::new(&v);
    |                     ---------------- ^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |                     |
    |                     required by a bound introduced by this call
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::StringBlock::<S>::new`
   --> src/util/string.rs:46:9
    |
46  | impl<S: Simd> StringBlock<S> {
    |         ^^^^ required by this bound in `StringBlock::<S>::new`
...
50  |     pub fn new(v: &S) -> Self {
    |            --- required by a bound in this associated function

Check failure on line 797 in src/parser.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `u64: sonic_simd::Simd` is not satisfied

error[E0277]: the trait bound `u64: sonic_simd::Simd` is not satisfied
   --> src/parser.rs:797:24
    |
797 |         let mut block: StringBlock<u64>;
    |                        ^^^^^^^^^^^^^^^^ the trait `sonic_simd::Simd` is not implemented for `u64`
    |
    = help: the following other types implement trait `sonic_simd::Simd`:
              sonic_simd::avx2::Simd256i
              sonic_simd::avx2::Simd256u
              sonic_simd::sse2::Simd128i
              sonic_simd::sse2::Simd128u
              sonic_simd::v512::Simd512i
              sonic_simd::v512::Simd512u
note: required by a bound in `util::string::StringBlock`
   --> src/util/string.rs:39:34
    |
39  | pub(crate) struct StringBlock<S: Simd> {
    |                                  ^^^^ required by this bound in `StringBlock`