Make inline const work in range patterns#78116
Conversation
|
r=me with additional test cases. |
b8266d9 to
4b7a2ed
Compare
|
@petrochenkov check it out again because the half open ranges solutions seems a bit hacky to me. |
4b7a2ed to
038cdf7
Compare
5ce71b5 to
55c6566
Compare
5ce71b5 to
55c6566
Compare
camelid
left a comment
There was a problem hiding this comment.
It might be a good idea to add some UI check-fail tests for cases like:
match x {
1 .. const 2 => {}
}e59b2df to
065f046
Compare
It's interesting how this case fails ... In the parser we are looking for |
I'm trying to work on this in #78168. |
|
r=me after rebasing and squashing commits. |
065f046 to
5656a41
Compare
|
@bors r=petrochenkov |
|
📌 Commit 5656a41 has been approved by |
…t, r=petrochenkov Make inline const work in range patterns Fixes rust-lang#78108 which is a follow up of rust-lang#77124 r? @petrochenkov
Rollup of 17 pull requests Successful merges: - rust-lang#77268 (Link to "Contributing to Rust" rather than "Getting Started".) - rust-lang#77339 (Implement TryFrom between NonZero types.) - rust-lang#77488 (Mark `repr128` as `incomplete_features`) - rust-lang#77890 (Fixing escaping to ensure generation of welformed json.) - rust-lang#77918 (Cleanup network tests) - rust-lang#77920 (Avoid extraneous space between visibility kw and ident for statics) - rust-lang#77969 (Doc formating consistency between slice sort and sort_unstable, and big O notation consistency) - rust-lang#78098 (Clean up and improve some docs) - rust-lang#78116 (Make inline const work in range patterns) - rust-lang#78153 (Sync LLVM submodule if it has been initialized) - rust-lang#78163 (Clean up lib docs) - rust-lang#78169 (Update cargo) - rust-lang#78231 (Make closures inherit the parent function's target features) - rust-lang#78235 (Explain where the closure return type was inferred) - rust-lang#78255 (Reduce diagram mess in 'match arms have incompatible types' error) - rust-lang#78263 (Add regression test of issue-77668) - rust-lang#78265 (Add some inference-related regression tests about incorrect diagnostics) Failed merges: r? `@ghost`
Fixes #78108 which is a follow up of #77124
r? @petrochenkov