Skip to content

Fix feature gate for #[link_args(..)] attribute #43109

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

Merged
merged 1 commit into from
Jul 10, 2017

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Jul 7, 2017

Fix feature gate for #[link_args(..)] attribute so that it will fire regardless of context of attribute.

See also #29596 and #43106

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@pnkfelix pnkfelix force-pushed the fix-link_args-gate branch 3 times, most recently from 820387e to 0419a01 Compare July 7, 2017 14:15
@est31
Copy link
Member

est31 commented Jul 7, 2017

Should this be cratered?

@pnkfelix
Copy link
Member Author

pnkfelix commented Jul 7, 2017

(agh that's almost certainly going to break tidy; will fix pronto)

@pnkfelix
Copy link
Member Author

pnkfelix commented Jul 7, 2017

@est31 yeah probably, just to double-check that the impact is minimal

(because otherwise I suspect we would go through the more painful route of a warning cycle)

@shepmaster shepmaster added the S-waiting-on-crater Status: Waiting on a crater run to be completed. label Jul 7, 2017
@nikomatsakis
Copy link
Contributor

build fails:

---- [compile-fail] compile-fail/gated-link-args.rs stdout ----

[00:39:48] 	

[00:39:48] error: /checkout/src/test/compile-fail/gated-link-args.rs:28: unexpected "error": '28:1: 28:14: the name `main` is defined multiple times [E0428]'

[00:39:48] 

[00:39:48] error: 1 unexpected errors found, 0 expected errors not found

[00:39:48] status: exit code: 101

[00:39:48] command: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc /checkout/src/test/compile-fail/gated-link-args.rs -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail --target=x86_64-unknown-linux-gnu --error-format json -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/gated-link-args.stage2-x86_64-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o /checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/gated-link-args.stage2-x86_64-unknown-linux-gnu -Crpath -O -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers

[00:39:48] unexpected errors (from JSON output): [

[00:39:48]     Error {

[00:39:48]         line_num: 28,

[00:39:48]         kind: Some(

[00:39:48]             Error

[00:39:48]         ),

[00:39:48]         msg: "28:1: 28:14: the name `main` is defined multiple times [E0428]"

[00:39:48]     }

[00:39:48] ]

@nikomatsakis
Copy link
Contributor

Crater builds complete. Running tests now.

// purposes of this test)
#![allow(unused_attributes)]

#[link_args = "-l bunny1"] //~ ERROR: the `link_args` attribute is experimental
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to test it as a crate level attribute #![link_args] instead of as an attribute on an item.

regardless of context of attribute.

Extend the gating test to include the attribute in "weird" places.
@pnkfelix pnkfelix force-pushed the fix-link_args-gate branch from 5f0c06f to c512dea Compare July 10, 2017 10:28
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jul 10, 2017

Here is the crater report:

Root regressions, sorted by rank:

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 10, 2017

📌 Commit c512dea has been approved by nikomatsakis

@bors
Copy link
Collaborator

bors commented Jul 10, 2017

⌛ Testing commit c512dea with merge eb9dfb8...

bors added a commit that referenced this pull request Jul 10, 2017
Fix feature gate for `#[link_args(..)]` attribute

Fix feature gate for `#[link_args(..)]` attribute so that it will fire regardless of context of attribute.

See also #29596 and #43106
@bors
Copy link
Collaborator

bors commented Jul 10, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing eb9dfb8 to master...

@bors bors merged commit c512dea into rust-lang:master Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-crater Status: Waiting on a crater run to be completed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants