aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/tests.rs17
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]
3001fn processes_impls_generated_by_macros() {
3002 let t = type_at(
3003 r#"
3004//- /main.rs
3005macro_rules! m {
3006 ($ident:ident) => (impl Trait for $ident {})
3007}
3008trait Trait { fn foo(self) -> u128 {} }
3009struct S;
3010m!(S);
3011fn test() { S.foo()<|>; }
3012"#,
3013 );
3014 assert_eq!(t, "u128");
3015}
3016
3000#[ignore] 3017#[ignore]
3001#[test] 3018#[test]
3002fn method_resolution_trait_before_autoref() { 3019fn method_resolution_trait_before_autoref() {