-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Slew of builtin-attribute gating tests #43168
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
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Oh, and just in case there's any debate about what the "point" is of these tests, this comment from
|
@aturon Looks like this is waiting on a review from you. Also pinged on IRC. |
@bors: r+ |
📌 Commit 39b8aaf has been approved by |
⌛ Testing commit 39b8aaf with merge 16068c512dcfc0dea5290f625b93b1da49702b61... |
💔 Test failed - status-travis |
@bors retry |
⌛ Testing commit 39b8aaf with merge cbbf509e94e1b24a3c4026963544918a85f8e03c... |
☀️ Test successful - status-appveyor, status-travis |
👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward |
@bors retry |
Slew of builtin-attribute gating tests Slew of builtin-attribute "gating" tests for issue #43106. Some stray observations: * I don't know if its a good thing that so many attributes allow inputs which are silently discarded. (I made heavy use of that in writing my tests, but that was more out of curiosity than necessity.) * The difference between crate-level and non-crate-level behavior is quite significant in some cases. Definitely worth making sure one has tests for both cases. (Not as clear whether it was worthwhile trying the various other AST forms like `fn f()` vs `struct S;`) * `#[no_builtins]` and `#[no_mangle]` occur twice on the `BUILTIN_ATTRIBUTES` list. Thats almost certainly a bug. (Filed as #43148) * We are maximally liberal in what we allow for `#[test]` and `#[bench]` when one compiles without `--test`. * We allow `#[no_mangle]` on arbitrary AST nodes, but only warn about potential misuse on `fn` * We allow `#[cold]`, `#[must_use]`, `#[windows_subsystem]`, and `#[no_builtins]` on arbitrary AST nodes. I don't know off-hand what the semantics are for e.g. a `#[cold] type T = ...;` * We allow crate-level `#![inline]`. That's probably a bug since its otherwise restricted to `fn` items
☀️ Test successful - status-appveyor, status-travis |
Slew of builtin-attribute "gating" tests for issue #43106.
Some stray observations:
fn f()
vsstruct S;
)#[no_builtins]
and#[no_mangle]
occur twice on theBUILTIN_ATTRIBUTES
list. Thats almost certainly a bug. (Filed as #![no_builtins] attribute occurs twice on BUILTIN_ATTRIBUTES list #43148)#[test]
and#[bench]
when one compiles without--test
.#[no_mangle]
on arbitrary AST nodes, but only warn about potential misuse onfn
#[cold]
,#[must_use]
,#[windows_subsystem]
, and#[no_builtins]
on arbitrary AST nodes. I don't know off-hand what the semantics are for e.g. a#[cold] type T = ...;
#![inline]
. That's probably a bug since its otherwise restricted tofn
items