Skip to content

Rust stable 1.30 allows use of extern crates without declaration #55478

Closed
@jrobsonchase

Description

@jrobsonchase

Example crate(s): https://github.com/jrobsonchase/cloud_to_butt

It appears that rust stable 1.30 allows the use of absolute paths to items from other crates without the extern crate declaration. This works in code, but not in use statements.

I originally thought it was just a proc-macro crate problem since that's where I noticed it first, but it shows up in both. See https://github.com/jrobsonchase/cloud_to_butt/blob/master/src/lib.rs#L28 and https://github.com/jrobsonchase/cloud_to_butt/blob/master/cloud/src/main.rs#L10. Both contain full paths to syn/proc_macro2 items that shouldn't be available since there's been no extern crate for either.

my rustc version:

rustc 1.30.0 (da5f414c2 2018-10-24)

Metadata

Metadata

Assignees

Labels

A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyT-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