Skip to content

portable-simd is entirely untested in rust-lang/rust #160607

Description

@RalfJung

It looks like portable-simd doctests (and possibly the other tests as well) are entirely untested in this repo. Since #146882, some of the doctests are now failing to compile:

  0.000008   ---- crates/core_simd/src/simd/num/int.rs - core_simd::simd::num::int::SimdInt::abs_diff (line 81) stdout ----
  0.000007   error: use of deprecated constant `std::i32::MIN`: replaced by the `MIN` associated constant on this type
  0.000007     --> crates/core_simd/src/simd/num/int.rs:89:27
  0.000007      |
  0.000006   89 | let a = Simd::from_array([MIN, MAX, 100, -100]);
  0.000007      |                           ^^^
  0.000006      |
  0.000007   note: the lint level is defined here
  0.000007     --> crates/core_simd/src/simd/num/int.rs:79:9
  0.000007      |
  0.000007   79 | #![deny(warnings)]
  0.000006      |         ^^^^^^^^
  0.000007      = note: `#[deny(deprecated)]` implied by `#[deny(warnings)]`
  0.000007   
  0.000007   error: use of deprecated constant `std::i32::MAX`: replaced by the `MAX` associated constant on this type
  0.000008     --> crates/core_simd/src/simd/num/int.rs:89:32
  0.000005      |
  0.000005   89 | let a = Simd::from_array([MIN, MAX, 100, -100]);
  0.000004      |                                ^^^
  0.000005   
  0.000004   error: use of deprecated constant `std::i32::MAX`: replaced by the `MAX` associated constant on this type
  0.000005     --> crates/core_simd/src/simd/num/int.rs:90:27
  0.000004      |
  0.000005   90 | let b = Simd::from_array([MAX, MIN, -80, -120]);
  0.000004      |                           ^^^
  0.000005   
  0.000004   error: use of deprecated constant `std::i32::MIN`: replaced by the `MIN` associated constant on this type
  0.000005     --> crates/core_simd/src/simd/num/int.rs:90:32
  0.000004      |
  0.000005   90 | let b = Simd::from_array([MAX, MIN, -80, -120]);
  0.000004      |                                ^^^
  0.000005   
  0.000005   error: use of deprecated constant `std::i32::MIN`: replaced by the `MIN` associated constant on this type
  0.000004     --> crates/core_simd/src/simd/num/int.rs:88:17
  0.000005      |
  0.000008   88 | use core::i32::{MIN, MAX};
  0.000007      |                 ^^^
  0.000007   
  0.000007   error: use of deprecated constant `std::i32::MAX`: replaced by the `MAX` associated constant on this type
  0.000007     --> crates/core_simd/src/simd/num/int.rs:88:22
  0.000007      |
  0.000007   88 | use core::i32::{MIN, MAX};
  0.000007      |                      ^^^
  0.000010   
  0.000008   error: aborting due to 6 previous errors
  0.000012   
  0.000007   Couldn't compile the test.

We should have at least some basic "does it build" smoke tests running in this repo.

Cc @rust-lang/project-portable-simd

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.PG-portable-simdProject group: Portable SIMD (https://github.com/rust-lang/project-portable-simd)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions