Skip to content

scarb doc fix duplicated trait function generics #2649

@FroyaTheHen

Description

@FroyaTheHen

repro:

pub trait TryInto<T, S> {
    /// Attempts to convert the input type T into the output type S.
    /// In the event of a conversion error, returns [`None`].
    ///
    /// # Examples
    ///
    /// ```
    /// let a: Option<u8> = 1_u16.try_into();
    /// assert!(a == Some(1));
    /// let b: Option<u8> = 256_u16.try_into();
    /// assert!(b == None);
    /// ```
    fn try_into(self: T) -> Option<S>;
}

generates:

fn try_into<T, S, T, S>(self: T) -> Option<S>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions