- Fixed deadlock in FileBox plugin copyFrom implementation (single lock) - Added TLV Handle (tag=8) parsing in calls.rs for returned BoxRefs - Improved plugin loader with config path consistency and detailed logging - Fixed loader routing for proper Handle type_id/fini_method_id resolution - Added detailed logging for TLV encoding/decoding in plugin_loader_v2 Test docs/examples/plugin_boxref_return.nyash now works correctly: - cloneSelf() returns FileBox Handle properly - copyFrom(Box) accepts plugin Box arguments - Both FileBox instances close and fini correctly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
669 lines
26 KiB
Plaintext
669 lines
26 KiB
Plaintext
warning: file `/mnt/c/git/nyash-project/nyash/examples/simple_notepad_ascii.rs` found to be present in multiple build targets:
|
|
* `bin` target `nyash_notepad_ascii`
|
|
* `example` target `simple_notepad_ascii`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/nyash_explorer.rs` found to be present in multiple build targets:
|
|
* `bin` target `nyash_explorer`
|
|
* `example` target `nyash_explorer`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/test_icon_extraction.rs` found to be present in multiple build targets:
|
|
* `bin` target `test_icon_extraction`
|
|
* `example` target `test_icon_extraction`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/nyash_notepad_jp.rs` found to be present in multiple build targets:
|
|
* `bin` target `nyash_notepad_jp`
|
|
* `example` target `nyash_notepad_jp`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/simple_notepad.rs` found to be present in multiple build targets:
|
|
* `bin` target `simple_notepad`
|
|
* `example` target `simple_notepad`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/debug_notepad.rs` found to be present in multiple build targets:
|
|
* `bin` target `debug_notepad`
|
|
* `example` target `debug_notepad`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/nyash_explorer_with_icons.rs` found to be present in multiple build targets:
|
|
* `bin` target `nyash_explorer_icons`
|
|
* `example` target `nyash_explorer_with_icons`
|
|
warning: file `/mnt/c/git/nyash-project/nyash/examples/simple_notepad_v2.rs` found to be present in multiple build targets:
|
|
* `bin` target `nyash_notepad`
|
|
* `example` target `simple_notepad_v2`
|
|
warning: unused import: `next_box_id`
|
|
--> src/boxes/math_box.rs:59:84
|
|
|
|
|
59 | use crate::box_trait::{NyashBox, StringBox, IntegerBox, BoolBox, BoxCore, BoxBase, next_box_id};
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(unused_imports)]` on by default
|
|
|
|
warning: unused import: `next_box_id`
|
|
--> src/boxes/debug_box.rs:105:42
|
|
|
|
|
105 | use crate::box_trait::{BoxCore, BoxBase, next_box_id, NyashBox, StringBox, BoolBox, VoidBox};
|
|
| ^^^^^^^^^^^
|
|
|
|
warning: unused import: `next_box_id`
|
|
--> src/boxes/null_box.rs:87:72
|
|
|
|
|
87 | use crate::box_trait::{NyashBox, StringBox, BoolBox, BoxCore, BoxBase, next_box_id};
|
|
| ^^^^^^^^^^^
|
|
|
|
warning: unused import: `std::future::Future`
|
|
--> src/boxes/future/mod.rs:7:5
|
|
|
|
|
7 | use std::future::Future;
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `std::pin::Pin`
|
|
--> src/boxes/future/mod.rs:8:5
|
|
|
|
|
8 | use std::pin::Pin;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `crate::boxes::map_box::MapBox`
|
|
--> src/boxes/http/mod.rs:9:5
|
|
|
|
|
9 | use crate::boxes::map_box::MapBox;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused imports: `Arc` and `Mutex`
|
|
--> src/boxes/http/mod.rs:11:17
|
|
|
|
|
11 | use std::sync::{Arc, Mutex};
|
|
| ^^^ ^^^^^
|
|
|
|
warning: unused import: `Mutex`
|
|
--> src/boxes/regex/mod.rs:9:22
|
|
|
|
|
9 | use std::sync::{Arc, Mutex};
|
|
| ^^^^^
|
|
|
|
warning: unused import: `self`
|
|
--> src/boxes/intent_box.rs:38:16
|
|
|
|
|
38 | use std::fmt::{self, Debug};
|
|
| ^^^^
|
|
|
|
warning: unused macro definition: `debug_fuel`
|
|
--> src/parser/expressions.rs:38:14
|
|
|
|
|
38 | macro_rules! debug_fuel {
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(unused_macros)]` on by default
|
|
|
|
warning: unused macro definition: `debug_fuel`
|
|
--> src/parser/mod.rs:51:14
|
|
|
|
|
51 | macro_rules! debug_fuel {
|
|
| ^^^^^^^^^^
|
|
|
|
warning: unused imports: `AddBox`, `DivideBox`, `MultiplyBox`, and `SubtractBox`
|
|
--> src/interpreter/mod.rs:10:75
|
|
|
|
|
10 | use crate::box_trait::{NyashBox, StringBox, IntegerBox, BoolBox, VoidBox, AddBox, SubtractBox, MultiplyBox, DivideBox, CompareBox, ArrayB...
|
|
| ^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^
|
|
|
|
warning: unused import: `FloatBox`
|
|
--> src/interpreter/mod.rs:13:39
|
|
|
|
|
13 | use crate::boxes::math_box::{MathBox, FloatBox, RangeBox};
|
|
| ^^^^^^^^
|
|
|
|
warning: unused import: `DateTimeBox`
|
|
--> src/interpreter/mod.rs:14:39
|
|
|
|
|
14 | use crate::boxes::time_box::{TimeBox, DateTimeBox, TimerBox};
|
|
| ^^^^^^^^^^^
|
|
|
|
warning: unused import: `file::FileBox`
|
|
--> src/interpreter/expressions.rs:12:104
|
|
|
|
|
12 | use crate::boxes::{FloatBox, MathBox, ConsoleBox, TimeBox, DateTimeBox, RandomBox, SoundBox, DebugBox, file::FileBox, MapBox};
|
|
| ^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `std::sync::Arc`
|
|
--> src/interpreter/objects.rs:12:5
|
|
|
|
|
12 | use std::sync::Arc;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `StringBox`
|
|
--> src/interpreter/methods/collection_methods.rs:11:24
|
|
|
|
|
11 | use crate::box_trait::{StringBox, IntegerBox, NyashBox, BoolBox};
|
|
| ^^^^^^^^^
|
|
|
|
warning: unused imports: `IntegerBox` and `StringBox`
|
|
--> src/interpreter/methods/data_methods.rs:11:34
|
|
|
|
|
11 | use crate::box_trait::{NyashBox, StringBox, IntegerBox};
|
|
| ^^^^^^^^^ ^^^^^^^^^^
|
|
|
|
warning: unused import: `StringBox`
|
|
--> src/interpreter/methods/network_methods.rs:10:34
|
|
|
|
|
10 | use crate::box_trait::{NyashBox, StringBox};
|
|
| ^^^^^^^^^
|
|
|
|
warning: unused import: `BoolBox`
|
|
--> src/interpreter/methods/p2p_methods.rs:9:45
|
|
|
|
|
9 | use crate::box_trait::{NyashBox, StringBox, BoolBox};
|
|
| ^^^^^^^
|
|
|
|
warning: unused import: `crate::method_box::MethodBox`
|
|
--> src/interpreter/methods/p2p_methods.rs:11:5
|
|
|
|
|
11 | use crate::method_box::MethodBox;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `basic_methods::*`
|
|
--> src/interpreter/methods/mod.rs:27:9
|
|
|
|
|
27 | pub use basic_methods::*;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `collection_methods::*`
|
|
--> src/interpreter/methods/mod.rs:28:9
|
|
|
|
|
28 | pub use collection_methods::*;
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `io_methods::*`
|
|
--> src/interpreter/methods/mod.rs:29:9
|
|
|
|
|
29 | pub use io_methods::*;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `data_methods::*`
|
|
--> src/interpreter/methods/mod.rs:30:9
|
|
|
|
|
30 | pub use data_methods::*;
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `network_methods::*`
|
|
--> src/interpreter/methods/mod.rs:31:9
|
|
|
|
|
31 | pub use network_methods::*;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `std::sync::Arc`
|
|
--> src/operator_traits.rs:16:5
|
|
|
|
|
16 | use std::sync::Arc;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `std::sync::Arc`
|
|
--> src/transport/mod.rs:10:5
|
|
|
|
|
10 | use std::sync::Arc;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
warning: unused import: `Write`
|
|
--> src/boxes/stream/mod.rs:10:21
|
|
|
|
|
10 | use std::io::{Read, Write, Result};
|
|
| ^^^^^
|
|
|
|
warning: unused import: `Read`
|
|
--> src/boxes/stream/mod.rs:10:15
|
|
|
|
|
10 | use std::io::{Read, Write, Result};
|
|
| ^^^^
|
|
|
|
warning: unused variable: `url`
|
|
--> src/boxes/http/mod.rs:26:28
|
|
|
|
|
26 | pub fn http_get(&self, url: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_url`
|
|
|
|
|
= note: `#[warn(unused_variables)]` on by default
|
|
|
|
warning: unused variable: `url`
|
|
--> src/boxes/http/mod.rs:31:24
|
|
|
|
|
31 | pub fn post(&self, url: Box<dyn NyashBox>, body: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_url`
|
|
|
|
warning: unused variable: `body`
|
|
--> src/boxes/http/mod.rs:31:48
|
|
|
|
|
31 | pub fn post(&self, url: Box<dyn NyashBox>, body: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^^ help: if this is intentional, prefix it with an underscore: `_body`
|
|
|
|
warning: unused variable: `url`
|
|
--> src/boxes/http/mod.rs:36:23
|
|
|
|
|
36 | pub fn put(&self, url: Box<dyn NyashBox>, body: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_url`
|
|
|
|
warning: unused variable: `body`
|
|
--> src/boxes/http/mod.rs:36:47
|
|
|
|
|
36 | pub fn put(&self, url: Box<dyn NyashBox>, body: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^^ help: if this is intentional, prefix it with an underscore: `_body`
|
|
|
|
warning: unused variable: `url`
|
|
--> src/boxes/http/mod.rs:41:26
|
|
|
|
|
41 | pub fn delete(&self, url: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_url`
|
|
|
|
warning: unused variable: `method`
|
|
--> src/boxes/http/mod.rs:46:27
|
|
|
|
|
46 | pub fn request(&self, method: Box<dyn NyashBox>, url: Box<dyn NyashBox>, options: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_method`
|
|
|
|
warning: unused variable: `url`
|
|
--> src/boxes/http/mod.rs:46:54
|
|
|
|
|
46 | pub fn request(&self, method: Box<dyn NyashBox>, url: Box<dyn NyashBox>, options: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_url`
|
|
|
|
warning: unused variable: `options`
|
|
--> src/boxes/http/mod.rs:46:78
|
|
|
|
|
46 | pub fn request(&self, method: Box<dyn NyashBox>, url: Box<dyn NyashBox>, options: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_options`
|
|
|
|
warning: variable `arg_count` is assigned to, but never used
|
|
--> src/parser/expressions.rs:246:33
|
|
|
|
|
246 | let mut arg_count = 0;
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: consider using `_arg_count` instead
|
|
|
|
warning: unused variable: `name`
|
|
--> src/parser/statements.rs:69:35
|
|
|
|
|
69 | TokenType::IDENTIFIER(name) => {
|
|
| ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
|
|
|
|
warning: variable `statement_count` is assigned to, but never used
|
|
--> src/parser/mod.rs:132:17
|
|
|
|
|
132 | let mut statement_count = 0;
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: consider using `_statement_count` instead
|
|
|
|
warning: unused variable: `i`
|
|
--> src/interpreter/expressions.rs:554:22
|
|
|
|
|
554 | for (i, arg) in arguments.iter().enumerate() {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_i`
|
|
|
|
warning: variable `result` is assigned to, but never used
|
|
--> src/interpreter/expressions.rs:899:21
|
|
|
|
|
899 | let mut result: Box<dyn NyashBox> = Box::new(VoidBox::new());
|
|
| ^^^^^^
|
|
|
|
|
= note: consider using `_result` instead
|
|
|
|
warning: value assigned to `result` is never read
|
|
--> src/interpreter/expressions.rs:901:17
|
|
|
|
|
901 | result = self.execute_statement(statement)?;
|
|
| ^^^^^^
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
= note: `#[warn(unused_assignments)]` on by default
|
|
|
|
warning: value assigned to `result` is never read
|
|
--> src/interpreter/expressions.rs:905:21
|
|
|
|
|
905 | result = return_val.clone_box();
|
|
| ^^^^^^
|
|
|
|
|
= help: maybe it is overwritten before being read?
|
|
|
|
warning: unused variable: `current_instance`
|
|
--> src/interpreter/expressions.rs:924:78
|
|
|
|
|
924 | fn execute_builtin_box_method(&mut self, parent: &str, method: &str, mut current_instance: Box<dyn NyashBox>, arguments: &[ASTNode])
|
|
| ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current_instance`
|
|
|
|
warning: variable does not need to be mutable
|
|
--> src/interpreter/expressions.rs:924:74
|
|
|
|
|
924 | fn execute_builtin_box_method(&mut self, parent: &str, method: &str, mut current_instance: Box<dyn NyashBox>, arguments: &[ASTNode])
|
|
| ----^^^^^^^^^^^^^^^^
|
|
| |
|
|
| help: remove this `mut`
|
|
|
|
|
= note: `#[warn(unused_mut)]` on by default
|
|
|
|
warning: unused variable: `node_id`
|
|
--> src/interpreter/objects.rs:545:21
|
|
|
|
|
545 | let node_id = if let Some(id_str) = node_id_value.as_any().downcast_ref::<StringBox>() {
|
|
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_node_id`
|
|
|
|
warning: unused variable: `transport_str`
|
|
--> src/interpreter/objects.rs:555:21
|
|
|
|
|
555 | let transport_str = if let Some(t_str) = transport_value.as_any().downcast_ref::<StringBox>() {
|
|
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_transport_str`
|
|
|
|
warning: unused variable: `existing_method`
|
|
--> src/instance.rs:89:21
|
|
|
|
|
89 | if let Some(existing_method) = new_methods.get(&method_name) {
|
|
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_existing_method`
|
|
|
|
warning: field `evaluation_stack` is never read
|
|
--> src/interpreter/core.rs:207:16
|
|
|
|
|
190 | pub struct NyashInterpreter {
|
|
| ---------------- field in this struct
|
|
...
|
|
207 | pub(super) evaluation_stack: Vec<usize>,
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(dead_code)]` on by default
|
|
|
|
warning: methods `get_object_id` and `hash_string` are never used
|
|
--> src/interpreter/expressions.rs:697:8
|
|
|
|
|
18 | impl NyashInterpreter {
|
|
| --------------------- methods in this implementation
|
|
...
|
|
697 | fn get_object_id(&self, node: &ASTNode) -> Option<usize> {
|
|
| ^^^^^^^^^^^^^
|
|
...
|
|
716 | fn hash_string(&self, s: &str) -> usize {
|
|
| ^^^^^^^^^^^
|
|
|
|
Compiling nyash-rust v0.1.0 (/mnt/c/git/nyash-project/nyash)
|
|
warning: `nyash-rust` (lib) generated 53 warnings (run `cargo fix --lib -p nyash-rust` to apply 27 suggestions)
|
|
error: couldn't read `examples/C:/Windows/Fonts/arial.ttf`: No such file or directory (os error 2)
|
|
--> examples/simple_notepad_win.rs:32:57
|
|
|
|
|
32 | std::sync::Arc::new(egui::FontData::from_static(include_bytes!(
|
|
| _________________________________________________________^
|
|
33 | | "C:/Windows/Fonts/arial.ttf"
|
|
34 | | ))),
|
|
| |_________^
|
|
|
|
warning: unused import: `std::path::PathBuf`
|
|
--> examples/nyash_explorer.rs:5:5
|
|
|
|
|
5 | use std::path::PathBuf;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(unused_imports)]` on by default
|
|
|
|
warning: use of deprecated method `eframe::egui::Ui::allocate_ui_at_rect`: Use `allocate_new_ui` instead
|
|
--> examples/nyash_explorer.rs:287:28
|
|
|
|
|
287 | ui.allocate_ui_at_rect(response.rect, |ui| {
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(deprecated)]` on by default
|
|
|
|
warning: fields `letter` and `icon_data` are never read
|
|
--> examples/nyash_explorer.rs:63:5
|
|
|
|
|
62 | struct DriveInfo {
|
|
| --------- fields in this struct
|
|
63 | letter: String,
|
|
| ^^^^^^
|
|
...
|
|
68 | icon_data: Option<Vec<u8>>,
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `DriveInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
|
|
= note: `#[warn(dead_code)]` on by default
|
|
|
|
warning: field `letter` is never read
|
|
--> examples/nyash_explorer_with_icons.rs:70:5
|
|
|
|
|
69 | struct DriveInfo {
|
|
| --------- field in this struct
|
|
70 | letter: String,
|
|
| ^^^^^^
|
|
|
|
|
= note: `#[warn(dead_code)]` on by default
|
|
|
|
warning: associated function `load_bmp_icon` is never used
|
|
--> examples/nyash_explorer_with_icons.rs:145:8
|
|
|
|
|
85 | impl NyashExplorer {
|
|
| ------------------ associated function in this implementation
|
|
...
|
|
145 | fn load_bmp_icon(file_path: &str) -> Option<ColorImage> {
|
|
| ^^^^^^^^^^^^^
|
|
|
|
warning: fields `from_output` and `to_input` are never read
|
|
--> development/egui_research/experiments/visual_node_prototype.rs:118:5
|
|
|
|
|
116 | struct Connection {
|
|
| ---------- fields in this struct
|
|
117 | from_node: usize,
|
|
118 | from_output: String,
|
|
| ^^^^^^^^^^^
|
|
119 | to_node: usize,
|
|
120 | to_input: String,
|
|
| ^^^^^^^^
|
|
|
|
|
= note: `Connection` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
|
|
= note: `#[warn(dead_code)]` on by default
|
|
|
|
warning: fields `connecting_from`, `pan_offset`, and `zoom` are never read
|
|
--> development/egui_research/experiments/visual_node_prototype.rs:128:5
|
|
|
|
|
123 | struct VisualProgramming {
|
|
| ----------------- fields in this struct
|
|
...
|
|
128 | connecting_from: Option<(usize, String)>,
|
|
| ^^^^^^^^^^^^^^^
|
|
129 | pan_offset: Vec2,
|
|
| ^^^^^^^^^^
|
|
130 | zoom: f32,
|
|
| ^^^^
|
|
|
|
error[E0308]: mismatched types
|
|
--> examples/simple_notepad_win.rs:32:9
|
|
|
|
|
30 | fonts.font_data.insert(
|
|
| ------ arguments to this method are incorrect
|
|
31 | "system".to_owned(),
|
|
32 | / std::sync::Arc::new(egui::FontData::from_static(include_bytes!(
|
|
33 | | "C:/Windows/Fonts/arial.ttf"
|
|
34 | | ))),
|
|
| |___________^ expected `FontData`, found `Arc<FontData>`
|
|
|
|
|
= note: expected struct `FontData`
|
|
found struct `Arc<FontData>`
|
|
help: the return type of this call is `Arc<FontData>` due to the type of the argument passed
|
|
--> examples/simple_notepad_win.rs:30:5
|
|
|
|
|
30 | / fonts.font_data.insert(
|
|
31 | | "system".to_owned(),
|
|
32 | |/ std::sync::Arc::new(egui::FontData::from_static(include_bytes!(
|
|
33 | || "C:/Windows/Fonts/arial.ttf"
|
|
34 | || ))),
|
|
| ||___________- this argument influences the return type of `insert`
|
|
35 | | );
|
|
| |______^
|
|
note: method defined here
|
|
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/alloc/src/collections/btree/map.rs:1023:12
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|
|
error: could not compile `nyash-rust` (example "simple_notepad_win") due to 2 previous errors
|
|
warning: build failed, waiting for other jobs to finish...
|
|
warning: unused import: `std::collections::HashMap`
|
|
--> tests/integration_tests.rs:9:5
|
|
|
|
|
9 | use std::collections::HashMap;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(unused_imports)]` on by default
|
|
|
|
warning: function `execute_nyash_code` is never used
|
|
--> tests/integration_tests.rs:12:4
|
|
|
|
|
12 | fn execute_nyash_code(code: &str) -> Result<String, String> {
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[warn(dead_code)]` on by default
|
|
|
|
warning: unused import: `std::env`
|
|
--> src/main.rs:33:5
|
|
|
|
|
33 | use std::env;
|
|
| ^^^^^^^^
|
|
|
|
warning: unused imports: `BoolBox`, `IntegerBox`, and `StringBox`
|
|
--> src/ast.rs:864:28
|
|
|
|
|
864 | use crate::box_trait::{StringBox, IntegerBox, BoolBox};
|
|
| ^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^
|
|
|
|
error[E0063]: missing field `is_override` in initializer of `ast::ASTNode`
|
|
--> src/ast.rs:915:48
|
|
|
|
|
915 | methods.insert("getValue".to_string(), ASTNode::FunctionDeclaration {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `is_override`
|
|
|
|
error[E0063]: missing fields `is_static`, `static_init` and `type_parameters` in initializer of `ast::ASTNode`
|
|
--> src/ast.rs:932:24
|
|
|
|
|
932 | let box_decl = ASTNode::BoxDeclaration {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ missing `is_static`, `static_init` and `type_parameters`
|
|
|
|
For more information about this error, try `rustc --explain E0063`.
|
|
warning: `nyash-rust` (bin "nyash" test) generated 53 warnings (52 duplicates)
|
|
error: could not compile `nyash-rust` (bin "nyash" test) due to 2 previous errors; 53 warnings emitted
|
|
error[E0599]: no method named `len` found for struct `boxes::array::ArrayBox` in the current scope
|
|
--> src/tests/box_tests.rs:19:26
|
|
|
|
|
19 | assert_eq!(array.len(), 2);
|
|
| ^^^
|
|
|
|
|
::: src/boxes/array/mod.rs:11:1
|
|
|
|
|
11 | pub struct ArrayBox {
|
|
| ------------------- method `len` not found for this struct
|
|
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
|
= note: the following traits define an item `len`, perhaps you need to implement one of them:
|
|
candidate #1: `CacheTrait`
|
|
candidate #2: `ExactSizeIterator`
|
|
candidate #3: `avif_serialize::boxes::MpegBox`
|
|
candidate #4: `nom::traits::AsChar`
|
|
candidate #5: `rayon::iter::IndexedParallelIterator`
|
|
candidate #6: `rayon::range::private::IndexedRangeInteger`
|
|
candidate #7: `rayon::range_inclusive::private::IndexedRangeInteger`
|
|
help: there is a method `length` with a similar name
|
|
|
|
|
19 | assert_eq!(array.length(), 2);
|
|
| +++
|
|
|
|
error[E0599]: no method named `len` found for struct `buffer::BufferBox` in the current scope
|
|
--> src/tests/box_tests.rs:35:27
|
|
|
|
|
35 | assert_eq!(buffer.len(), 5);
|
|
| ^^^
|
|
|
|
|
::: src/boxes/buffer/mod.rs:38:1
|
|
|
|
|
38 | pub struct BufferBox {
|
|
| -------------------- method `len` not found for this struct
|
|
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
|
= note: the following traits define an item `len`, perhaps you need to implement one of them:
|
|
candidate #1: `CacheTrait`
|
|
candidate #2: `ExactSizeIterator`
|
|
candidate #3: `avif_serialize::boxes::MpegBox`
|
|
candidate #4: `nom::traits::AsChar`
|
|
candidate #5: `rayon::iter::IndexedParallelIterator`
|
|
candidate #6: `rayon::range::private::IndexedRangeInteger`
|
|
candidate #7: `rayon::range_inclusive::private::IndexedRangeInteger`
|
|
help: there is a method `length` with a similar name
|
|
|
|
|
35 | assert_eq!(buffer.length(), 5);
|
|
| +++
|
|
|
|
error[E0600]: cannot apply unary operator `!` to type `Box<(dyn box_trait::NyashBox + 'static)>`
|
|
--> src/tests/box_tests.rs:114:9
|
|
|
|
|
114 | assert!(success_result.is_ok());
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
|
|
|
|
|
note: the foreign item type `Box<(dyn box_trait::NyashBox + 'static)>` doesn't implement `Not`
|
|
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/alloc/src/boxed.rs:231:1
|
|
::: /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/alloc/src/boxed.rs:234:1
|
|
|
|
|
= note: not implement `Not`
|
|
|
|
error[E0600]: cannot apply unary operator `!` to type `Box<(dyn box_trait::NyashBox + 'static)>`
|
|
--> src/tests/box_tests.rs:122:17
|
|
|
|
|
122 | assert!(!error_result.is_ok());
|
|
| ^^^^^^^^^^^^^^^^^^^^^ cannot apply unary operator `!`
|
|
|
|
|
note: the foreign item type `Box<(dyn box_trait::NyashBox + 'static)>` doesn't implement `Not`
|
|
--> /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/alloc/src/boxed.rs:231:1
|
|
::: /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/alloc/src/boxed.rs:234:1
|
|
|
|
|
= note: not implement `Not`
|
|
|
|
error[E0599]: no method named `box_id` found for struct `boxes::array::ArrayBox` in the current scope
|
|
--> src/tests/box_tests.rs:135:25
|
|
|
|
|
135 | assert_ne!(box1.box_id(), box2.box_id());
|
|
| ^^^^^^ method not found in `ArrayBox`
|
|
|
|
|
::: src/boxes/array/mod.rs:11:1
|
|
|
|
|
11 | pub struct ArrayBox {
|
|
| ------------------- method `box_id` not found for this struct
|
|
|
|
|
::: src/box_trait.rs:55:8
|
|
|
|
|
55 | fn box_id(&self) -> u64;
|
|
| ------ the method is available for `boxes::array::ArrayBox` here
|
|
|
|
|
= help: items from traits can only be used if the trait is in scope
|
|
help: trait `BoxCore` which provides `box_id` is implemented but not in scope; perhaps you want to import it
|
|
|
|
|
7 + use crate::box_trait::BoxCore;
|
|
|
|
|
|
|
error[E0599]: no method named `box_id` found for struct `boxes::array::ArrayBox` in the current scope
|
|
--> src/tests/box_tests.rs:135:40
|
|
|
|
|
135 | assert_ne!(box1.box_id(), box2.box_id());
|
|
| ^^^^^^ method not found in `ArrayBox`
|
|
|
|
|
::: src/boxes/array/mod.rs:11:1
|
|
|
|
|
11 | pub struct ArrayBox {
|
|
| ------------------- method `box_id` not found for this struct
|
|
|
|
|
::: src/box_trait.rs:55:8
|
|
|
|
|
55 | fn box_id(&self) -> u64;
|
|
| ------ the method is available for `boxes::array::ArrayBox` here
|
|
|
|
|
= help: items from traits can only be used if the trait is in scope
|
|
help: trait `BoxCore` which provides `box_id` is implemented but not in scope; perhaps you want to import it
|
|
|
|
|
7 + use crate::box_trait::BoxCore;
|
|
|
|
|
|
|
warning: variable does not need to be mutable
|
|
--> src/tests/box_tests.rs:90:13
|
|
|
|
|
90 | let mut stream = NyashStreamBox::from_data(vec![72, 101, 108, 108, 111]); // "Hello"
|
|
| ----^^^^^^
|
|
| |
|
|
| help: remove this `mut`
|
|
|
|
Some errors have detailed explanations: E0063, E0599, E0600.
|
|
For more information about an error, try `rustc --explain E0063`.
|
|
warning: `nyash-rust` (lib test) generated 53 warnings (52 duplicates)
|
|
error: could not compile `nyash-rust` (lib test) due to 8 previous errors; 53 warnings emitted
|
|
warning: `nyash-rust` (bin "nyash_explorer_icons" test) generated 2 warnings (2 duplicates)
|
|
warning: `nyash-rust` (bin "nyash_explorer" test) generated 3 warnings (3 duplicates)
|
|
warning: `nyash-rust` (test "integration_tests") generated 2 warnings (run `cargo fix --test "integration_tests"` to apply 1 suggestion)
|