[INFO] cloning repository https://github.com/mikewim/crablox [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mikewim/crablox" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmikewim%2Fcrablox", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmikewim%2Fcrablox'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 171bac5d70a632289ae2df1e8249281a21f868bd [INFO] checking mikewim/crablox against master#506512391b1a75ae450d36c9420978402a91abcc for pr-125384 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmikewim%2Fcrablox" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/mikewim/crablox on toolchain 506512391b1a75ae450d36c9420978402a91abcc [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/mikewim/crablox [INFO] finished tweaking git repo https://github.com/mikewim/crablox [INFO] tweaked toml for git repo https://github.com/mikewim/crablox written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/mikewim/crablox already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] aab665f982cd424c9b8c40b3a4bb4c0d308d8a02afc258dc3c23b6c76a622d56 [INFO] running `Command { std: "docker" "start" "-a" "aab665f982cd424c9b8c40b3a4bb4c0d308d8a02afc258dc3c23b6c76a622d56", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aab665f982cd424c9b8c40b3a4bb4c0d308d8a02afc258dc3c23b6c76a622d56", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aab665f982cd424c9b8c40b3a4bb4c0d308d8a02afc258dc3c23b6c76a622d56", kill_on_drop: false }` [INFO] [stdout] aab665f982cd424c9b8c40b3a4bb4c0d308d8a02afc258dc3c23b6c76a622d56 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=allow" "-e" "RUSTDOCFLAGS=--cap-lints=allow" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5a2ef9a5c5032bd881c7558d243f7b3d48f4fe0707dc1c970d79bf80bddadb59 [INFO] running `Command { std: "docker" "start" "-a" "5a2ef9a5c5032bd881c7558d243f7b3d48f4fe0707dc1c970d79bf80bddadb59", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling serde v1.0.136 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Checking itoa v1.0.2 [INFO] [stderr] Compiling time-macros v0.2.4 [INFO] [stderr] Checking num_threads v0.1.6 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking termcolor v1.1.3 [INFO] [stderr] Checking time v0.3.9 [INFO] [stderr] Checking simplelog v0.12.0 [INFO] [stderr] Checking rust_playground v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected identifier, found `)` [INFO] [stdout] --> src/parser/mod.rs:121:75 [INFO] [stdout] | [INFO] [stdout] 121 | TokenType::False => return Expr::Literal(Literal(LiteralType::)) [INFO] [stdout] | ^ expected identifier [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected identifier, found `)` [INFO] [stdout] --> src/parser/mod.rs:121:75 [INFO] [stdout] | [INFO] [stdout] 121 | TokenType::False => return Expr::Literal(Literal(LiteralType::)) [INFO] [stdout] | ^ expected identifier [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `ast_printer_test` in module `parser` [INFO] [stdout] --> src/main.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | parser::ast_printer_test(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not found in `parser` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `ast_printer_test` in module `parser` [INFO] [stdout] --> src/main.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | parser::ast_printer_test(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not found in `parser` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | fn expression(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | fn expression(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | fn equality(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | fn comparison(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | fn equality(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:67:23 [INFO] [stdout] | [INFO] [stdout] 67 | fn term(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | fn comparison(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:67:23 [INFO] [stdout] | [INFO] [stdout] 67 | fn term(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:85:25 [INFO] [stdout] | [INFO] [stdout] 85 | fn factor(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:85:25 [INFO] [stdout] | [INFO] [stdout] 85 | fn factor(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:103:24 [INFO] [stdout] | [INFO] [stdout] 103 | fn unary(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:103:24 [INFO] [stdout] | [INFO] [stdout] 103 | fn unary(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:119:26 [INFO] [stdout] | [INFO] [stdout] 119 | fn primary(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0046]: not all trait items implemented, missing: `Item` [INFO] [stdout] --> src/parser/ast_printer.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | impl Visitor for AstPrinter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation [INFO] [stdout] | [INFO] [stdout] ::: src/parser/ast_types.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | type Item; [INFO] [stdout] | --------- `Item` from trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:119:26 [INFO] [stdout] | [INFO] [stdout] 119 | fn primary(&self) -> Expr { [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0046]: not all trait items implemented, missing: `Item` [INFO] [stdout] --> src/parser/ast_printer.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | impl Visitor for AstPrinter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation [INFO] [stdout] | [INFO] [stdout] ::: src/parser/ast_types.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | type Item; [INFO] [stdout] | --------- `Item` from trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:31:50 [INFO] [stdout] | [INFO] [stdout] 31 | fn parenthesize(&self, name: &str, exprs: &[&dyn Expr]) -> String { [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:31:50 [INFO] [stdout] | [INFO] [stdout] 31 | fn parenthesize(&self, name: &str, exprs: &[&dyn Expr]) -> String { [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_types.rs:18:19 [INFO] [stdout] | [INFO] [stdout] 18 | pub left: Box, [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_types.rs:18:19 [INFO] [stdout] | [INFO] [stdout] 18 | pub left: Box, [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_types.rs:31:25 [INFO] [stdout] | [INFO] [stdout] 31 | pub expression: Box, [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_types.rs:31:25 [INFO] [stdout] | [INFO] [stdout] 31 | pub expression: Box, [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_types.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | pub right: Box, [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_types.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | pub right: Box, [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/parser/ast_printer.rs:7:26 [INFO] [stdout] | [INFO] [stdout] 7 | let exprs: [&dyn Expr; 2] = [expr.left.as_ref(), expr.right.as_ref()]; [INFO] [stdout] | ^^^^-------- help: remove these generics [INFO] [stdout] | | [INFO] [stdout] | expected 0 generic arguments [INFO] [stdout] | [INFO] [stdout] note: trait defined here, with 0 generic parameters [INFO] [stdout] --> src/parser/ast_types.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:7:20 [INFO] [stdout] | [INFO] [stdout] 7 | let exprs: [&dyn Expr; 2] = [expr.left.as_ref(), expr.right.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:7:66 [INFO] [stdout] | [INFO] [stdout] 7 | let exprs: [&dyn Expr; 2] = [expr.left.as_ref(), expr.right.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | self.parenthesize(format!("{}", expr.operator).as_str(), &exprs) [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | let exprs = [expr.expression.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | self.parenthesize("group", &exprs) [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:21:22 [INFO] [stdout] | [INFO] [stdout] 21 | let exprs = [expr.right.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | self.parenthesize(format!("{:?}", expr.operator).as_str(), &exprs) [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/parser/ast_printer.rs:7:26 [INFO] [stdout] | [INFO] [stdout] 7 | let exprs: [&dyn Expr; 2] = [expr.left.as_ref(), expr.right.as_ref()]; [INFO] [stdout] | ^^^^-------- help: remove these generics [INFO] [stdout] | | [INFO] [stdout] | expected 0 generic arguments [INFO] [stdout] | [INFO] [stdout] note: trait defined here, with 0 generic parameters [INFO] [stdout] --> src/parser/ast_types.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:7:20 [INFO] [stdout] | [INFO] [stdout] 7 | let exprs: [&dyn Expr; 2] = [expr.left.as_ref(), expr.right.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:7:66 [INFO] [stdout] | [INFO] [stdout] 7 | let exprs: [&dyn Expr; 2] = [expr.left.as_ref(), expr.right.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | self.parenthesize(format!("{}", expr.operator).as_str(), &exprs) [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | let exprs = [expr.expression.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | self.parenthesize("group", &exprs) [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:21:22 [INFO] [stdout] | [INFO] [stdout] 21 | let exprs = [expr.right.as_ref()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | self.parenthesize(format!("{:?}", expr.operator).as_str(), &exprs) [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_printer.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn print(&self, expr: &impl Expr) -> String { [INFO] [stdout] | ------ expected `String` because of return type [INFO] [stdout] 28 | expr.accept(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ expected `String`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 34 | for expr in exprs.iter() { [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:35:43 [INFO] [stdout] | [INFO] [stdout] 35 | return_str.push_str(format!(" {:#?}", expr).as_str()); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `dyn ast_types::Expr` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_printer.rs:35:51 [INFO] [stdout] | [INFO] [stdout] 35 | return_str.push_str(format!(" {:#?}", expr).as_str()); [INFO] [stdout] | ^^^^ `dyn ast_types::Expr` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `dyn ast_types::Expr`, which is required by `&&dyn ast_types::Expr: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_printer.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn print(&self, expr: &impl Expr) -> String { [INFO] [stdout] | ------ expected `String` because of return type [INFO] [stdout] 28 | expr.accept(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ expected `String`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn ast_types::Expr + 'static)` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_types.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 16 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] 17 | pub struct Binary { [INFO] [stdout] 18 | pub left: Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ `(dyn ast_types::Expr + 'static)` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `(dyn ast_types::Expr + 'static)`, which is required by `Box<(dyn ast_types::Expr + 'static)>: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 34 | for expr in exprs.iter() { [INFO] [stdout] | ^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/ast_printer.rs:35:43 [INFO] [stdout] | [INFO] [stdout] 35 | return_str.push_str(format!(" {:#?}", expr).as_str()); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 24 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 25 | visitor.visit_binary(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 24 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 25 | visitor.visit_binary(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn ast_types::Expr + 'static)` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_types.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 29 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] 30 | pub struct Grouping { [INFO] [stdout] 31 | pub expression: Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn ast_types::Expr + 'static)` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `(dyn ast_types::Expr + 'static)`, which is required by `&Box<(dyn ast_types::Expr + 'static)>: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `dyn ast_types::Expr` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_printer.rs:35:51 [INFO] [stdout] | [INFO] [stdout] 35 | return_str.push_str(format!(" {:#?}", expr).as_str()); [INFO] [stdout] | ^^^^ `dyn ast_types::Expr` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `dyn ast_types::Expr`, which is required by `&&dyn ast_types::Expr: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 35 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 36 | visitor.visit_grouping(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 35 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 36 | visitor.visit_grouping(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn ast_types::Expr + 'static)` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_types.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 16 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] 17 | pub struct Binary { [INFO] [stdout] 18 | pub left: Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ `(dyn ast_types::Expr + 'static)` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `(dyn ast_types::Expr + 'static)`, which is required by `Box<(dyn ast_types::Expr + 'static)>: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 44 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 45 | visitor.visit_literal(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 44 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 45 | visitor.visit_literal(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 24 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 25 | visitor.visit_binary(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 24 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 25 | visitor.visit_binary(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn ast_types::Expr + 'static)` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_types.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 49 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 52 | pub right: Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn ast_types::Expr + 'static)` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `(dyn ast_types::Expr + 'static)`, which is required by `&Box<(dyn ast_types::Expr + 'static)>: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 56 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 57 | visitor.visit_unary(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 56 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 57 | visitor.visit_unary(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn ast_types::Expr + 'static)` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_types.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 29 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] 30 | pub struct Grouping { [INFO] [stdout] 31 | pub expression: Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn ast_types::Expr + 'static)` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `(dyn ast_types::Expr + 'static)`, which is required by `&Box<(dyn ast_types::Expr + 'static)>: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | return self.equality(); [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 35 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 36 | visitor.visit_grouping(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 35 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 36 | visitor.visit_grouping(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | fn expression(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 22 ~ fn expression(&self) -> Box { [INFO] [stdout] 23 ~ return Box::new(self.equality()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:27:29 [INFO] [stdout] | [INFO] [stdout] 27 | let mut expr = self.comparison(); [INFO] [stdout] | ^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | fn equality(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 26 ~ fn equality(&self) -> Box { [INFO] [stdout] 27 | let mut expr = self.comparison(); [INFO] [stdout] ... [INFO] [stdout] 40 | [INFO] [stdout] 41 ~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 44 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 45 | visitor.visit_literal(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 44 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 45 | visitor.visit_literal(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let mut expr = self.comparison(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | let right = self.comparison(); [INFO] [stdout] | ^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `(dyn ast_types::Expr + 'static)` doesn't implement `std::fmt::Debug` [INFO] [stdout] --> src/parser/ast_types.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 49 | #[derive(Debug)] [INFO] [stdout] | ----- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 52 | pub right: Box, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn ast_types::Expr + 'static)` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Debug` is not implemented for `(dyn ast_types::Expr + 'static)`, which is required by `&Box<(dyn ast_types::Expr + 'static)>: std::fmt::Debug` [INFO] [stdout] = help: the following other types implement trait `std::fmt::Debug`: [INFO] [stdout] (dyn Any + 'static) [INFO] [stdout] (dyn Any + Send + 'static) [INFO] [stdout] (dyn Any + Send + Sync + 'static) [INFO] [stdout] = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/parser/ast_types.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 56 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | - expected `()` because of default return type [INFO] [stdout] 57 | visitor.visit_unary(self) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type [INFO] [stdout] | [INFO] [stdout] = note: expected unit type `()` [INFO] [stdout] found associated type `::Item` [INFO] [stdout] help: consider constraining the associated type `::Item` to `()` [INFO] [stdout] | [INFO] [stdout] 56 | fn accept(&self, visitor: &impl Visitor) { [INFO] [stdout] | +++++++++++ [INFO] [stdout] help: consider using a semicolon here [INFO] [stdout] | [INFO] [stdout] 57 | visitor.visit_unary(self); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | return self.equality(); [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:22:29 [INFO] [stdout] | [INFO] [stdout] 22 | fn expression(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 22 ~ fn expression(&self) -> Box { [INFO] [stdout] 23 ~ return Box::new(self.equality()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:27:29 [INFO] [stdout] | [INFO] [stdout] 27 | let mut expr = self.comparison(); [INFO] [stdout] | ^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | fn equality(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 26 ~ fn equality(&self) -> Box { [INFO] [stdout] 27 | let mut expr = self.comparison(); [INFO] [stdout] ... [INFO] [stdout] 40 | [INFO] [stdout] 41 ~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let mut expr = self.comparison(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | let right = self.comparison(); [INFO] [stdout] | ^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:34:26 [INFO] [stdout] | [INFO] [stdout] 34 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | let right = self.comparison(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:34:26 [INFO] [stdout] | [INFO] [stdout] 34 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:45:29 [INFO] [stdout] | [INFO] [stdout] 45 | let mut expr = self.term(); [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | let right = self.comparison(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | fn comparison(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 44 ~ fn comparison(&self) -> Box { [INFO] [stdout] 45 | let mut expr = self.term(); [INFO] [stdout] ... [INFO] [stdout] 63 | [INFO] [stdout] 64 ~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut expr = self.term(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:55:30 [INFO] [stdout] | [INFO] [stdout] 55 | let right = self.term(); [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | let right = self.term(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:45:29 [INFO] [stdout] | [INFO] [stdout] 45 | let mut expr = self.term(); [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | fn comparison(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 44 ~ fn comparison(&self) -> Box { [INFO] [stdout] 45 | let mut expr = self.term(); [INFO] [stdout] ... [INFO] [stdout] 63 | [INFO] [stdout] 64 ~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut expr = self.term(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:55:30 [INFO] [stdout] | [INFO] [stdout] 55 | let right = self.term(); [INFO] [stdout] | ^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:60:24 [INFO] [stdout] | [INFO] [stdout] 60 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:60:24 [INFO] [stdout] | [INFO] [stdout] 60 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:68:29 [INFO] [stdout] | [INFO] [stdout] 68 | let mut expr = self.factor(); [INFO] [stdout] | ^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:67:23 [INFO] [stdout] | [INFO] [stdout] 67 | fn term(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 67 ~ fn term(&self) -> Box { [INFO] [stdout] 68 | let mut expr = self.factor(); [INFO] [stdout] ... [INFO] [stdout] 81 | [INFO] [stdout] 82 ~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | let right = self.term(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | let mut expr = self.factor(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:73:30 [INFO] [stdout] | [INFO] [stdout] 73 | let right = self.factor(); [INFO] [stdout] | ^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:60:24 [INFO] [stdout] | [INFO] [stdout] 60 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 73 | let right = self.factor(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:60:24 [INFO] [stdout] | [INFO] [stdout] 60 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:68:29 [INFO] [stdout] | [INFO] [stdout] 68 | let mut expr = self.factor(); [INFO] [stdout] | ^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:76:23 [INFO] [stdout] | [INFO] [stdout] 76 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:67:23 [INFO] [stdout] | [INFO] [stdout] 67 | fn term(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 67 ~ fn term(&self) -> Box { [INFO] [stdout] 68 | let mut expr = self.factor(); [INFO] [stdout] ... [INFO] [stdout] 81 | [INFO] [stdout] 82 ~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | let mut expr = self.factor(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:73:30 [INFO] [stdout] | [INFO] [stdout] 73 | let right = self.factor(); [INFO] [stdout] | ^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:76:32 [INFO] [stdout] | [INFO] [stdout] 76 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:76:23 [INFO] [stdout] | [INFO] [stdout] 76 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 73 | let right = self.factor(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:78:24 [INFO] [stdout] | [INFO] [stdout] 78 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:78:33 [INFO] [stdout] | [INFO] [stdout] 78 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:76:23 [INFO] [stdout] | [INFO] [stdout] 76 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:78:24 [INFO] [stdout] | [INFO] [stdout] 78 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:76:32 [INFO] [stdout] | [INFO] [stdout] 76 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | let mut expr = self.unary(); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:76:23 [INFO] [stdout] | [INFO] [stdout] 76 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:85:25 [INFO] [stdout] | [INFO] [stdout] 85 | fn factor(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 85 ~ fn factor(&self) -> Box { [INFO] [stdout] 86 | let mut expr = self.unary(); [INFO] [stdout] ... [INFO] [stdout] 99 | [INFO] [stdout] 100~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | let mut expr = self.unary(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:78:24 [INFO] [stdout] | [INFO] [stdout] 78 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:78:33 [INFO] [stdout] | [INFO] [stdout] 78 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:91:30 [INFO] [stdout] | [INFO] [stdout] 91 | let right = self.unary(); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:78:24 [INFO] [stdout] | [INFO] [stdout] 78 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | let mut expr = self.unary(); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:85:25 [INFO] [stdout] | [INFO] [stdout] 85 | fn factor(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 85 ~ fn factor(&self) -> Box { [INFO] [stdout] 86 | let mut expr = self.unary(); [INFO] [stdout] ... [INFO] [stdout] 99 | [INFO] [stdout] 100~ Box::new(expr) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:93:26 [INFO] [stdout] | [INFO] [stdout] 93 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | let mut expr = self.unary(); [INFO] [stdout] | ^^^^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | let right = self.unary(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:91:30 [INFO] [stdout] | [INFO] [stdout] 91 | let right = self.unary(); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:94:23 [INFO] [stdout] | [INFO] [stdout] 94 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:94:32 [INFO] [stdout] | [INFO] [stdout] 94 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:94:23 [INFO] [stdout] | [INFO] [stdout] 94 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 96 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:96:33 [INFO] [stdout] | [INFO] [stdout] 96 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Binary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:93:26 [INFO] [stdout] | [INFO] [stdout] 93 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 96 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | let right = self.unary(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:103:24 [INFO] [stdout] | [INFO] [stdout] 103 | fn unary(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 103 ~ fn unary(&self) -> Box { [INFO] [stdout] 104 | let match_tokens = vec![TokenType::Bang, TokenType::Minus]; [INFO] [stdout] ... [INFO] [stdout] 109 | [INFO] [stdout] 110 ~ return Box::new(Expr::Unary(Unary { [INFO] [stdout] 111 | operator: *operator, [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] 113 ~ })); [INFO] [stdout] 114 | } [INFO] [stdout] 115 | [INFO] [stdout] 116 ~ Box::new(self.primary()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:94:23 [INFO] [stdout] | [INFO] [stdout] 94 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:108:30 [INFO] [stdout] | [INFO] [stdout] 108 | let right = self.unary(); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:94:32 [INFO] [stdout] | [INFO] [stdout] 94 | left: Box::new(expr), [INFO] [stdout] | -------- ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:94:23 [INFO] [stdout] | [INFO] [stdout] 94 | left: Box::new(expr), [INFO] [stdout] | ^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 96 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:96:33 [INFO] [stdout] | [INFO] [stdout] 96 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Unary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | return Expr::Unary(Unary { [INFO] [stdout] | ^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 96 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | expr = Expr::Binary(Binary { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: the left-hand-side of an assignment must have a statically known size [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:103:24 [INFO] [stdout] | [INFO] [stdout] 103 | fn unary(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 103 ~ fn unary(&self) -> Box { [INFO] [stdout] 104 | let match_tokens = vec![TokenType::Bang, TokenType::Minus]; [INFO] [stdout] ... [INFO] [stdout] 109 | [INFO] [stdout] 110 ~ return Box::new(Expr::Unary(Unary { [INFO] [stdout] 111 | operator: *operator, [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] 113 ~ })); [INFO] [stdout] 114 | } [INFO] [stdout] 115 | [INFO] [stdout] 116 ~ Box::new(self.primary()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:108:17 [INFO] [stdout] | [INFO] [stdout] 108 | let right = self.unary(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:108:30 [INFO] [stdout] | [INFO] [stdout] 108 | let right = self.unary(); [INFO] [stdout] | ^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:112:24 [INFO] [stdout] | [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:112:33 [INFO] [stdout] | [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Unary` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | return Expr::Unary(Unary { [INFO] [stdout] | ^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:112:24 [INFO] [stdout] | [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:119:26 [INFO] [stdout] | [INFO] [stdout] 119 | fn primary(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 119 ~ fn primary(&self) -> Box { [INFO] [stdout] 120 | match self.peek().token_type { [INFO] [stdout] 121 ~ TokenType::False => return Box::new(Expr::Literal(Literal(LiteralType::))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:108:17 [INFO] [stdout] | [INFO] [stdout] 108 | let right = self.unary(); [INFO] [stdout] | ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] = note: all local variables must have a statically known size [INFO] [stdout] = help: unsized locals are gated as an unstable feature [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Literal` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:121:46 [INFO] [stdout] | [INFO] [stdout] 121 | TokenType::False => return Expr::Literal(Literal(LiteralType::)) [INFO] [stdout] | ^^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:112:24 [INFO] [stdout] | [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the size for values of type `dyn ast_types::Expr` cannot be known at compilation time [INFO] [stdout] --> src/parser/mod.rs:112:33 [INFO] [stdout] | [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] | -------- ^^^^^ doesn't have a size known at compile-time [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sized` is not implemented for `dyn ast_types::Expr` [INFO] [stdout] note: required by a bound in `Box::::new` [INFO] [stdout] --> /rustc/506512391b1a75ae450d36c9420978402a91abcc/library/alloc/src/boxed.rs:257:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `ast_types::Expr` cannot be made into an object [INFO] [stdout] --> src/parser/mod.rs:112:24 [INFO] [stdout] | [INFO] [stdout] 112 | right: Box::new(right), [INFO] [stdout] | ^^^^^^^^^^^^^^^ `ast_types::Expr` cannot be made into an object [INFO] [stdout] | [INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit [INFO] [stdout] --> src/parser/ast_types.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Expr { [INFO] [stdout] | ---- this trait cannot be made into an object... [INFO] [stdout] 4 | fn accept(&self, visitor: &impl Visitor); [INFO] [stdout] | ^^^^^^ ...because method `accept` has generic type parameters [INFO] [stdout] = help: consider moving `accept` to another trait [INFO] [stdout] = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `ast_types::Expr` for this new enum and using it instead: [INFO] [stdout] parser::ast_types::Binary [INFO] [stdout] parser::ast_types::Grouping [INFO] [stdout] parser::ast_types::Literal [INFO] [stdout] parser::ast_types::Unary [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0746]: return type cannot have an unboxed trait object [INFO] [stdout] --> src/parser/mod.rs:119:26 [INFO] [stdout] | [INFO] [stdout] 119 | fn primary(&self) -> Expr { [INFO] [stdout] | ^^^^ doesn't have a size known at compile-time [INFO] [stdout] | [INFO] [stdout] help: box the return type, and wrap all of the returned values in `Box::new` [INFO] [stdout] | [INFO] [stdout] 119 ~ fn primary(&self) -> Box { [INFO] [stdout] 120 | match self.peek().token_type { [INFO] [stdout] 121 ~ TokenType::False => return Box::new(Expr::Literal(Literal(LiteralType::))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no associated item named `Literal` found for trait object `dyn ast_types::Expr` in the current scope [INFO] [stdout] --> src/parser/mod.rs:121:46 [INFO] [stdout] | [INFO] [stdout] 121 | TokenType::False => return Expr::Literal(Literal(LiteralType::)) [INFO] [stdout] | ^^^^^^^ associated item not found in `dyn Expr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `tokens` [INFO] [stdout] --> src/parser/mod.rs:18:25 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn new(tokens: Vec) -> Self { [INFO] [stdout] | ------ move occurs because `tokens` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] 15 | Self { [INFO] [stdout] 16 | tokens, [INFO] [stdout] | ------ value moved here [INFO] [stdout] 17 | current: 0, [INFO] [stdout] 18 | tokens_len: tokens.len(), [INFO] [stdout] | ^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 16 | tokens: tokens.clone(), [INFO] [stdout] | ++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `tokens` [INFO] [stdout] --> src/parser/mod.rs:18:25 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn new(tokens: Vec) -> Self { [INFO] [stdout] | ------ move occurs because `tokens` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] 15 | Self { [INFO] [stdout] 16 | tokens, [INFO] [stdout] | ------ value moved here [INFO] [stdout] 17 | current: 0, [INFO] [stdout] 18 | tokens_len: tokens.len(), [INFO] [stdout] | ^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 16 | tokens: tokens.clone(), [INFO] [stdout] | ++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `self.current`, which is behind a `&` reference [INFO] [stdout] --> src/parser/mod.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | self.current += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be a mutable reference [INFO] [stdout] | [INFO] [stdout] 133 | fn advance(&mut self) -> &Token { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `self.current`, which is behind a `&` reference [INFO] [stdout] --> src/parser/mod.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | self.current += 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be a mutable reference [INFO] [stdout] | [INFO] [stdout] 133 | fn advance(&mut self) -> &Token { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of a shared reference [INFO] [stdout] --> src/parser/mod.rs:148:20 [INFO] [stdout] | [INFO] [stdout] 148 | .find(|&&token| token == self.peek().token_type) [INFO] [stdout] | ^^----- [INFO] [stdout] | | [INFO] [stdout] | data moved here [INFO] [stdout] | move occurs because `token` has type `token::TokenType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider removing the borrow [INFO] [stdout] | [INFO] [stdout] 148 - .find(|&&token| token == self.peek().token_type) [INFO] [stdout] 148 + .find(|&token| token == self.peek().token_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of a shared reference [INFO] [stdout] --> src/parser/mod.rs:148:20 [INFO] [stdout] | [INFO] [stdout] 148 | .find(|&&token| token == self.peek().token_type) [INFO] [stdout] | ^^----- [INFO] [stdout] | | [INFO] [stdout] | data moved here [INFO] [stdout] | move occurs because `token` has type `token::TokenType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider removing the borrow [INFO] [stdout] | [INFO] [stdout] 148 - .find(|&&token| token == self.peek().token_type) [INFO] [stdout] 148 + .find(|&token| token == self.peek().token_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 99 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0038, E0046, E0107, E0277, E0308, E0382, E0425, E0507, E0594... [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0038`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 99 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0038, E0046, E0107, E0277, E0308, E0382, E0425, E0507, E0594... [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0038`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_playground` (bin "rust_playground") due to 100 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `rust_playground` (bin "rust_playground" test) due to 100 previous errors [INFO] running `Command { std: "docker" "inspect" "5a2ef9a5c5032bd881c7558d243f7b3d48f4fe0707dc1c970d79bf80bddadb59", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5a2ef9a5c5032bd881c7558d243f7b3d48f4fe0707dc1c970d79bf80bddadb59", kill_on_drop: false }` [INFO] [stdout] 5a2ef9a5c5032bd881c7558d243f7b3d48f4fe0707dc1c970d79bf80bddadb59 [INFO] checking mikewim/crablox against try#dae34b759e282c069aa28752564694effd121a63 for pr-125384 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmikewim%2Fcrablox" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/mikewim/crablox on toolchain dae34b759e282c069aa28752564694effd121a63 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/mikewim/crablox [INFO] finished tweaking git repo https://github.com/mikewim/crablox [INFO] tweaked toml for git repo https://github.com/mikewim/crablox written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/mikewim/crablox already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a9361e297cfe4d952b57bd65cd9c1a5b82f5e5769ea05f3438b8e0537fe3f841 [INFO] running `Command { std: "docker" "start" "-a" "a9361e297cfe4d952b57bd65cd9c1a5b82f5e5769ea05f3438b8e0537fe3f841", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a9361e297cfe4d952b57bd65cd9c1a5b82f5e5769ea05f3438b8e0537fe3f841", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a9361e297cfe4d952b57bd65cd9c1a5b82f5e5769ea05f3438b8e0537fe3f841", kill_on_drop: false }` [INFO] [stdout] a9361e297cfe4d952b57bd65cd9c1a5b82f5e5769ea05f3438b8e0537fe3f841 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=allow" "-e" "RUSTDOCFLAGS=--cap-lints=allow" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0e5f3d04b737409b9c66b708ed0871e750b3ddacfb067620c57d01c34ef6d5cb [INFO] running `Command { std: "docker" "start" "-a" "0e5f3d04b737409b9c66b708ed0871e750b3ddacfb067620c57d01c34ef6d5cb", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] skipping non-2021 edition `2018` [INFO] running `Command { std: "docker" "inspect" "0e5f3d04b737409b9c66b708ed0871e750b3ddacfb067620c57d01c34ef6d5cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0e5f3d04b737409b9c66b708ed0871e750b3ddacfb067620c57d01c34ef6d5cb", kill_on_drop: false }` [INFO] [stdout] 0e5f3d04b737409b9c66b708ed0871e750b3ddacfb067620c57d01c34ef6d5cb