Skip to content

Commit

Permalink
chore: fixes from formatting and clippy upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
feds01 committed Sep 26, 2024
1 parent a00731f commit e89b414
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion compiler/hash-ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ impl Hunk {
/// [`AstNode<T>`] itself in order for other data structures to be able
/// to query the [Span] of a node simply by using the [AstNodeId] of the
/// node.

static SPAN_MAP: Lazy<RwLock<Vec<Span>>> = Lazy::new(|| {
// We initialise the map with a NULL node-id so we can use it as the default
// for items that need a node, but don't have one.
Expand Down
1 change: 0 additions & 1 deletion compiler/hash-codegen-llvm/src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ impl AttributeKind {

/// A wrapper type to convert the generic [CodeModel] into the
/// [inkwell::targets::CodeModel] equivalent type.

pub struct CodeModelWrapper(pub inkwell::targets::CodeModel);

impl From<CodeModel> for CodeModelWrapper {
Expand Down
2 changes: 1 addition & 1 deletion compiler/hash-codegen-llvm/src/translation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mod statics;
pub(crate) mod ty;

/// An empty c-string.
const EMPTY_C_STR: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"\0") };
const EMPTY_C_STR: &CStr = c"";

/// Used to fill in names where LLVM requires a name for an instruction, or some
/// value. We don't care about the names, so we just use an empty c-string.
Expand Down
7 changes: 0 additions & 7 deletions compiler/hash-repr/src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,13 +699,6 @@ impl fmt::Display for &ReprTy {
}
}

// new_sequence_store_key_indirect!(pub ReprTyListId, ReprTyId, derives =
// Debug);

/// Define the [TyListStore], which is a sequence of [ReprTy]s associated
/// with a [ReprTyListId].
// pub type TyListStore = DefaultSequenceStore<ReprTyListId, ReprTyId>;

impl fmt::Display for ReprTyListId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let value = self.value();
Expand Down
4 changes: 1 addition & 3 deletions compiler/hash-semantics/src/passes/resolution/pats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,7 @@ impl<E: SemanticEnv> ResolutionPass<'_, E> {
let resolved_path = self.resolve_ast_path(&path)?;
self.make_pat_from_resolved_ast_path(&resolved_path, node.id())
}
ast::Pat::Macro(invocation) => {
return self.make_pat_from_ast_pat(invocation.subject.ast_ref())
}
ast::Pat::Macro(invocation) => self.make_pat_from_ast_pat(invocation.subject.ast_ref()),
ast::Pat::Module(_) => {
// This should be handled earlier
panic_on_span!(node.span(), "Found module pattern during symbol resolution")
Expand Down
2 changes: 1 addition & 1 deletion compiler/hash-tir/src/building.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Building utilities for TIR nodes.
//! Building utilities for TIR nodes.

/// Building utilities for TIR nodes which do not have an origin, i.e. are
/// "generated".
Expand Down

0 comments on commit e89b414

Please sign in to comment.