Skip to content

Support const trait impls in unstable-api tool #33

Closed
@yaahc

Description

@yaahc

The unstable-api tool is currently broken and always errors out with "expected identifier" when run against the rust codebase. The issue seems to be caused by the following impl:

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_deref", issue = "88955")]
impl<B: ?Sized + ToOwned> const Deref for Cow<'_, B>
where
    B::Owned: ~const Borrow<B>,
{
    type Target = B;

    fn deref(&self) -> &B {
        match *self {
            Borrowed(borrowed) => borrowed,
            Owned(ref owned) => owned.borrow(),
        }
    }
}

To fix this we will need to update syn to support this new syntax: dtolnay/syn#1051

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions