Skip to content
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

feature error span on attribute for fn_must_use, SIMD/align reprs, macro reëxport #44111

Merged
merged 1 commit into from
Aug 29, 2017

Conversation

zackmdavis
Copy link
Member

There were several feature-gated attributes for which the feature-not-available
error spans would point to the item annotated with the gated attribute, when it
would make more sense for the span to point to the attribute itself: if the
attribute is removed, the function/struct/&c. likely still makes sense and the
program will compile. (Note that we decline to make the analogous change for
the main, start, and plugin_registrar features, for in those cases it
makes sense for the span to implicate the entire function, of which there is
little hope of using without the gated attribute.)

feature_attr_error_span

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@zackmdavis
Copy link
Member Author

(Delegating my compile-fail testing to Travis; I'll force push afterwards.)

@zackmdavis
Copy link
Member Author

update; one of the compile-fail tests still broken 😞 ; I may not have time to fix it for a few days

There were several feature-gated attributes for which the
feature-not-available error spans would point to the item annotated with
the gated attribute, when it would make more sense for the span to point
to the attribute itself: if the attribute is removed, the
function/struct/&c. likely still makes sense and the program will
compile. (Note that we decline to make the analogous change for the
`main`, `start`, and `plugin_registrar` features, for in those cases it
makes sense for the span to implicate the entire function, of which
there is little hope of using without the gated attribute.)
@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2017
@nikomatsakis
Copy link
Contributor

@bors r+

Nice!

@bors
Copy link
Contributor

bors commented Aug 28, 2017

📌 Commit 8bb2946 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Aug 29, 2017

⌛ Testing commit 8bb2946 with merge faf477a...

bors added a commit that referenced this pull request Aug 29, 2017
…akis

feature error span on attribute for fn_must_use, SIMD/align reprs, macro reëxport

There were several feature-gated attributes for which the feature-not-available
error spans would point to the item annotated with the gated attribute, when it
would make more sense for the span to point to the attribute itself: if the
attribute is removed, the function/struct/_&c._ likely still makes sense and the
program will compile. (Note that we decline to make the analogous change for
the `main`, `start`, and `plugin_registrar` features, for in those cases it
makes sense for the span to implicate the entire function, of which there is
little hope of using without the gated attribute.)

![feature_attr_error_span](https://user-images.githubusercontent.com/1076988/29746531-fd700bfe-8a91-11e7-9c5b-6f5324083887.png)
@bors
Copy link
Contributor

bors commented Aug 29, 2017

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

@bors bors merged commit 8bb2946 into rust-lang:master Aug 29, 2017
@zackmdavis zackmdavis deleted the feature_attr_error_span branch January 13, 2018 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants