Merge packed encodings more permissively #167
ci.yml
on: pull_request
Lint
32s
Check Formatting
26s
Matrix: Test
Annotations
2 errors and 46 warnings
Test (ubuntu-latest)
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Test (macos-latest)
The process '/Users/runner/.cargo/bin/cargo' failed with exit code 101
|
Check Formatting
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Check Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/mod.rs#L398
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/mod.rs:398:29
|
398 | ... pairs.extend(xs.into_iter().map(|(ty, ofs)| (ty, ofs + offset)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `pairs.extend(xs.into_iter().map(|(ty, ofs)| (ty, ofs + offset)));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
using `clone` on type `Span` which implements the `Copy` trait:
src/inference/unification/mod.rs#L455
warning: using `clone` on type `Span` which implements the `Copy` trait
--> src/inference/unification/mod.rs:455:42
|
455 | let first_span = types.first().expect("Non-empty vector was empty").clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*types.first().expect("Non-empty vector was empty")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` implied by `#[warn(clippy::all)]`
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/unification/mod.rs#L394
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/unification/mod.rs:394:25
|
394 | inferences.push(Judgement::new(span.typ, TE::packed_of(spans_at_zero)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `inferences.push(Judgement::new(span.typ, TE::packed_of(spans_at_zero)));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`:
src/inference/unification/mod.rs#L359
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/inference/unification/mod.rs:359:35
|
359 | for span in input.into_iter().sorted_by_key(|s| (s.offset, s.size)) {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` implied by `#[warn(clippy::all)]`
|
used `cloned` where `copied` could be used instead:
src/inference/unification/mod.rs#L351
warning: used `cloned` where `copied` could be used instead
--> src/inference/unification/mod.rs:351:63
|
351 | let new_ty_vars = spans.iter().map(|(ty, ..)| ty).cloned().collect_vec();
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
= note: `#[warn(clippy::cloned_instead_of_copied)]` implied by `#[warn(clippy::pedantic)]`
|
this let-binding has unit value:
src/inference/unification/mod.rs#L82
warning: this let-binding has unit value
--> src/inference/unification/mod.rs:82:13
|
82 | let _ = DEBUGGER.extend(vars_for);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `DEBUGGER.extend(vars_for);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` implied by `#[warn(clippy::all)]`
|
docs for function which may panic missing `# Panics` section:
src/inference/unification/mod.rs#L44
warning: docs for function which may panic missing `# Panics` section
--> src/inference/unification/mod.rs:44:1
|
44 | pub fn unify(state: &mut InferenceState, watchdog: &DynWatchdog) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/inference/unification/mod.rs:48:27
|
48 | let type_for_slot_8 = type_for_slot_at(8, state).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
|
redundant closure:
src/inference/unification/mod.rs#L29
warning: redundant closure
--> src/inference/unification/mod.rs:29:62
|
29 | static mut DEBUGGER: Lazy<HashSet<TypeVariable>> = Lazy::new(|| HashSet::new());
| ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `HashSet::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
note: the lint level is defined here
--> src/lib.rs:114:9
|
114 | #![warn(clippy::all, clippy::cargo, clippy::pedantic)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::redundant_closure)]` implied by `#[warn(clippy::all)]`
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/debug.rs#L207
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/debug.rs:207:21
|
207 | tyvar_queue.push_back(s.typ)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `tyvar_queue.push_back(s.typ);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/debug.rs#L189
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/debug.rs:189:21
|
189 | tyvar_queue.push_back(*id)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `tyvar_queue.push_back(*id);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead:
src/inference/debug.rs#L162
warning: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
--> src/inference/debug.rs:162:17
|
162 | let value = state
| _________________^
163 | | .value_for(tv)
164 | | .map(|v| v.to_string())
165 | | .unwrap_or("value unavailable".into());
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
help: use `map_or(<a>, <f>)` instead
|
164 - .map(|v| v.to_string())
164 + .map_or("value unavailable".into(), |v| v.to_string());
|
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/debug.rs#L168
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/debug.rs:168:5
|
168 | / state.inferences_for(tv).iter().for_each(|expr| {
169 | | println!(" = {expr} ");
170 | | })
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
help: add a `;` here
|
168 ~ state.inferences_for(tv).iter().for_each(|expr| {
169 + println!(" = {expr} ");
170 + });
|
|
called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead:
src/inference/debug.rs#L118
warning: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
--> src/inference/debug.rs:118:17
|
118 | let value = state
| _________________^
119 | | .value_for(ty)
120 | | .map(|v| v.to_string())
121 | | .unwrap_or("value unavailable".into());
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
note: the lint level is defined here
--> src/lib.rs:114:37
|
114 | #![warn(clippy::all, clippy::cargo, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::map_unwrap_or)]` implied by `#[warn(clippy::pedantic)]`
help: use `map_or(<a>, <f>)` instead
|
120 - .map(|v| v.to_string())
120 + .map_or("value unavailable".into(), |v| v.to_string());
|
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/mod.rs#L398
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/mod.rs:398:29
|
398 | ... pairs.extend(xs.into_iter().map(|(ty, ofs)| (ty, ofs + offset)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `pairs.extend(xs.into_iter().map(|(ty, ofs)| (ty, ofs + offset)));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
using `clone` on type `Span` which implements the `Copy` trait:
src/inference/unification/mod.rs#L455
warning: using `clone` on type `Span` which implements the `Copy` trait
--> src/inference/unification/mod.rs:455:42
|
455 | let first_span = types.first().expect("Non-empty vector was empty").clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*types.first().expect("Non-empty vector was empty")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` implied by `#[warn(clippy::all)]`
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/unification/mod.rs#L394
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/unification/mod.rs:394:25
|
394 | inferences.push(Judgement::new(span.typ, TE::packed_of(spans_at_zero)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `inferences.push(Judgement::new(span.typ, TE::packed_of(spans_at_zero)));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`:
src/inference/unification/mod.rs#L359
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/inference/unification/mod.rs:359:35
|
359 | for span in input.into_iter().sorted_by_key(|s| (s.offset, s.size)) {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` implied by `#[warn(clippy::all)]`
|
used `cloned` where `copied` could be used instead:
src/inference/unification/mod.rs#L351
warning: used `cloned` where `copied` could be used instead
--> src/inference/unification/mod.rs:351:63
|
351 | let new_ty_vars = spans.iter().map(|(ty, ..)| ty).cloned().collect_vec();
| ^^^^^^ help: try: `copied`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
= note: `#[warn(clippy::cloned_instead_of_copied)]` implied by `#[warn(clippy::pedantic)]`
|
this let-binding has unit value:
src/inference/unification/mod.rs#L82
warning: this let-binding has unit value
--> src/inference/unification/mod.rs:82:13
|
82 | let _ = DEBUGGER.extend(vars_for);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `DEBUGGER.extend(vars_for);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` implied by `#[warn(clippy::all)]`
|
docs for function which may panic missing `# Panics` section:
src/inference/unification/mod.rs#L44
warning: docs for function which may panic missing `# Panics` section
--> src/inference/unification/mod.rs:44:1
|
44 | pub fn unify(state: &mut InferenceState, watchdog: &DynWatchdog) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/inference/unification/mod.rs:48:27
|
48 | let type_for_slot_8 = type_for_slot_at(8, state).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
|
redundant closure:
src/inference/unification/mod.rs#L29
warning: redundant closure
--> src/inference/unification/mod.rs:29:62
|
29 | static mut DEBUGGER: Lazy<HashSet<TypeVariable>> = Lazy::new(|| HashSet::new());
| ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `HashSet::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
note: the lint level is defined here
--> src/lib.rs:114:9
|
114 | #![warn(clippy::all, clippy::cargo, clippy::pedantic)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::redundant_closure)]` implied by `#[warn(clippy::all)]`
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/debug.rs#L207
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/debug.rs:207:21
|
207 | tyvar_queue.push_back(s.typ)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `tyvar_queue.push_back(s.typ);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/debug.rs#L189
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/debug.rs:189:21
|
189 | tyvar_queue.push_back(*id)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `tyvar_queue.push_back(*id);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
|
called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead:
src/inference/debug.rs#L162
warning: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
--> src/inference/debug.rs:162:17
|
162 | let value = state
| _________________^
163 | | .value_for(tv)
164 | | .map(|v| v.to_string())
165 | | .unwrap_or("value unavailable".into());
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
help: use `map_or(<a>, <f>)` instead
|
164 - .map(|v| v.to_string())
164 + .map_or("value unavailable".into(), |v| v.to_string());
|
|
consider adding a `;` to the last statement for consistent formatting:
src/inference/debug.rs#L168
warning: consider adding a `;` to the last statement for consistent formatting
--> src/inference/debug.rs:168:5
|
168 | / state.inferences_for(tv).iter().for_each(|expr| {
169 | | println!(" = {expr} ");
170 | | })
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
= note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
help: add a `;` here
|
168 ~ state.inferences_for(tv).iter().for_each(|expr| {
169 + println!(" = {expr} ");
170 + });
|
|
called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead:
src/inference/debug.rs#L118
warning: called `map(<f>).unwrap_or(<a>)` on an `Option` value. This can be done more directly by calling `map_or(<a>, <f>)` instead
--> src/inference/debug.rs:118:17
|
118 | let value = state
| _________________^
119 | | .value_for(ty)
120 | | .map(|v| v.to_string())
121 | | .unwrap_or("value unavailable".into());
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
note: the lint level is defined here
--> src/lib.rs:114:37
|
114 | #![warn(clippy::all, clippy::cargo, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::map_unwrap_or)]` implied by `#[warn(clippy::pedantic)]`
help: use `map_or(<a>, <f>)` instead
|
120 - .map(|v| v.to_string())
120 + .map_or("value unavailable".into(), |v| v.to_string());
|
|
Lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (macos-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|