feat: more test case for first set #43
clippy
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.0 (79e9716c9 2023-11-13)
- cargo 1.74.0 (ecb9851af 2023-10-18)
- clippy 0.1.74 (79e9716 2023-11-13)
Annotations
Check warning on line 115 in src/lr0/core.rs
github-actions / clippy
you should consider adding a `Default` implementation for `LR0ItemSet<'grammar>`
warning: you should consider adding a `Default` implementation for `LR0ItemSet<'grammar>`
--> src/lr0/core.rs:111:5
|
111 | / pub fn new() -> Self {
112 | | Self {
113 | | items: HashSet::new(),
114 | | }
115 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
110 + impl<'grammar> Default for LR0ItemSet<'grammar> {
111 + fn default() -> Self {
112 + Self::new()
113 + }
114 + }
|
Check warning on line 44 in src/lr0/core.rs
github-actions / clippy
this lifetime isn't used in the function definition
warning: this lifetime isn't used in the function definition
--> src/lr0/core.rs:44:23
|
44 | pub fn transition<'a>(&self, from: usize, via: &Term) -> Option<usize> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
Check warning on line 40 in src/lr0/core.rs
github-actions / clippy
struct `LR0Closure` has a public `len` method, but no `is_empty` method
warning: struct `LR0Closure` has a public `len` method, but no `is_empty` method
--> src/lr0/core.rs:40:5
|
40 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
Check warning on line 15 in src/slr/helper.rs
github-actions / clippy
associated items `new`, `get_index_of`, and `get` are never used
warning: associated items `new`, `get_index_of`, and `get` are never used
--> src/slr/helper.rs:15:12
|
14 | impl<'grammar> IndexedGrammar<'grammar> {
| --------------------------------------- associated items in this implementation
15 | pub fn new(grammar: &'grammar Grammar) -> IndexedGrammar<'grammar> {
| ^^^
...
34 | pub fn get_index_of(&self, expr: &Expression) -> Option<usize> {
| ^^^^^^^^^^^^
...
38 | pub(crate) fn get(&self, expr: &Expression) -> Option<Production> {
| ^^^
Check warning on line 63 in src/slr/builder.rs
github-actions / clippy
associated items `new`, `shift`, `reduce`, `goto`, and `build` are never used
warning: associated items `new`, `shift`, `reduce`, `goto`, and `build` are never used
--> src/slr/builder.rs:63:12
|
62 | impl<'grammar> SLRTableBuilder<'grammar> {
| ---------------------------------------- associated items in this implementation
63 | pub fn new(
| ^^^
...
83 | fn shift(&self, from: usize, via: &'grammar Term) {
| ^^^^^
...
93 | fn reduce(&self, index: usize, lr0: &LR0Item) {
| ^^^^^^
...
103 | fn goto(&self, from: usize, via: &'grammar Term) {
| ^^^^
...
114 | pub fn build(self) -> SLRTable<'grammar> {
| ^^^^^
Check warning on line 55 in src/slr/builder.rs
github-actions / clippy
struct `SLRTableBuilder` is never constructed
warning: struct `SLRTableBuilder` is never constructed
--> src/slr/builder.rs:55:12
|
55 | pub struct SLRTableBuilder<'grammar> {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default