Skip to content

Commit 50a0b75

Browse files
celinvaltedinski
authored andcommitted
Cleaning up kani-compiler unused code (rust-lang#916)
and enable deny warnings for the kani-compiler crate.
1 parent 6b8e2dc commit 50a0b75

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

src/kani-compiler/src/codegen_cprover_gotoc/codegen/function.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use cbmc::InternString;
99
use kani_metadata::HarnessMetadata;
1010
use rustc_ast::ast;
1111
use rustc_ast::{Attribute, LitKind};
12-
use rustc_middle::mir::coverage::Op;
1312
use rustc_middle::mir::{HasLocalDecls, Local};
1413
use rustc_middle::ty::{self, Instance};
1514
use std::collections::BTreeMap;

src/kani-compiler/src/codegen_cprover_gotoc/codegen/rvalue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::typ::{is_pointer, pointee_type, TypeExt};
44
use crate::codegen_cprover_gotoc::utils::{dynamic_fat_ptr, slice_fat_ptr};
55
use crate::codegen_cprover_gotoc::{GotocCtx, VtableCtx};
66
use cbmc::goto_program::{Expr, Location, Stmt, Symbol, Type};
7-
use cbmc::utils::{aggr_tag, BUG_REPORT_URL};
7+
use cbmc::utils::BUG_REPORT_URL;
88
use cbmc::MachineModel;
99
use cbmc::NO_PRETTY_NAME;
1010
use cbmc::{btree_string_map, InternString, InternedString};

src/kani-compiler/src/codegen_cprover_gotoc/context/current_fn.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ impl CurrentFnCtx<'tcx> {
7676

7777
/// Getters
7878
impl CurrentFnCtx<'tcx> {
79-
/// The basic block we are currently compiling
80-
pub fn current_bb(&self) -> BasicBlock {
81-
self.current_bb.unwrap()
82-
}
83-
8479
/// The function we are currently compiling
8580
pub fn instance(&self) -> Instance<'tcx> {
8681
self.instance

src/kani-compiler/src/main.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//!
77
//! Like miri, clippy, and other tools developed on the top of rustc, we rely on the
88
//! rustc_private feature and a specific version of rustc.
9-
9+
#![deny(warnings)]
1010
#![feature(bool_to_option)]
1111
#![feature(crate_visibility_modifier)]
1212
#![feature(extern_types)]
@@ -16,20 +16,15 @@
1616
#![feature(box_patterns)]
1717
#![feature(once_cell)]
1818
#![feature(rustc_private)]
19-
extern crate rustc_arena;
2019
extern crate rustc_ast;
21-
extern crate rustc_attr;
2220
extern crate rustc_codegen_ssa;
2321
extern crate rustc_data_structures;
2422
extern crate rustc_driver;
2523
extern crate rustc_errors;
26-
extern crate rustc_fs_util;
2724
extern crate rustc_hir;
2825
extern crate rustc_index;
29-
extern crate rustc_llvm;
3026
extern crate rustc_metadata;
3127
extern crate rustc_middle;
32-
extern crate rustc_serialize;
3328
extern crate rustc_session;
3429
extern crate rustc_span;
3530
extern crate rustc_target;

0 commit comments

Comments
 (0)