-
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
Add docs to librustc/hir/check_attr.rs #42408
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
Looks like there are some tidy errors here:
|
fixed tidy errors |
r? @michaelwoerister (I think) |
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.
Thanks for the PR, @bjorn3! I've added a comment below.
src/librustc/hir/check_attr.rs
Outdated
@@ -35,11 +35,26 @@ impl Target { | |||
} | |||
} | |||
|
|||
/// Visitor which check if all attributes are valid. | |||
/// | |||
/// Note: Doesn't check if attributes are existing. |
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'm not sure if this doc comment is useful. I would prefer a module-level comment saying something like:
//! This module implements some validity checks for attributes.
//! In particular it verifies that `#[inline]` and `#[repr]` attributes are
//! attached to items that actually support them and if there are
//! conflicts between multiple such attributes attached to the same
//! item.
Changed it |
Thank you! There is some trailing whitespace on some lines that makes Looks good to me otherwise. |
Removed trailing whitespace |
@bors r=michaelwoerister |
📌 Commit f4d89ba has been approved by |
Actually, could you squash these commits down to one please? Thanks! @bors r- |
Squashed |
Thanks! @bors r=michaelwoerister rollup |
📌 Commit e759370 has been approved by |
Add docs to librustc/hir/check_attr.rs Also moved `check_attribute` up to ease reading.
Also moved
check_attribute
up to ease reading.