fix: formatting

This commit is contained in:
roife 2024-03-05 19:55:31 +08:00
parent 16995ceda9
commit 9cc3a9cfc2
2 changed files with 4 additions and 2 deletions

View file

@ -1366,7 +1366,9 @@ impl<'ctx> MirLowerCtx<'ctx> {
LiteralOrConst::Const(c) => {
let c = match &self.body.pats[*c] {
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 resolver = self.owner.resolver(self.db.upcast());

View file

@ -536,7 +536,7 @@ fn bar() {
);
}
#[test]
#[test]
fn goto_definition_works_for_consts_inside_range_pattern() {
check(
r#"