-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Consider cfg_attr
checked by CheckAttrVisitor
#128718
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
4724c42
to
d4b9036
Compare
r? @nnethercote (since you reviewed #128581) |
//! issue: rust-lang/rust#128716 | ||
#![crate_type = "lib"] | ||
|
||
#[cfg_attr::skip] |
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 a bit confused by this. cfg_attr::skip
is an invalid attribute, right? cfg_attr
attributes are supposed to have the form cfg_attr(cond, x)
.
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.
EDIT: actually let me double check this.
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.
If so, can you change skip
to something more obvious incorrect, such as bogus
or no_such_thing
?
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.
Sure thing, yeah cfg_attr::skip
is an invalid attribute, it first emits an error in resolve and then fails in the check attr pass afterwards.
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.
Changed from skip
-> no_such_thing
.
@rustbot review
@rustbot author |
d4b9036
to
97cbc20
Compare
@bors r+ |
…cote Consider `cfg_attr` checked by `CheckAttrVisitor` I forgor about `cfg_attr` in rust-lang#128581, it should be treated like `cfg`. Fixes rust-lang#128716.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125048 (PinCoerceUnsized trait into core) - rust-lang#128273 (Improve `Ord` violation help) - rust-lang#128406 (implement BufReader::peek) - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules) - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted) - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`) - rust-lang#128710 (Don't ICE when getting an input file name's stem fails) - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125048 (PinCoerceUnsized trait into core) - rust-lang#128273 (Improve `Ord` violation help) - rust-lang#128406 (implement BufReader::peek) - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules) - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted) - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`) - rust-lang#128710 (Don't ICE when getting an input file name's stem fails) - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#124944 (On trait bound mismatch, detect multiple crate versions in dep tree) - rust-lang#125048 (PinCoerceUnsized trait into core) - rust-lang#128406 (implement BufReader::peek) - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules) - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted) - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`) - rust-lang#128710 (Don't ICE when getting an input file name's stem fails) - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`) - rust-lang#128751 (std::thread: set_name implementation proposal for vxWorks.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128718 - jieyouxu:check-cfg_attr, r=nnethercote Consider `cfg_attr` checked by `CheckAttrVisitor` I forgor about `cfg_attr` in rust-lang#128581, it should be treated like `cfg`. Fixes rust-lang#128716.
I forgor about
cfg_attr
in #128581, it should be treated likecfg
.Fixes #128716.