-
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 help message for exclusive_range_pattern
error
#120152
add help message for exclusive_range_pattern
error
#120152
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@@ -398,7 +398,8 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { | |||
&self, | |||
exclusive_range_pattern, | |||
pattern.span, | |||
"exclusive range pattern syntax is experimental" | |||
"exclusive range pattern syntax is experimental", | |||
"use an inclusive range pattern, like N..=M" |
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.
This could also be made an automatically applicable suggestion using the right N
and M
values, but this is already an improvement, so let's land it.
@bors r+ rollup |
…ttern, r=oli-obk add help message for `exclusive_range_pattern` error Fixes rust-lang#120047 this error ``` error[E0658]: exclusive range pattern syntax is experimental --> src/lib.rs:3:9 | 3 | 0..42 => {}, | ^^^^^ | = note: see issue rust-lang#37854 <rust-lang#37854> for more information = help: use an inclusive range pattern, like N..=M ``` now includes a help message Not sure of proper procedure here but this seemed like a good help message (used the one suggested in the original issue), if you have a idea for one that is better or something I missed please comment!
…ttern, r=oli-obk add help message for `exclusive_range_pattern` error Fixes rust-lang#120047 this error ``` error[E0658]: exclusive range pattern syntax is experimental --> src/lib.rs:3:9 | 3 | 0..42 => {}, | ^^^^^ | = note: see issue rust-lang#37854 <rust-lang#37854> for more information = help: use an inclusive range pattern, like N..=M ``` now includes a help message Not sure of proper procedure here but this seemed like a good help message (used the one suggested in the original issue), if you have a idea for one that is better or something I missed please comment!
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#118578 (core: introduce split_at{,_mut}_checked) - rust-lang#119369 (exclude unexported macro bindings from extern crate) - rust-lang#119408 (xous: misc fixes + add network support) - rust-lang#119943 (std::net: bind update for using backlog as `-1` too.) - rust-lang#119948 (Make `unsafe_op_in_unsafe_fn` migrated in edition 2024) - rust-lang#119999 (remote-test: use u64 to represent file size) - rust-lang#120152 (add help message for `exclusive_range_pattern` error) - rust-lang#120213 (Don't actually make bound ty/const for RTN) - rust-lang#120225 (Fix -Zremap-path-scope typo) Failed merges: - rust-lang#119972 (Add `ErrCode`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120152 - rowan-sl:help-message-for-range-pattern, r=oli-obk add help message for `exclusive_range_pattern` error Fixes rust-lang#120047 this error ``` error[E0658]: exclusive range pattern syntax is experimental --> src/lib.rs:3:9 | 3 | 0..42 => {}, | ^^^^^ | = note: see issue rust-lang#37854 <rust-lang#37854> for more information = help: use an inclusive range pattern, like N..=M ``` now includes a help message Not sure of proper procedure here but this seemed like a good help message (used the one suggested in the original issue), if you have a idea for one that is better or something I missed please comment!
Fixes #120047
this error
now includes a help message
Not sure of proper procedure here but this seemed like a good help message (used the one suggested in the original issue), if you have a idea for one that is better or something I missed please comment!