Skip to content

Commit e3533a5

Browse files
committed
Minor fixes
1 parent cf40b27 commit e3533a5

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

doc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ serde = "1.0.0"
3232
serde_derive = "1.0.0"
3333
serde_json = "1.0.0"
3434

35-
gluon = { version = "0.16.1", path = ".." } # GLUON
35+
gluon = { version = "0.16.1", default-features = false, path = ".." } # GLUON
3636
completion = { package = "gluon_completion", version = "0.16.1", path = "../completion" } # GLUON
3737

3838

src/std_lib/regex.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
extern crate regex;
44

5-
use crate::vm::{self, api::Collect, thread::Thread, ExternModule};
5+
use crate::vm::{self, thread::Thread, ExternModule};
66

77
#[derive(Debug, Userdata, Trace, VmType)]
88
#[gluon(vm_type = "std.regex.Regex")]
@@ -52,14 +52,12 @@ fn find<'a>(re: &Regex, text: &'a str) -> Option<Match<'a>> {
5252
re.find(text).map(Match::new)
5353
}
5454

55-
fn captures<'a>(
56-
re: &Regex,
57-
text: &'a str,
58-
) -> Option<Collect<impl Iterator<Item = Option<Match<'a>>>>> {
55+
fn captures<'a>(re: &Regex, text: &'a str) -> Option<Vec<Option<Match<'a>>>> {
5956
let &Regex(ref re) = re;
6057
re.captures(text)
6158
.map(|c| (0..c.len()).map(move |i| c.get(i).map(Match::new)))
62-
.map(Collect::new)
59+
// FIXME Once rust stops ICEing .map(Collect::new)
60+
.map(|i| i.collect())
6361
}
6462

6563
fn error_to_string(err: &Error) -> String {

tests/vm.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,3 +1091,15 @@ let tell : Eff [| writer : Writer | r |] () =
10911091
"#,
10921092
()
10931093
}
1094+
1095+
test_expr! { issue_863,
1096+
r"
1097+
#[infix(right, 0)]
1098+
let (<|) f x : (a -> b) -> a -> b = f x
1099+
1100+
let g f x = x
1101+
let f a =
1102+
g a <| f a
1103+
{ f }
1104+
"
1105+
}

0 commit comments

Comments
 (0)