Skip to content

Commit d9ddad5

Browse files
committed
Fix compiler warnings.
1 parent cf1b9b7 commit d9ddad5

4 files changed

Lines changed: 4 additions & 9 deletions

File tree

compiler/rustc_codegen_llvm/src/gotoc/cbmc/goto_program/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ impl Expr {
710710
/// e.g. when extracting the values out of an existing struct expr (see transformer.rs)
711711
pub fn struct_expr_from_padded_values(
712712
typ: Type,
713-
mut values: Vec<Expr>,
713+
values: Vec<Expr>,
714714
symbol_table: &SymbolTable,
715715
) -> Self {
716716
assert!(

compiler/rustc_codegen_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/identity_transformer.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4-
use super::super::{
5-
DatatypeComponent, Expr, Location, Stmt, Symbol, SymbolTable, SymbolValues, Type,
6-
};
4+
use super::super::SymbolTable;
75
use super::Transformer;
8-
use std::collections::{BTreeMap, HashSet};
96

107
/// Struct for performing the identity transformation on a symbol table.
118
/// Mainly used as a demo/for testing.

compiler/rustc_codegen_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ mod identity_transformer;
66
mod passes;
77
mod transformer;
88

9-
use identity_transformer::IdentityTransformer;
109
pub use passes::do_passes;
1110
use transformer::Transformer;

compiler/rustc_codegen_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/transformer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ use super::super::{
55
BinaryOperand, CIntType, DatatypeComponent, Expr, ExprValue, Location, Parameter, SelfOperand,
66
Stmt, StmtBody, SwitchCase, Symbol, SymbolTable, SymbolValues, Type, UnaryOperand,
77
};
8-
use crate::btree_map;
98
use num::bigint::BigInt;
10-
use std::collections::{BTreeMap, HashSet};
9+
use rustc_data_structures::fx::FxHashSet;
1110

1211
/// The `Transformer` trait is a visitor pattern for the `SymbolTable`.
1312
/// To use it, you just need to implement the three symbol table accessor methods,
@@ -709,7 +708,7 @@ pub trait Transformer: Sized {
709708
fn transform_symbol_table(mut self, orig_symtab: &SymbolTable) -> SymbolTable {
710709
self.preprocess();
711710

712-
let mut added: HashSet<String> = HashSet::new();
711+
let mut added: FxHashSet<String> = FxHashSet::default();
713712

714713
// New symbol tables come with some items in them by default. Skip over those.
715714
for (name, _symbol) in self.symbol_table().iter() {

0 commit comments

Comments
 (0)