Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fixes from formatting and clippy upgrade #1078

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading