-
Notifications
You must be signed in to change notification settings - Fork 13.5k
tests/ui
: A New Order [27/N]
#143302
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
base: master
Are you sure you want to change the base?
tests/ui
: A New Order [27/N]
#143302
Conversation
This comment has been minimized.
This comment has been minimized.
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 might have a couple other comments too but the GH UI is giving me some problems with the diff. Could you squash?
// `expr?` expands to: | ||
// | ||
// match expr { | ||
// Ok(val) => val, | ||
// Err(err) => return Err(From::from(err)), | ||
// } | ||
// | ||
// This test verifies that the expansion is hygienic, i.e., it's not affected by other `val` and | ||
// `err` bindings that may be in scope. |
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.
Why is this deleted?
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.
AFAIK, it's not true anymore, it expands into this https://doc.rust-lang.org/std/ops/trait.Try.html#tymethod.branch
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.
like this
match maybe_err.branch() {
ControlFlow::Continue(r) => r,
ControlFlow::Break(e) => return Result::from_residual(e),
}
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.
Also if it'll help to you invistigation what is going here, here is a discussion about it #84277 (comment)
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 squashed commits, but still have some questions
@@ -1,17 +1,17 @@ | |||
//@ build-fail |
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.
Just drop it like this with no any addition?
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.
Yeah - the default is check-fail
, and I'm thinking that is fine here since we're testing frontend diagnostics. We prefer that because it's cheap+fast (no codegen required). build-fail
is used for things that are expected to fail later, like linking problems.
Some more info at https://rustc-dev-guide.rust-lang.org/tests/ui.html#controlling-passfail-expectations
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.
Test is not passing if i remove build-fail, so... I guess we should keep it
Note
Intermediate commits are intended to help review, but will be squashed prior to merge.
Some
tests/ui/
housekeeping, to trim down number of tests directly undertests/ui/
. Part of #133895.r? @tgross35