mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 16:51:53 +03:00
parent
2dee43a3ca
commit
afb60974fe
@ -361,7 +361,7 @@ pub fn canonicalize_pattern<'a>(
|
||||
|
||||
// If we encountered an erroneous pattern (e.g. one with shadowing),
|
||||
// use the resulting RuntimeError. Otherwise, return a successful record destructure.
|
||||
opt_erroneous.unwrap_or_else(|| Pattern::RecordDestructure {
|
||||
opt_erroneous.unwrap_or(Pattern::RecordDestructure {
|
||||
whole_var,
|
||||
ext_var,
|
||||
destructs,
|
||||
|
@ -137,7 +137,7 @@ fn comments_or_new_lines_to_docs<'a>(
|
||||
match comment_or_new_line {
|
||||
DocComment(doc_str) => {
|
||||
docs.push_str(doc_str);
|
||||
docs.push_str("\n");
|
||||
docs.push('\n');
|
||||
}
|
||||
Newline | LineComment(_) => {}
|
||||
}
|
||||
|
@ -1263,7 +1263,7 @@ fn patterns_to_when<'a>(
|
||||
// Even if the body was Ok, replace it with this Err.
|
||||
// If it was already an Err, leave it at that Err, so the first
|
||||
// RuntimeError we encountered remains the first.
|
||||
body = body.and_then(|_| {
|
||||
body = body.and({
|
||||
Err(Located {
|
||||
region: pattern.region,
|
||||
value,
|
||||
|
@ -342,7 +342,7 @@ fn parse_concrete_type<'a>(
|
||||
//
|
||||
// If we made it this far and don't have a next_char, then necessarily
|
||||
// we have consumed a '.' char previously.
|
||||
return malformed(next_char.or_else(|| Some('.')), arena, state, parts);
|
||||
return malformed(next_char.or(Some('.')), arena, state, parts);
|
||||
}
|
||||
|
||||
if part_buf.is_empty() {
|
||||
|
@ -6,7 +6,7 @@ use libc::{c_void, size_t};
|
||||
|
||||
#[link(name = "alloca")]
|
||||
extern "C" {
|
||||
#[no_mangle]
|
||||
#[allow(dead_code)]
|
||||
fn c_alloca(_: size_t) -> *mut c_void;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user