mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: formatting
This commit is contained in:
parent
16995ceda9
commit
9cc3a9cfc2
2 changed files with 4 additions and 2 deletions
|
@ -1366,7 +1366,9 @@ impl<'ctx> MirLowerCtx<'ctx> {
|
||||||
LiteralOrConst::Const(c) => {
|
LiteralOrConst::Const(c) => {
|
||||||
let c = match &self.body.pats[*c] {
|
let c = match &self.body.pats[*c] {
|
||||||
Pat::Path(p) => p,
|
Pat::Path(p) => p,
|
||||||
_ => not_supported!("only `char` and numeric types are allowed in range patterns"),
|
_ => not_supported!(
|
||||||
|
"only `char` and numeric types are allowed in range patterns"
|
||||||
|
),
|
||||||
};
|
};
|
||||||
let unresolved_name = || MirLowerError::unresolved_path(self.db, c.as_ref());
|
let unresolved_name = || MirLowerError::unresolved_path(self.db, c.as_ref());
|
||||||
let resolver = self.owner.resolver(self.db.upcast());
|
let resolver = self.owner.resolver(self.db.upcast());
|
||||||
|
|
|
@ -536,7 +536,7 @@ fn bar() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn goto_definition_works_for_consts_inside_range_pattern() {
|
fn goto_definition_works_for_consts_inside_range_pattern() {
|
||||||
check(
|
check(
|
||||||
r#"
|
r#"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue