Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- erpreters)
- error[E0573]: expected type, found module `self`
- --> src/compile.rs:18:24
- |
- 18 | prefix: Fn<&'a mut self>,
- | ^^^^ help: a self type with a similar name exists (notice the capitalization): `Self`
- error[E0573]: expected type, found module `self`
- --> src/compile.rs:19:23
- |
- 19 | infix: Fn<&'a mut self>,
- | ^^^^ help: a self type with a similar name exists (notice the capitalization): `Self`
- error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
- --> src/compile.rs:18:13
- |
- 18 | prefix: Fn<&'a mut self>,
- | ^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(&'a mut self) -> ()`
- |
- = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
- error[E0191]: the value of the associated type `Output` in `FnOnce` must be specified
- --> src/compile.rs:18:13
- |
- 18 | prefix: Fn<&'a mut self>,
- | ^^^^^^^^^^^^^^^^ help: specify the associated type: `Fn<&'a mut self, Output = Type>`
- error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
- --> src/compile.rs:19:12
- |
- 19 | infix: Fn<&'a mut self>,
- | ^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(&'a mut self) -> ()`
- |
- = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
- error[E0191]: the value of the associated type `Output` in `FnOnce` must be specified
- --> src/compile.rs:19:12
- |
- 19 | infix: Fn<&'a mut self>,
- | ^^^^^^^^^^^^^^^^ help: specify the associated type: `Fn<&'a mut self, Output = Type>`
- error[E0599]: no function or associated item named `binary` found for struct `Compiler` in the current scope
- --> src/compile.rs:143:71
- |
- 44 | pub struct Compiler<'a> {
- | ----------------------- function or associated item `binary` not found for this struct
- ...
- 143 | Minus => ParseRule{ prefix: Self::unary, infix: Self::binary, p...
- | ^^^^^^ function or associated item not found in `Compiler<'a>`
- |
- note: if you're trying to build a new `Compiler<'a>`, consider using `Compiler::<'a>::new` which returns `Compiler<'_>`
- --> src/compile.rs:53:5
- |
- 53 | pub fn new(tokens: Vec<Token<'a>>) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- help: there is a method `unary` with a similar name
- |
- 143 | Minus => ParseRule{ prefix: Self::unary, infix: Self::unary, prec: Term },
- | ~~~~~
- error[E0599]: no function or associated item named `binary` found for struct `Compiler` in the current scope
- --> src/compile.rs:144:67
- |
- 44 | pub struct Compiler<'a> {
- | ----------------------- function or associated item `binary` not found for this struct
- ...
- 144 | Plus => ParseRule{ prefix: null_fn, infix: Self::binary, p...
- | ^^^^^^ function or associated item not found in `Compiler<'a>`
- |
- note: if you're trying to build a new `Compiler<'a>`, consider using `Compiler::<'a>::new` which returns `Compiler<'_>`
- --> src/compile.rs:53:5
- |
- 53 | pub fn new(tokens: Vec<Token<'a>>) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- help: there is a method `unary` with a similar name
- |
- 144 | Plus => ParseRule{ prefix: null_fn, infix: Self::unary, prec: Term },
- | ~~~~~
- error[E0599]: no function or associated item named `binary` found for struct `Compiler` in the current scope
- --> src/compile.rs:145:67
- |
- 44 | pub struct Compiler<'a> {
- | ----------------------- function or associated item `binary` not found for this struct
- ...
- 145 | Slash => ParseRule{ prefix: null_fn, infix: Self::binary, p...
- | ^^^^^^ function or associated item not found in `Compiler<'a>`
- |
- note: if you're trying to build a new `Compiler<'a>`, consider using `Compiler::<'a>::new` which returns `Compiler<'_>`
- --> src/compile.rs:53:5
- |
- 53 | pub fn new(tokens: Vec<Token<'a>>) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- help: there is a method `unary` with a similar name
- |
- 145 | Slash => ParseRule{ prefix: null_fn, infix: Self::unary, prec: Factor },
- | ~~~~~
- error[E0599]: no function or associated item named `binary` found for struct `Compiler` in the current scope
- --> src/compile.rs:146:67
- |
- 44 | pub struct Compiler<'a> {
- | ----------------------- function or associated item `binary` not found for this struct
- ...
- 146 | Star => ParseRule{ prefix: null_fn, infix: Self::binary, p...
- | ^^^^^^ function or associated item not found in `Compiler<'a>`
- |
- note: if you're trying to build a new `Compiler<'a>`, consider using `Compiler::<'a>::new` which returns `Compiler<'_>`
- --> src/compile.rs:53:5
- |
- 53 | pub fn new(tokens: Vec<Token<'a>>) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- help: there is a method `unary` with a similar name
- |
- 146 | Star => ParseRule{ prefix: null_fn, infix: Self::unary, prec: Factor },
- | ~~~~~
- warning: unused variable: `level`
- --> src/compile.rs:134:36
- |
- 134 | fn parse_precedence(&mut self, level: Precedence) {
- | ^^^^^ help: if this is intentional, prefix it with an underscore: `_level`
- |
- = note: `#[warn(unused_variables)]` on by default
- warning: unused variable: `tokens`
- --> src/main.rs:27:13
- |
- 27 | let tokens = lex(&source).unwrap();
- | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_tokens`
- warning: variable does not need to be mutable
- --> src/main.rs:17:9
- |
- 17 | let mut chunk = Chunk::new();
- | ----^^^^^
- | |
- | help: remove this `mut`
- |
- = note: `#[warn(unused_mut)]` on by default
- error[E0782]: trait objects must include the `dyn` keyword
- --> src/compile.rs:18:13
- |
- 18 | prefix: Fn<&'a mut self>,
- | ^^^^^^^^^^^^^^^^
- |
- help: add `dyn` keyword before this trait
- |
- 18 | prefix: dyn Fn<&'a mut self>,
- | +++
- error[E0782]: trait objects must include the `dyn` keyword
- --> src/compile.rs:19:12
- |
- 19 | infix: Fn<&'a mut self>,
- | ^^^^^^^^^^^^^^^^
- |
- help: add `dyn` keyword before this trait
- |
- 19 | infix: dyn Fn<&'a mut self>,
- | +++
- Some errors have detailed explanations: E0191, E0573, E0599, E0658, E0782.
- For more information about an error, try `rustc --explain E0191`.
- warning: `crafting-interpreters` (bin "crafting-interpreters") generated 3 warnings
- error: could not compile `crafting-interpreters` (bin "crafting-interpreters") due to 12 previous errors; 3 warnings emitted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement