From 4f3c0adc5aafea465c71c85f36484da970df1ba2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 9 May 2021 19:51:06 +0300 Subject: internal: introduce `ast::make::ext` module with common shortcuts There's a tension between keeping a well-architectured minimal orthogonal set of constructs, and providing convenience functions. Relieve this pressure by introducing an dedicated module for non-orthogonal shortcuts. This is inspired by the django.shortcuts module which serves a similar purpose architecturally. --- crates/ide_assists/src/tests/generated.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide_assists/src/tests') diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs index 59bcef8fb..49c1a9776 100644 --- a/crates/ide_assists/src/tests/generated.rs +++ b/crates/ide_assists/src/tests/generated.rs @@ -1531,7 +1531,7 @@ enum Result { Ok(T), Err(E) } fn main() { let x: Result = Result::Ok(92); let y = match x { - Ok(a) => a, + Ok(it) => it, $0_ => unreachable!(), }; } -- cgit v1.2.3