Closed
Description
In this crate, there is an extension trait:-
pub trait PMEMblkpoolEx
{
...
/// Returns false if the block has previously had its error condition set
#[inline(always)]
fn read(self, to: *mut c_void, zeroBasedBlockIndex: usize) -> bool;
...
}
This is then impl'd for an existing pointer:-
impl PMEMblkpoolEx for *mut PMEMblkpool
{
...
#[inline(always)]
fn read(self, to: *mut c_void, zeroBasedBlockIndex: usize) -> bool
{
...
}
...
}
Compiling this produces:-
error: use of unstable library feature 'pointer_methods' (see issue #43941)
--> src/blockPool/BlockPool.rs:69:10
|
69 | self.0.read(to, zeroBasedBlockIndex)
| ^^^^
|
= help: add #![feature(pointer_methods)] to the crate attributes to enable
This is wrong on several levels. Firstly, adding a new feature to the std lib broke existing code. Secondly, the error message is decidedly incorrect. I'm actually in favour of the new pointer methods, so I'm happy to fix the code in this crate going forward (?would specialization help?), but I feel something got missed here in the implementation process. There's a decided lack of documentation around it - the unstable book contains no details, and the tracking issue is equally thin.