-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Advent of tests/ui
(misc cleanups and improvements) [1/N]
#133900
Conversation
//! This test tries to exercise that by checking that the "empty trait list for derive" warning for | ||
//! `#[derive()]` is permitted by `-A warnings`, which is a non-lint warning. |
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.
Remark: I elaborated on the "how" here because it was very not obvious how this test did the check.
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.
Discussion: this one I have no idea. I suspect this test in the current form is not checking what the original commit intended to check. git archaeology also failed me because in d7d3871 this test
started working correctly at some point.
and was unmarked as xfail
(compile-fail at thew time).
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.
Original form as in fb76c25 is:
tag sty {
ty_nil;
}
type raw_t = rec(sty struct,
option::t[str] cname,
uint hash);
fn mk_raw_ty(sty st, &option::t[str] cname) -> raw_t {
ret rec(struct=st,
cname=cname,
hash=0u);
}
fn main() {
mk_raw_ty(ty_nil, none[str]);
}
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.
Ah yes, tricky.
This comment was marked as outdated.
This comment was marked as outdated.
tests/ui
(misc cleanups and improvements) [1/N]
b7ae207
to
b797dc2
Compare
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 your patience. r=me with concerns resolved and renaming-commits squashed into the respective previous commit.
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.
Ah yes, tricky.
tests/ui/as-precedence.rs
Outdated
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.
Lol, interesting corner case of the language. I never thought about operator precedence in code like &() as &Trait + Send
: It gets parsed as &() as &(Trait) + Send
instead of &() as &(Trait + Send)
and therefore Send
doesn't get interpreted as a trait object trait bound.
b797dc2
to
0e8f602
Compare
Rebase force-push, no functional changes, intended to make review easier. |
0e8f602
to
32b9336
Compare
Squash force-push, no functional changes, squashed move commits into the test content changes for each test. |
- Document and tidy up `alias-uninit-value.rs` - Move `alias-uninit-value.rs` to `tests/ui/codegen/`
- Document `allow-non-lint-warnings.rs` - Move `allow-non-lint-warnings.rs` under `tests/ui/diagnostic-flags/` - Improve the test to use two *differential* revisions: 1. One revision checks that without `-A warnings` the code sample actually emits a warning. 2. The other revision checks that `-A warnings` suppresses the warning. This makes sure that if the code sample no longer warns, the test doesn't silently pass but fail to check its intended purpose.
- Document `anonymous-higher-ranked-lifetime.rs` - Move `anonymous-higher-ranked-lifetime.rs` to `tests/ui/higher-ranked`
- Document `artificial-block.rs` - Move `artificial-block.rs` under `tests/ui/reachable`
- Document `as-precedence.rs` - Move `as-precedence.rs` under `tests/ui/parser/`
32b9336
to
56efa0a
Compare
Changes since last review
Commits are squashed and rebased before force-push 56efa0a to help with the compare diff, they contain no changes beforehand. @rustbot ready |
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.
Beautiful, thanks a lot!
differential revisions
🙏 🙏 🙏
@bors r+ rollup |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133900 (Advent of `tests/ui` (misc cleanups and improvements) [1/N]) - rust-lang#133937 (Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them) - rust-lang#133938 (`rustc_mir_dataflow` cleanups, including some renamings) - rust-lang#134058 (interpret: reduce usage of TypingEnv::fully_monomorphized) - rust-lang#134130 (Stop using driver queries in the public API) - rust-lang#134140 (Add AST support for unsafe binders) - rust-lang#134229 (Fix typos in docs on provenance) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133900 (Advent of `tests/ui` (misc cleanups and improvements) [1/N]) - rust-lang#133937 (Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them) - rust-lang#133938 (`rustc_mir_dataflow` cleanups, including some renamings) - rust-lang#134058 (interpret: reduce usage of TypingEnv::fully_monomorphized) - rust-lang#134130 (Stop using driver queries in the public API) - rust-lang#134140 (Add AST support for unsafe binders) - rust-lang#134229 (Fix typos in docs on provenance) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133900 - jieyouxu:ui-cleanup-1, r=fmease Advent of `tests/ui` (misc cleanups and improvements) [1/N] Part of rust-lang#133895. Misc improvements to some ui tests immediately under `tests/ui/`. Best reviewed commit-by-commit. Thanks `@clubby789` for PR title suggestion 😸. r? compiler
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133900 (Advent of `tests/ui` (misc cleanups and improvements) [1/N]) - rust-lang#133937 (Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them) - rust-lang#133938 (`rustc_mir_dataflow` cleanups, including some renamings) - rust-lang#134058 (interpret: reduce usage of TypingEnv::fully_monomorphized) - rust-lang#134130 (Stop using driver queries in the public API) - rust-lang#134140 (Add AST support for unsafe binders) - rust-lang#134229 (Fix typos in docs on provenance) r? `@ghost` `@rustbot` modify labels: rollup
Part of #133895.
Misc improvements to some ui tests immediately under
tests/ui/
.Best reviewed commit-by-commit.
Thanks @clubby789 for PR title suggestion 😸.
r? compiler