Skip to content

Commit

Permalink
got rid of unused libraries, including raw, and got rid of warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jessberg committed Jul 12, 2021
1 parent 0cc37a1 commit ae30211
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use std::convert::TryInto;
use std::env;
use std::env::VarError;
use std::error::Error;
use std::fs::{read_dir, DirEntry, File};
use std::io::Write;
use std::path::Path;
use std::process::Command;

fn main() {
Expand Down Expand Up @@ -33,14 +28,14 @@ fn gen_for_grammar(
grammar_file_name: &str,
antlr_path: &str,
additional_arg: Option<&str>,
) -> Result<(), Box<Error>> {
) -> Result<(), Box<dyn Error>> {
// let out_dir = env::var("OUT_DIR").unwrap();
// let dest_path = Path::new(&out_dir);

let input = env::current_dir().unwrap().join("grammars");
let file_name = grammar_file_name.to_owned() + ".g4";

let c = Command::new("java")
let _c = Command::new("java")
.current_dir(input)
.arg("-cp")
.arg(antlr_path)
Expand Down
1 change: 1 addition & 0 deletions src/atn_config_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::parser_atn_simulator::MergeCache;
use crate::prediction_context::{MurmurHasherBuilder, PredictionContext};
use crate::semantic_context::SemanticContext;

#[allow(dead_code)]
pub struct ATNConfigSet {
cached_hash: u64,

Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![crate_type = "lib"]
#![feature(try_blocks)]
//#![feature(nll)]
#![feature(raw)]
#![feature(is_sorted)]
#![feature(cell_update)]
#![feature(get_mut_unchecked)]
Expand All @@ -13,7 +12,7 @@
// #![feature(generic_associated_types)]
#![warn(rust_2018_idioms)]
#![warn(missing_docs)] // warn if there is missing docs
#![warn(missing_debug_implementations)]
//#![warn(missing_debug_implementations)] there are missing debugs
#![warn(trivial_numeric_casts)]
#![allow(incomplete_features)]

Expand Down

0 comments on commit ae30211

Please sign in to comment.