Skip to content

Implement base type-level interpreter and subtyping #1239

Implement base type-level interpreter and subtyping

Implement base type-level interpreter and subtyping #1239

Triggered via pull request January 26, 2024 17:50
Status Failure
Total duration 1m 17s
Artifacts

build_test_fmt.yml

on: pull_request
coding-style
3s
coding-style
build-without-warnings
22s
build-without-warnings
Fit to window
Zoom out
Zoom in

Annotations

16 errors and 10 warnings
called `is_none()` after searching an `Iterator` with `find`: typecheck/src/lib.rs#L31
error: called `is_none()` after searching an `Iterator` with `find` --> typecheck/src/lib.rs:31:9 | 31 | other.0.iter().find(|elt| !self.0.contains(elt)).is_none() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `!_.any()` instead: `!other.0.iter().any(|elt| !self.0.contains(&elt))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some = note: `-D clippy::search-is-some` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`
this expression creates a reference which is immediately dereferenced by the compiler: typecheck/src/checker.rs#L84
error: this expression creates a reference which is immediately dereferenced by the compiler --> typecheck/src/checker.rs:84:44 | 84 | if valid_union_type.set().contains(&expected_ty.set()) { | ^^^^^^^^^^^^^^^^^^ help: change this to: `expected_ty.set()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`: typecheck/src/checker.rs#L72
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` --> typecheck/src/checker.rs:72:47 | 72 | Type::builtin(comparable[..1].into_iter().map(|r| *r).collect()) | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
you are using an explicit closure for copying elements: typecheck/src/checker.rs#L72
error: you are using an explicit closure for copying elements --> typecheck/src/checker.rs:72:31 | 72 | Type::builtin(comparable[..1].into_iter().map(|r| *r).collect()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `comparable[..1].into_iter().copied()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`: typecheck/src/checker.rs#L69
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` --> typecheck/src/checker.rs:69:47 | 69 | Type::builtin(comparable[2..].into_iter().map(|r| *r).collect()) | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
you are using an explicit closure for copying elements: typecheck/src/checker.rs#L69
error: you are using an explicit closure for copying elements --> typecheck/src/checker.rs:69:31 | 69 | Type::builtin(comparable[2..].into_iter().map(|r| *r).collect()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `comparable[2..].into_iter().copied()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone = note: `-D clippy::map-clone` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::map_clone)]`
redundant closure: typecheck/src/actual.rs#L341
error: redundant closure --> typecheck/src/actual.rs:341:26 | 341 | .map(|origin| RefIdx::Resolved(origin)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `RefIdx::Resolved` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-D clippy::redundant-closure` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: typecheck/src/actual.rs#L339
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> typecheck/src/actual.rs:339:22 | 339 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref = note: `-D clippy::into-iter-on-ref` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
the following explicit lifetimes could be elided: 'fir: typecheck/src/actual.rs#L275
error: the following explicit lifetimes could be elided: 'fir --> typecheck/src/actual.rs:275:24 | 275 | fn resolve_link_v2<'fir>( | ^^^^ ... 278 | fir: &'fir Fir<FlattenData>, | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `-D clippy::needless-lifetimes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]` help: elide the lifetimes | 275 ~ fn resolve_link_v2( 276 | &mut self, 277 | to_resolve: OriginIdx, 278 ~ fir: &Fir<FlattenData>, |
associated functions `union` and `record` are never used: typecheck/src/typemap.rs#L31
error: associated functions `union` and `record` are never used --> typecheck/src/typemap.rs:31:12 | 30 | impl TypeRef { | ------------ associated functions in this implementation 31 | pub fn union(UnionType(node): UnionType) -> TypeRef { | ^^^^^ ... 35 | pub fn record(RecordType(node): RecordType) -> TypeRef { | ^^^^^^
struct `RecordType` is never constructed: typecheck/src/typemap.rs#L28
error: struct `RecordType` is never constructed --> typecheck/src/typemap.rs:28:12 | 28 | pub struct RecordType(OriginIdx); | ^^^^^^^^^^
struct `UnionType` is never constructed: typecheck/src/typemap.rs#L27
error: struct `UnionType` is never constructed --> typecheck/src/typemap.rs:27:12 | 27 | pub struct UnionType(OriginIdx); | ^^^^^^^^^
methods `actual` and `ref_idx` are never used: typecheck/src/lib.rs#L97
error: methods `actual` and `ref_idx` are never used --> typecheck/src/lib.rs:97:12 | 96 | impl TypeVariable { | ----------------- methods in this implementation 97 | pub fn actual(&self) -> OriginIdx { | ^^^^^^ ... 104 | pub fn ref_idx(&self) -> RefIdx { | ^^^^^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]`
use of deprecated associated function `Type::new`: needs a new API: typecheck/src/actual.rs#L349
error: use of deprecated associated function `Type::new`: needs a new API --> typecheck/src/actual.rs:349:39 | 349 | final_type: Type::new(*u, variants.collect()), | ^^^ | = note: `-D deprecated` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(deprecated)]`
tests-check
Process completed with exit code 101.
build-without-warnings
Process completed with exit code 101.
coding-style
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
coding-style
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
tests-check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
tests-check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
functional_tests
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
functional_tests
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build-without-warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build-without-warnings
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/