Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Nak committed Sep 17, 2024
1 parent ac2b8f8 commit 7e9d00d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/codegen/src/yul/isel/inst_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,13 @@ impl<'a> InstSerializer<'a> {
///
/// The scoring function `F` is defined as follows:
/// 1. The initial score of each candidate('cand_bb`) is number of
/// predecessors of the candidate.
/// predecessors of the candidate.
///
/// 2. Find the `top_cand` of each `cand_bb`. `top_cand` can be found by
/// [`Self::try_find_top_cand`] method, see the method for details.
/// [`Self::try_find_top_cand`] method, see the method for details.
///
/// 3. If `top_cand` is found, then add the `cand_bb` score to the
/// `top_cand` score, then set 0 to the `cand_bb` score.
/// `top_cand` score, then set 0 to the `cand_bb` score.
///
/// After the scoring, the candidates with the highest score will be
/// selected.
Expand Down Expand Up @@ -516,16 +516,16 @@ impl<'a> InstSerializer<'a> {
/// A `top_cand` can be found by the following rules:
///
/// 1. Find the block which is contained in DF of `cand_bb` and in
/// `cands_with_score`.
/// `cands_with_score`.
///
/// 2. If a block is found in 1., and the score of the block is positive,
/// then the block is `top_cand`.
/// then the block is `top_cand`.
///
/// 2'. If a block is found in 1., and the score of the block is 0, then the
/// `top_cand` of the block is `top_cand` of `cand_bb`.
/// `top_cand` of the block is `top_cand` of `cand_bb`.
///
/// 2''. If a block is NOT found in 1., then there is no `top_cand` for
/// `cand_bb`.
/// `cand_bb`.
fn try_find_top_cand(
&self,
cands_with_score: &IndexMap<BasicBlockId, usize>,
Expand Down
1 change: 1 addition & 0 deletions crates/hir-analysis/src/ty/def_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ impl<'db> DefAnalyzer<'db> {
/// This method verifies if
/// 1. the given `ty` has `*` kind.
/// 2. the given `ty` is not const type
///
/// TODO: This method is a stop-gap implementation until we design a true
/// const type system.
fn verify_term_type_kind(&mut self, ty: HirTyId<'db>, span: DynLazySpan<'db>) -> bool {
Expand Down

0 comments on commit 7e9d00d

Please sign in to comment.