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

Parse ForeignItem type with generics and bounds #790

Merged
merged 1 commit into from
May 6, 2020
Merged

Parse ForeignItem type with generics and bounds #790

merged 1 commit into from
May 6, 2020

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented May 6, 2020

As tested by https://github.com/rust-lang/rust/blob/1836e3b42a5b2f37fd79104eedbe8f48a5afdee6/src/test/ui/parser/foreign-ty-syntactic-pass.rs.

extern "C" {
    type A: Ord;
    type A<'a> where 'a: 'static;
    type A<T: Ord> where T: 'static;
    type A = u8;
    type A<'a: 'static, T: Ord + 'static>: Eq + PartialEq where T: 'static + Copy = Vec<u8>;
}

Closes #763. Required for dtolnay/cxx#99.

@dtolnay dtolnay merged commit 8e016b4 into master May 6, 2020
@dtolnay dtolnay deleted the ety branch May 6, 2020 23:21
dtolnay added a commit to dtolnay/cxx that referenced this pull request May 8, 2020
Includes dtolnay/syn#790 which we need for
extern type aliases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse extern type with trait bound
1 participant