Skip to content

extern_in_paths feature fails when extern starts a type #48262

Closed
@nikomatsakis

Description

@nikomatsakis

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

Metadata

Metadata

Assignees

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions