From 04859fb7d33874ab8fd1b85c58cc0904ce18f120 Mon Sep 17 00:00:00 2001 From: Vincent Lafeychine <vincent.lafeychine@proton.me> Date: Fri, 10 May 2024 11:50:06 +0200 Subject: [PATCH] clippy: Fix empty_structs_with_brackets --- rr_frontend/.cargo/config.toml | 1 - rr_frontend/refinedrust_frontend/src/bin/refinedrust-rustc.rs | 2 +- rr_frontend/translation/src/spec_parsers/const_attr_parser.rs | 2 +- rr_frontend/translation/src/spec_parsers/crate_attr_parser.rs | 2 +- rr_frontend/translation/src/spec_parsers/enum_spec_parser.rs | 2 +- rr_frontend/translation/src/spec_parsers/module_attr_parser.rs | 2 +- rr_frontend/translation/src/spec_parsers/struct_spec_parser.rs | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/rr_frontend/.cargo/config.toml b/rr_frontend/.cargo/config.toml index 986cb351..2621f3d4 100644 --- a/rr_frontend/.cargo/config.toml +++ b/rr_frontend/.cargo/config.toml @@ -32,7 +32,6 @@ rustflags = [ "-Aclippy::string_lit_as_bytes", # clippy::restriction - "-Aclippy::empty_structs_with_brackets", "-Aclippy::get_unwrap", "-Aclippy::if_then_some_else_none", "-Aclippy::impl_trait_in_params", diff --git a/rr_frontend/refinedrust_frontend/src/bin/refinedrust-rustc.rs b/rr_frontend/refinedrust_frontend/src/bin/refinedrust-rustc.rs index 305af2c9..a87e66e9 100644 --- a/rr_frontend/refinedrust_frontend/src/bin/refinedrust-rustc.rs +++ b/rr_frontend/refinedrust_frontend/src/bin/refinedrust-rustc.rs @@ -40,7 +40,7 @@ fn get_rr_version_info() -> String { } /// Callbacks for the `RefinedRust` frontend. -struct RRCompilerCalls {} +struct RRCompilerCalls; // From Prusti. fn mir_borrowck(tcx: TyCtxt<'_>, def_id: LocalDefId) -> mir_borrowck::ProvidedValue<'_> { diff --git a/rr_frontend/translation/src/spec_parsers/const_attr_parser.rs b/rr_frontend/translation/src/spec_parsers/const_attr_parser.rs index 84f7cb49..4d4b3cd0 100644 --- a/rr_frontend/translation/src/spec_parsers/const_attr_parser.rs +++ b/rr_frontend/translation/src/spec_parsers/const_attr_parser.rs @@ -26,7 +26,7 @@ pub struct ConstAttrs { pub name: String, } -pub struct VerboseConstAttrParser {} +pub struct VerboseConstAttrParser; impl VerboseConstAttrParser { pub const fn new() -> Self { diff --git a/rr_frontend/translation/src/spec_parsers/crate_attr_parser.rs b/rr_frontend/translation/src/spec_parsers/crate_attr_parser.rs index 2cc2655b..c036fea0 100644 --- a/rr_frontend/translation/src/spec_parsers/crate_attr_parser.rs +++ b/rr_frontend/translation/src/spec_parsers/crate_attr_parser.rs @@ -26,7 +26,7 @@ pub struct CrateAttrs { pub context_params: Vec<coq::Param>, } -pub struct VerboseCrateAttrParser {} +pub struct VerboseCrateAttrParser; impl VerboseCrateAttrParser { pub const fn new() -> Self { diff --git a/rr_frontend/translation/src/spec_parsers/enum_spec_parser.rs b/rr_frontend/translation/src/spec_parsers/enum_spec_parser.rs index 1433a4c6..a945fae3 100644 --- a/rr_frontend/translation/src/spec_parsers/enum_spec_parser.rs +++ b/rr_frontend/translation/src/spec_parsers/enum_spec_parser.rs @@ -67,7 +67,7 @@ impl<'a> parse::Parse<ParseMeta<'a>> for EnumPattern { } } -pub struct VerboseEnumSpecParser {} +pub struct VerboseEnumSpecParser; impl VerboseEnumSpecParser { pub const fn new() -> Self { diff --git a/rr_frontend/translation/src/spec_parsers/module_attr_parser.rs b/rr_frontend/translation/src/spec_parsers/module_attr_parser.rs index b7dc251f..233b4a69 100644 --- a/rr_frontend/translation/src/spec_parsers/module_attr_parser.rs +++ b/rr_frontend/translation/src/spec_parsers/module_attr_parser.rs @@ -29,7 +29,7 @@ pub struct ModuleAttrs { pub context_params: Vec<coq::Param>, } -pub struct VerboseModuleAttrParser {} +pub struct VerboseModuleAttrParser; impl VerboseModuleAttrParser { pub const fn new() -> Self { diff --git a/rr_frontend/translation/src/spec_parsers/struct_spec_parser.rs b/rr_frontend/translation/src/spec_parsers/struct_spec_parser.rs index e4a1b5c9..3d69fafa 100644 --- a/rr_frontend/translation/src/spec_parsers/struct_spec_parser.rs +++ b/rr_frontend/translation/src/spec_parsers/struct_spec_parser.rs @@ -167,7 +167,7 @@ impl<U> parse::Parse<U> for InvariantSpecFlags { } } -pub struct VerboseInvariantSpecParser {} +pub struct VerboseInvariantSpecParser; impl VerboseInvariantSpecParser { pub const fn new() -> Self { -- GitLab