Skip to content

Duplicate crate errors with #[phase(syntax)] #14330

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
alexcrichton opened this issue May 21, 2014 · 1 comment
Closed

Duplicate crate errors with #[phase(syntax)] #14330

alexcrichton opened this issue May 21, 2014 · 1 comment

Comments

@alexcrichton
Copy link
Member

#![feature(phase)]

#[phase(syntax, link)] extern crate std;
warning: using multiple versions of crate `std`
foo.rs:1:1: 1:1 note: used here
foo.rs:1 #![feature(phase)]
         ^
note: crate_id: std#0.11.0-pre
foo.rs:3:24: 3:41 note: used here
foo.rs:3 #[phase(syntax, link)] extern crate std;
                                ^~~~~~~~~~~~~~~~~
note: crate_id: std#0.11.0-pre
error: duplicate entry for `malloc`
error: duplicate entry for `free`
error: duplicate entry for `strdup_uniq`
error: duplicate entry for `eh_personality`
error: duplicate entry for `managed_heap`
error: duplicate entry for `gc`
error: aborting due to 6 previous errors

This should link in the same version of libstd, not two separate versions.

@lilyball
Copy link
Contributor

Curiously, the following works:

#![feature(phase)]
#[phase(syntax)]
extern crate std;

And the following works:

#![feature(phase)]
#[phase(link)]
extern crate std;

It's only the combination #[phase(syntax,link)] that fails.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Jun 24, 2014
We only need to register them once, and once they're registered twice warnings
will start being spewed or worse may happen!

Closes rust-lang#14330
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 a pull request may close this issue.

2 participants