Skip to content

Commit bfdcc06

Browse files
committed
Non mutable Deref is unreachable
1 parent ac74844 commit bfdcc06

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ description = "Iteratively stack mutable references"
88
documentation = "https://docs.rs/ref_mut_stack"
99
repository = "https://github.com/arnodb/ref_mut_stack"
1010
readme = "README.md"
11+
12+
[lints.rust]
13+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage,coverage_nightly)'] }

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
2+
13
use std::{
24
ops::{Deref, DerefMut},
35
ptr::NonNull,
@@ -77,6 +79,7 @@ impl<T> Drop for SafeDropVec<T> {
7779

7880
impl<T> Deref for SafeDropVec<T> {
7981
type Target = Vec<T>;
82+
#[cfg_attr(coverage_nightly, coverage(off))]
8083
fn deref(&self) -> &Self::Target {
8184
&self.0
8285
}

0 commit comments

Comments
 (0)