diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 09c17fdf4..3b0a99460 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -2997,6 +2997,23 @@ fn foo() { | |||
2997 | ); | 2997 | ); |
2998 | } | 2998 | } |
2999 | 2999 | ||
3000 | #[test] | ||
3001 | fn processes_impls_generated_by_macros() { | ||
3002 | let t = type_at( | ||
3003 | r#" | ||
3004 | //- /main.rs | ||
3005 | macro_rules! m { | ||
3006 | ($ident:ident) => (impl Trait for $ident {}) | ||
3007 | } | ||
3008 | trait Trait { fn foo(self) -> u128 {} } | ||
3009 | struct S; | ||
3010 | m!(S); | ||
3011 | fn test() { S.foo()<|>; } | ||
3012 | "#, | ||
3013 | ); | ||
3014 | assert_eq!(t, "u128"); | ||
3015 | } | ||
3016 | |||
3000 | #[ignore] | 3017 | #[ignore] |
3001 | #[test] | 3018 | #[test] |
3002 | fn method_resolution_trait_before_autoref() { | 3019 | fn method_resolution_trait_before_autoref() { |