aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-rw-r--r--crates/ra_hir_ty/src/tests/traits.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs
index 01c919a7e..766790576 100644
--- a/crates/ra_hir_ty/src/tests/traits.rs
+++ b/crates/ra_hir_ty/src/tests/traits.rs
@@ -3029,3 +3029,21 @@ fn infer_dyn_fn_output() {
3029 "### 3029 "###
3030 ); 3030 );
3031} 3031}
3032
3033#[test]
3034fn variable_kinds() {
3035 check_types(
3036 r#"
3037trait Trait<T> { fn get(self, t: T) -> T; }
3038struct S;
3039impl Trait<u128> for S {}
3040impl Trait<f32> for S {}
3041fn test() {
3042 S.get(1);
3043 //^^^^^^^^ u128
3044 S.get(1.);
3045 //^^^^^^^^ f32
3046}
3047 "#,
3048 );
3049}