Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 0b93c50

Browse files
jhprattXanewok
authored andcommitted
Update Step trait implementation
1 parent e3fa8ab commit 0b93c50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rls-span/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg_attr(feature = "nightly", feature(step_trait, step_trait_ext))]
1+
#![cfg_attr(feature = "nightly", feature(step_trait, trusted_step))]
22

33
use std::marker::PhantomData;
44
use std::path::PathBuf;
@@ -81,7 +81,7 @@ impl Column<ZeroIndexed> {
8181
#[cfg(feature = "nightly")]
8282
macro_rules! impl_step {
8383
($target: ty) => {
84-
unsafe impl Step for $target {
84+
impl Step for $target {
8585
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
8686
Step::steps_between(&start.0, &end.0)
8787
}
@@ -92,6 +92,7 @@ macro_rules! impl_step {
9292
Step::backward_checked(arg.0, count).map(|x| Self(x, PhantomData))
9393
}
9494
}
95+
unsafe impl TrustedStep for $target {}
9596
};
9697
}
9798

0 commit comments

Comments
 (0)