Skip to content

http fails to build with rust 1.97.1 #181

Description

@loqs

Description:

[dependencies.brotli]
version = "8.0"
features = ["simd"]

Contained in Cargo.toml enables the simd feature without checking if it compatible with the rust version in use.

Versions:

Steps to reproduce:

$ git clone https://github.com/thecoshman/http.git
$ cd http
$ cargo build
....
error[E0599]: no method named `to_int` found for struct `Mask<T, N>` in the current scope
  --> /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/brotli-8.0.4/src/enc/block_splitter.rs:75:84
   |
75 |         let ymm_cmpge: v256i = costk_minus_min_cost.simd_ge(ymm_block_switch_cost).to_int();
   |                                                                                    ^^^^^^
   |
help: there is a method `try_into` with a similar name
   |
75 -         let ymm_cmpge: v256i = costk_minus_min_cost.simd_ge(ymm_block_switch_cost).to_int();
75 +         let ymm_cmpge: v256i = costk_minus_min_cost.simd_ge(ymm_block_switch_cost).try_into();
   |

   Compiling xattr v1.6.1
   Compiling tar v0.4.46
   Compiling hyper v0.10.16 (/build/httplz/src/http/vendor/hyper-0.10.16)
   Compiling zip v5.1.1
   Compiling ctrlc v3.5.2
error[E0599]: no method named `to_int` found for struct `Mask<T, N>` in the current scope
   --> /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/brotli-8.0.4/src/enc/prior_eval.rs:349:79
    |
349 |         let mask_v: s16 = one_to_16.simd_gt(s16::splat(i16::from(nibble_u8))).to_int();
    |                                                                               ^^^^^^
    |
help: there is a method `try_into` with a similar name
    |
349 -         let mask_v: s16 = one_to_16.simd_gt(s16::splat(i16::from(nibble_u8))).to_int();
349 +         let mask_v: s16 = one_to_16.simd_gt(s16::splat(i16::from(nibble_u8))).try_into();
    |

   Compiling phf_generator v0.7.24
   Compiling phf_codegen v0.7.24
   Compiling mime_guess v1.8.8
   Compiling toml v0.5.11
   Compiling serde_derive v1.0.229
   Compiling embed-resource v1.8.0
For more information about this error, try `rustc --explain E0599`.
error: could not compile `brotli` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

@orhun @heftig

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions