Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support const trait impls in unstable-api tool #33

Closed
yaahc opened this issue Oct 5, 2021 · 1 comment
Closed

Support const trait impls in unstable-api tool #33

yaahc opened this issue Oct 5, 2021 · 1 comment
Labels
A-unstable-api Area: Unstable API dumper

Comments

@yaahc
Copy link
Member

yaahc commented Oct 5, 2021

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

@dtolnay
Copy link
Member

dtolnay commented Nov 23, 2023

Const trait impls such as this one have been removed from the standard library since rust-lang/rust#110393.

@dtolnay dtolnay added the A-unstable-api Area: Unstable API dumper label Nov 23, 2023
@dtolnay dtolnay changed the title Fix unstable-api Support const trait impls in unstable-api tool Nov 23, 2023
@dtolnay dtolnay closed this as completed Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-unstable-api Area: Unstable API dumper
Projects
None yet
Development

No branches or pull requests

2 participants