-
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
Add loops to doc list of things not stable in const fn #61518
Conversation
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
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.
CI is complaining about line length.
tidy check
[00:04:55] tidy error: /checkout/src/librustc_mir/transform/qualify_min_const_fn.rs:302: line longer than 100 chars
[00:04:55] tidy error: /checkout/src/test/ui/consts/single_variant_match_ice.rs:18: line longer than 100 chars
[00:04:59] some tidy checks failed
@@ -15,7 +15,7 @@ impl Foo { | |||
use self::Foo::*; | |||
|
|||
match *self { | |||
Prob => 0x1, //~ ERROR `if`, `match`, `&&` and `||` are not stable in const fn | |||
Prob => 0x1, //~ ERROR `if`, `match`, `while`, `for`, `loop`, `&&` and `||` are not stable in const fn |
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.
move expectation comment to the next line and use the //~^
notation get around tidy
@@ -299,7 +299,7 @@ fn check_terminator( | |||
|
|||
TerminatorKind::FalseEdges { .. } | TerminatorKind::SwitchInt { .. } => Err(( | |||
span, | |||
"`if`, `match`, `&&` and `||` are not stable in const fn".into(), | |||
"`if`, `match`, `while`, `for`, `loop`, `&&` and `||` are not stable in const fn".into(), |
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.
use \
continuation to satisfy tidy?
@zackmdavis Thanks for the feedback. Honestly I think this error message is too long. What do you think about trying to reduce the length? I'm trying to bikeshed some new messages. Maybe:
|
6488a59
to
8ba8534
Compare
8ba8534
to
8e7ade8
Compare
@Centril done |
@bors r+ rollup |
📌 Commit 8e7ade8 has been approved by |
…s, r=Centril Add loops to doc list of things not stable in const fn Closes rust-lang#61508
Rollup of 11 pull requests Successful merges: - #61518 (Add loops to doc list of things not stable in const fn) - #61526 (move some tests into subfolders) - #61550 (Windows 10 SDK is also required now.) - #61606 (Remove some legacy proc macro flavors) - #61652 (Mention slice patterns in array) - #61686 (librustc_errors: Add some more documentation) - #61698 (typeck: Fix const generic in repeat param ICE.) - #61707 (Azure: retry failed awscli installs) - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - #61724 (core: use memcmp optimization for 128 bit integer slices) - #61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
Rollup of 11 pull requests Successful merges: - #61518 (Add loops to doc list of things not stable in const fn) - #61526 (move some tests into subfolders) - #61550 (Windows 10 SDK is also required now.) - #61606 (Remove some legacy proc macro flavors) - #61652 (Mention slice patterns in array) - #61686 (librustc_errors: Add some more documentation) - #61698 (typeck: Fix const generic in repeat param ICE.) - #61707 (Azure: retry failed awscli installs) - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - #61724 (core: use memcmp optimization for 128 bit integer slices) - #61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
Closes #61508