aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/diagnostics/expr.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics/expr.rs b/crates/ra_hir_ty/src/diagnostics/expr.rs
index 91caedc3d..21ff99a8c 100644
--- a/crates/ra_hir_ty/src/diagnostics/expr.rs
+++ b/crates/ra_hir_ty/src/diagnostics/expr.rs
@@ -489,4 +489,27 @@ fn f() {
489"#, 489"#,
490 ) 490 )
491 } 491 }
492
493 #[test]
494 fn enum_variant_type_macro() {
495 check_diagnostics(
496 r#"
497macro_rules! Type {
498 () => { u32 };
499}
500enum Foo {
501 Bar(Type![])
502}
503impl Foo {
504 fn new() {
505 Foo::Bar(0);
506 Foo::Bar(0, 1);
507 //^^^^^^^^^^^^^^ Expected 1 argument, found 2
508 Foo::Bar();
509 //^^^^^^^^^^ Expected 1 argument, found 0
510 }
511}
512 "#,
513 );
514 }
492} 515}