mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Auto merge of #14577 - jsoref:spelling, r=lnicola
Spelling This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling). The misspellings have been reported at4699991040 (summary-12751355796)
The action reports that the changes in this PR would make it happy:4699991284 (summary-12751356293)
closes #14567
This commit is contained in:
commit
2400b36a2e
83 changed files with 137 additions and 136 deletions
|
@ -148,7 +148,7 @@ pub(super) fn hints(
|
|||
Some(())
|
||||
}
|
||||
|
||||
/// Returns whatever the hint should be postfix and if we need to add paretheses on the inside and/or outside of `expr`,
|
||||
/// Returns whatever the hint should be postfix and if we need to add parentheses on the inside and/or outside of `expr`,
|
||||
/// if we are going to add (`postfix`) adjustments hints to it.
|
||||
fn mode_and_needs_parens_for_adjustment_hints(
|
||||
expr: &ast::Expr,
|
||||
|
@ -183,7 +183,7 @@ fn mode_and_needs_parens_for_adjustment_hints(
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns whatever we need to add paretheses on the inside and/or outside of `expr`,
|
||||
/// Returns whatever we need to add parentheses on the inside and/or outside of `expr`,
|
||||
/// if we are going to add (`postfix`) adjustments hints to it.
|
||||
fn needs_parens_for_adjustment_hints(expr: &ast::Expr, postfix: bool) -> (bool, bool) {
|
||||
// This is a very miserable pile of hacks...
|
||||
|
@ -194,10 +194,10 @@ fn needs_parens_for_adjustment_hints(expr: &ast::Expr, postfix: bool) -> (bool,
|
|||
// But we want to check what would happen if we add `*`/`.*` to the inner expression.
|
||||
// To check for inner we need `` expr.needs_parens_in(`*expr`) ``,
|
||||
// to check for outer we need `` `*expr`.needs_parens_in(parent) ``,
|
||||
// where "expr" is the `expr` parameter, `*expr` is the editted `expr`,
|
||||
// where "expr" is the `expr` parameter, `*expr` is the edited `expr`,
|
||||
// and "parent" is the parent of the original expression...
|
||||
//
|
||||
// For this we utilize mutable mutable trees, which is a HACK, but it works.
|
||||
// For this we utilize mutable trees, which is a HACK, but it works.
|
||||
//
|
||||
// FIXME: comeup with a better API for `needs_parens_in`, so that we don't have to do *this*
|
||||
|
||||
|
@ -243,7 +243,7 @@ fn needs_parens_for_adjustment_hints(expr: &ast::Expr, postfix: bool) -> (bool,
|
|||
};
|
||||
|
||||
// At this point
|
||||
// - `parent` is the parrent of the original expression
|
||||
// - `parent` is the parent of the original expression
|
||||
// - `dummy_expr` is the original expression wrapped in the operator we want (`*`/`.*`)
|
||||
// - `expr` is the clone of the original expression (with `dummy_expr` as the parent)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue