Skip to content

extern_in_paths feature fails when extern starts a type #48262

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

Closed
nikomatsakis opened this issue Feb 16, 2018 · 0 comments
Closed

extern_in_paths feature fails when extern starts a type #48262

nikomatsakis opened this issue Feb 16, 2018 · 0 comments
Assignees
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

The following test:

#![feature(extern_in_paths)]

fn foo<T>() { }

fn main() {
    foo::<extern::std::fmt::Formatter>();
}

Gives me:

error: expected `fn`, found `::`
 --> src/main.rs:6:17
  |
6 |     foo::<extern::std::fmt::Formatter>();
  |                 ^^ expected `fn` here

cc @petrochenkov

@petrochenkov petrochenkov self-assigned this Feb 16, 2018
@pietroalbini pietroalbini added A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 20, 2018
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 24, 2018
Fix parsing of extern paths in types and poly-traits

Fixes rust-lang#48262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants