Wrong documentation is generated for types that only implement Deref, but not DerefMut. It inherits methods from both Deref and DerefMut.
Steps to reproduce:
cargo new deref-doc-bug
/// lib.rs
pub struct Foo;
impl std::ops::Deref for Foo {
type Target = [char];
fn deref(&self) -> &[char] { &[] }
}
cargo doc --open
Generated documentation has methods for both &[char] and &mut [char], for examplefn get_mut.
Version
rustc 1.12.0-nightly (1225e122f 2016-07-30)
rustdoc 1.12.0-nightly (1225e122f 2016-07-30)
Wrong documentation is generated for types that only implement Deref, but not DerefMut. It inherits methods from both Deref and DerefMut.
Steps to reproduce:
cargo new deref-doc-bugcargo doc --openGenerated documentation has methods for both
&[char]and&mut [char], for examplefn get_mut.Version