-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove extern mod foo (name="bar")
syntax, closes #9543
#10696
Conversation
I've updated to obsolete syntax in the tests. One thing I was wondering about: should |
It's a package id, so the most specific one would be |
Does this mean we could get rid of the whole |
I thought this was the plan. My PR for stable crate hashes removes the tests for this functionality since link args is getting removed there. |
Ah I see! So I guess I should wait until your PR (#10593 , if I'm not wrong) is merged and remove the |
You can remove it now if you like. I can rebase my PR over yours when it lands. They are orthogonal changes that happen to overlap in removing a few of the same tests :) |
It seems a little odd to only remove |
That seemed odd to me as well. I've updated my patch and removed the parsing of linkage attributes altogether and display a obsolete syntax message instead. |
@alexcrichton Yes. I was planning to make the old syntax an error instead of a warning, but that is probably something that should be decided by Rust core team. In any case, this is better than the silent ignoring we have now. |
@metajack this version of the patch gives an error fhahn@c199905#diff-da9d34ca1d0f6beee2838cf02e07345cR4433 |
This needs a rebase again, and I would be comfortable merging this if it also removes the array of attributes from |
I've rebase this PR and removed the arry of attributes. |
@@ -21,8 +21,6 @@ use syntax::fold; | |||
use syntax::opt_vec; | |||
use syntax::util::small_vector::SmallVector; | |||
|
|||
static STD_VERSION: &'static str = "0.9-pre"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah now I remember something I remembered awhile ago, these need to change to link to the proper libstd. Right now this is just linking to an arbitrary libstd but we want it to target a specific version (in this case 0.9-pre
). The extern mod
statements below should not have None
, but rather Some("std#0.9-pre")
(or the equivalent thereof)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed another commit, addressing this point.
Just a few more minor comments. With this addressed and a squash into one commit, looks good to me! |
After injecting the std libs with version numbers, I noticed a problem with I've squashed everything into two commits, one for the syntax removal and one for the injection with versions, because they seem like two distinct changes to me, but I could squash them into one big commit. |
It seems like I forgot to run |
…pcwalton This patch for #9543 throws an `obsolete syntax` error for `extern mod foo (name="bar")` . I was wondering if [this](https://github.com/fhahn/rust/compare/mozilla:master...fhahn:issue9543-remove-extern-mod-foo?expand=1#diff-da9d34ca1d0f6beee2838cf02e07345cR4444) is the correct place to do this? I think the wording of the error message could probably be improved as well. If this approach is OK, I'm going to run the whole test suite tomorrow and update the old syntax to the new one.
…=flip1995 Fix `#[allow(clippy::enum_variant_names)]` directly on variants changelog: [`enum_variant_names`]: Fix `#[allow]` attributes applied directly to the enum variant Fixes rust-lang#10695
This patch for #9543 throws an
obsolete syntax
error forextern mod foo (name="bar")
.I was wondering if this is the correct place to do this?
I think the wording of the error message could probably be improved as well.
If this approach is OK, I'm going to run the whole test suite tomorrow and update the old syntax to the new one.