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

Update Step trait implementation #1738

Merged
merged 1 commit into from
May 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rls-span/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(feature = "nightly", feature(step_trait, step_trait_ext))]
#![cfg_attr(feature = "nightly", feature(step_trait, trusted_step))]

use std::marker::PhantomData;
use std::path::PathBuf;
Expand Down Expand Up @@ -81,7 +81,7 @@ impl Column<ZeroIndexed> {
#[cfg(feature = "nightly")]
macro_rules! impl_step {
($target: ty) => {
unsafe impl Step for $target {
impl Step for $target {
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
Step::steps_between(&start.0, &end.0)
}
Expand All @@ -92,6 +92,7 @@ macro_rules! impl_step {
Step::backward_checked(arg.0, count).map(|x| Self(x, PhantomData))
}
}
unsafe impl TrustedStep for $target {}
};
}

Expand Down