Skip to content

Commit

Permalink
Don't panic due to borrow mut errors in arena allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Apr 30, 2019
1 parent 779d1b6 commit a1373b0
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 49 deletions.
44 changes: 23 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ collect-mac = "0.1.0"
either = "1.0.0"
itertools = "0.8"
futures = "0.1.11"
codespan = "0.2"
codespan-reporting = "0.2"
codespan = "0.3"
codespan-reporting = "0.3"

serde = { version = "1.0.0", optional = true }
serde_state = { version = "0.4.0", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ collect-mac = "0.1.0"
anymap = "0.12.0"
itertools = "0.8"
ordered-float = "1"
codespan = "0.2"
codespan-reporting = "0.2"
codespan = "0.3"
codespan-reporting = "0.3"
either = "1"
stable_deref_trait = "1"
vec_map = "0.8"
Expand Down
4 changes: 2 additions & 2 deletions check/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ rpds = "0.5"
stable_deref_trait = "1"
quick-error = "1"

codespan = "0.2"
codespan-reporting = "0.2"
codespan = "0.3"
codespan-reporting = "0.3"

strsim = "0.8.0"

Expand Down
12 changes: 12 additions & 0 deletions check/tests/fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,10 @@ Types do not match:
Expected: Int -> a
Found: ()
- <test>:2:4
|
2 | () 1
| ^
|
- Attempted to call a non-function value
"#
);
Expand All @@ -429,8 +431,10 @@ Row labels do not match.
Expected: A
Found: B
- <test>:5:11
|
5 | eq (A 0) (B 0.0)
| ^^^^^
|
"#
);
}
Expand All @@ -454,8 +458,10 @@ Found: { x : Int }
1 errors were found during unification:
The type `()` lacks the following fields: x
- <test>:4:7
|
4 | f { } { x = 1 }
| ^^^^^^^^^
|
"#
);
}
Expand All @@ -482,8 +488,10 @@ f (Test (Test 1))
&*format!("{}", result.unwrap_err()).replace("\t", " "),
r#"error: Implicit parameter with type `test.Eq Int` could not be resolved.
- <test>:11:3
|
11 | f (Test (Test 1))
| ^^^^^^^^^^^^^^^
|
- Required because of an implicit parameter of `[test.Eq Int] -> test.Eq (test.Test Int)`
- Required because of an implicit parameter of `[test.Eq (test.Test Int)] -> test.Eq (test.Test (test.Test Int))`
"#,
Expand Down Expand Up @@ -704,8 +712,10 @@ Types do not match:
Expected: Int -> Float -> a
Found: String
- <test>:3:7
|
3 | id "" 1 1.0
| ^^^^^
|
- Attempted to call function with 3 arguments but its type only has 1
"#
);
Expand Down Expand Up @@ -738,8 +748,10 @@ Types do not match:
Expected: Int -> Int -> a
Found: test.Eff [| | r |] Int
- <test>:10:3
|
10 | f x 1
| ^
|
"#
);
}
Expand Down
2 changes: 1 addition & 1 deletion completion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ documentation = "https://docs.rs/gluon"
either = "1.0.0"
itertools = "0.8"
walkdir = "2"
codespan = "0.2"
codespan = "0.3"

gluon_base = { path = "../base", version = "0.11.2" } # GLUON

Expand Down
2 changes: 1 addition & 1 deletion format/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ documentation = "https://docs.rs/gluon"
log = "0.4"
pretty = "0.5"
itertools = "0.8"
codespan = "0.2"
codespan = "0.3"

gluon_base = { path = "../base", version = "0.11.2" } # GLUON

Expand Down
4 changes: 2 additions & 2 deletions parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ log = "0.4"
pretty = "0.5"
gluon_base = { path = "../base", version = "0.11.2" } # GLUON
ordered-float = "1"
codespan = "0.2"
codespan-reporting = "0.2"
codespan = "0.3"
codespan-reporting = "0.3"

[dev-dependencies]
env_logger = "0.6"
Expand Down
4 changes: 2 additions & 2 deletions repl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ env_logger = { version = "0.6", optional = true }
lazy_static = "0.2.0"
rustyline = "1.0.0"
walkdir = "2"
codespan = "0.2"
codespan-reporting = "0.2"
codespan = "0.3"
codespan-reporting = "0.3"


serde = "1"
Expand Down
2 changes: 2 additions & 0 deletions tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ fn macro_error_with_line_column_info() {
.unwrap(),
r#"error: Could not find module 'undefined'. Searched `.`.
- <test>:1:9
|
1 | import! undefined
| ^^^^^^^^^
|
"#
);
}
2 changes: 1 addition & 1 deletion vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build = "build.rs"

[dependencies]
bitflags = "1.0.0"
codespan = "0.2"
codespan = "0.3"
collect-mac = "0.1.0"
frunk_core = "0.2"
futures = "0.1.0"
Expand Down
Loading

0 comments on commit a1373b0

Please sign in to comment.