Skip to content

Commit 1c0941f

Browse files
committed
Use the packed_simd crate instead of std::simd
`std::simd` was removed in rust-lang/rust#52535. https://crates.io/crates/packed_simd is in the rust-lang-nursery org.
1 parent 65df9cb commit 1c0941f

File tree

4 files changed

+36
-21
lines changed

4 files changed

+36
-21
lines changed

Cargo.lock

+30-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/gfx/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test = false
1313
doctest = false
1414

1515
[features]
16-
unstable = []
16+
unstable = ["packed_simd"]
1717

1818
[dependencies]
1919
app_units = "0.6"
@@ -30,6 +30,7 @@ log = "0.4"
3030
malloc_size_of = { path = "../malloc_size_of" }
3131
net_traits = {path = "../net_traits"}
3232
new-ordered-float = "1.0"
33+
packed_simd = {version = "0.1", optional = true}
3334
range = {path = "../range"}
3435
serde = "1.0"
3536
servo_arc = {path = "../servo_arc"}

components/gfx/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
#![cfg_attr(feature = "unstable", feature(stdsimd))]
65
#![deny(unsafe_code)]
76

87
extern crate app_units;
@@ -43,6 +42,8 @@ extern crate log;
4342
extern crate malloc_size_of;
4443
extern crate net_traits;
4544
extern crate ordered_float;
45+
#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
46+
extern crate packed_simd;
4647
extern crate range;
4748
#[macro_use] extern crate serde;
4849
extern crate servo_arc;

components/gfx/text/glyph.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
use app_units::Au;
66
use euclid::Point2D;
7+
#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
8+
use packed_simd::u32x4;
79
use range::{self, EachIndex, Range, RangeIndex};
810
use std::{fmt, mem, u16};
911
use std::cmp::{Ordering, PartialOrd};
10-
#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
11-
use std::simd::u32x4;
1212
use std::vec::Vec;
1313

1414
pub use gfx_traits::ByteIndex;

0 commit comments

Comments
 (0)