Closed
Description
use std::os::raw::c_long;
pub struct S(c_long);
impl From<c_long> for S {
fn from(i: c_long) -> S { S(i) }
}
The documentation for the S
trait implementations looks like this:
While the from
function itself is documented correctly to take a parameter of type c_long
, the From
trait has type parameter i64
instead of c_long
. I expected it to be impl From<c_long> for S
instead.
Meta
rustc +nightly --version
:
rustc 1.53.0-nightly (4a20eb6a9 2021-03-28)