aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-09-17 20:22:40 +0100
committerAleksey Kladov <[email protected]>2019-09-18 02:34:48 +0100
commit7d15c81a3367bc538470b5f63d61498eef8efdc7 (patch)
tree742e3278b495b3a8827a7ac1628e66aa76948ff8 /crates/ra_hir/src/ty
parent54379ec6f8f82a470a275771e70825634d3d553b (diff)
account for impls generated by macros
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() {