Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
zgrannan committed Dec 7, 2023
1 parent d865731 commit d1825c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 26 deletions.
16 changes: 3 additions & 13 deletions prusti-viper/src/encoder/interface.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
use crate::encoder::{
errors::{SpannedEncodingResult, WithSpan},
mir::specifications::SpecificationsInterface,
snapshot::interface::SnapshotEncoderInterface,
stub_function_encoder::StubFunctionEncoder,
Encoder,
};
use log::{debug, trace};
use prusti_common::config;
use prusti_interface::data::ProcedureDefId;

use prusti_rustc_interface::{
middle::{
mir, ty,
ty::{Binder, GenericArgsRef},
},
middle::{mir, ty, ty::Binder},
span::Span,
};
use rustc_hash::{FxHashMap, FxHashSet};

use prusti_interface::specs::typed::ProcedureSpecificationKind;
use std::cell::RefCell;
use vir_crate::{common::identifier::WithIdentifier, high as vir_high, polymorphic as vir_poly};
use vir_crate::polymorphic as vir_poly;

pub(crate) trait PureFunctionFormalArgsEncoderInterface<'p, 'v: 'p, 'tcx: 'v> {
fn encoder(&self) -> &'p Encoder<'v, 'tcx>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ use vir_crate::{
polymorphic::{self as vir, ExprIterator},
};

use super::PureFunctionEncoderInterface;

pub(super) struct PureFunctionEncoder<'p, 'v: 'p, 'tcx: 'v> {
encoder: &'p Encoder<'v, 'tcx>,
/// The function to be encoded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ use crate::encoder::{
mir::specifications::SpecificationsInterface,
snapshot::interface::SnapshotEncoderInterface,
stub_function_encoder::StubFunctionEncoder,
Encoder,
};
use log::{debug, trace};
use prusti_common::config;
use prusti_interface::data::ProcedureDefId;
use prusti_rustc_interface::{
middle::{mir, ty, ty::GenericArgsRef},
span::Span,
};
use prusti_rustc_interface::middle::{mir, ty, ty::GenericArgsRef};
use rustc_hash::{FxHashMap, FxHashSet};

use prusti_interface::specs::typed::ProcedureSpecificationKind;
Expand Down
7 changes: 1 addition & 6 deletions prusti-viper/src/encoder/stub_function_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ use crate::encoder::{
errors::{SpannedEncodingResult, WithSpan},
high::generics::HighGenericsEncoderInterface,
interface::PureFunctionFormalArgsEncoderInterface,
mir_encoder::{MirEncoder, PlaceEncoder},
snapshot::interface::SnapshotEncoderInterface,
Encoder,
};
use log::debug;
use prusti_rustc_interface::{
hir::def_id::DefId,
middle::{
mir,
mir::Local,
ty,
mir, ty,
ty::{Binder, GenericArgsRef},
},
span::Span,
Expand All @@ -30,7 +27,6 @@ use super::mir::specifications::SpecificationsInterface;
pub struct StubFunctionEncoder<'p, 'v: 'p, 'tcx: 'v> {
encoder: &'p Encoder<'v, 'tcx>,
mir: Option<&'p mir::Body<'tcx>>,
mir_encoder: Option<MirEncoder<'p, 'v, 'tcx>>,
proc_def_id: DefId,
substs: GenericArgsRef<'tcx>,
sig: ty::PolyFnSig<'tcx>,
Expand Down Expand Up @@ -64,7 +60,6 @@ impl<'p, 'v: 'p, 'tcx: 'v> StubFunctionEncoder<'p, 'v, 'tcx> {
StubFunctionEncoder {
encoder,
mir,
mir_encoder: mir.map(|m| MirEncoder::new(encoder, m, proc_def_id)),
proc_def_id,
substs,
sig,
Expand Down

0 comments on commit d1825c3

Please sign in to comment.