Skip to content
Snippets Groups Projects
Verified Commit 36646b4e authored by Vincent Lafeychine's avatar Vincent Lafeychine
Browse files

clippy: Fix unused_unit

parent 112f22cc
No related branches found
No related tags found
1 merge request!43Fix remaining `clippy::style`
......@@ -81,7 +81,6 @@ rustflags = [
# clippy::style
"-Aclippy::new_without_default",
"-Aclippy::unused_unit",
"-Aclippy::unwrap_or_default",
"-Aclippy::write_with_newline",
......
......@@ -2799,14 +2799,12 @@ impl<'a, 'def: 'a, 'tcx: 'def> BodyTranslator<'a, 'def, 'tcx> {
StatementKind::FakeRead(b) => {
// we can probably ignore this, but I'm not sure
info!("Ignoring FakeRead: {:?}", b);
()
},
StatementKind::SetDiscriminant {
place: _place,
variant_index: _variant_index,
} =>
// TODO
{
} => {
// TODO
return Err(TranslationError::UnsupportedFeature {
description: "TODO: implement SetDiscriminant".to_string(),
});
......@@ -2814,54 +2812,38 @@ impl<'a, 'def: 'a, 'tcx: 'def> BodyTranslator<'a, 'def, 'tcx> {
StatementKind::PlaceMention(place) => {
// TODO: this is missed UB
info!("Ignoring PlaceMention: {:?}", place);
()
},
StatementKind::Intrinsic(_intrinsic) => {
return Err(TranslationError::UnsupportedFeature {
description: "TODO: implement Intrinsic".to_string(),
});
},
StatementKind::ConstEvalCounter =>
// no-op
{
()
StatementKind::ConstEvalCounter => {
// no-op
},
StatementKind::StorageLive(_) =>
// just ignore
{
()
StatementKind::StorageLive(_) => {
// just ignore
},
StatementKind::StorageDead(_) =>
// just ignore
{
()
StatementKind::StorageDead(_) => {
// just ignore
},
StatementKind::Deinit(_) =>
// TODO: find out where this is emitted
{
StatementKind::Deinit(_) => {
// TODO: find out where this is emitted
return Err(TranslationError::UnsupportedFeature {
description: "Unsupported statement: Deinit".to_string(),
});
},
StatementKind::Retag(_, _) =>
// just ignore retags
{
()
StatementKind::Retag(_, _) => {
// just ignore retags
},
StatementKind::AscribeUserType(_, _) =>
// don't need that info
{
()
StatementKind::AscribeUserType(_, _) => {
// don't need that info
},
StatementKind::Coverage(_) =>
// don't need that
{
()
StatementKind::Coverage(_) => {
// don't need that
},
StatementKind::Nop =>
// ignore
{
()
StatementKind::Nop => {
// ignore
},
}
cont_stmt = self.prepend_endlfts(cont_stmt, dying_loans.into_iter());
......
......@@ -1234,7 +1234,7 @@ fn scan_loadpaths(paths: &[std::path::PathBuf]) -> io::Result<HashMap<String, st
/// Translate a crate, creating a `VerificationCtxt` in the process.
pub fn generate_coq_code<'tcx, F>(tcx: TyCtxt<'tcx>, continuation: F) -> Result<(), String>
where
F: Fn(VerificationCtxt<'tcx, '_>) -> (),
F: Fn(VerificationCtxt<'tcx, '_>),
{
let env = Environment::new(tcx);
let env: &Environment = &*Box::leak(Box::new(env));
......
......@@ -130,7 +130,6 @@ impl EnumSpecParser for VerboseEnumSpecParser {
},
_ => {
// skip and ignore other attributes
()
},
}
}
......
......@@ -271,7 +271,6 @@ impl InvariantSpecParser for VerboseInvariantSpecParser {
},
_ => {
//skip, this may be part of an enum spec
()
},
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment