Skip to content

documentation buglet in Traits section #26287

Closed
@tromey

Description

@tromey

I am reading here:

http://doc.rust-lang.org/stable/book/traits.html#where-clause

I also checked the nightly docs, which are the same.

The example says:

// can be called with T == i64
fn inverse<T>() -> T
        // this is using ConvertTo as if it were "ConvertFrom<i32>"
        where i32: ConvertTo<T> {
    1i32.convert()
}

However, I did not see any other mention of li32. It seems like it should probably be the name of a formal argument to inverse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions