File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -978,6 +978,20 @@ mod try_expressions {
978
978
}
979
979
}
980
980
981
+ mod builtins {
982
+ pub fn f ( ) {
983
+ let x: i32 = 1 ; // $ MISSING: type=x:i32
984
+ let y = 2 ; // $ MISSING: type=y:i32
985
+ let z = x + y; // $ MISSING: type=z:i32
986
+ let z = x. abs ( ) ; // $ MISSING: method=abs $ MISSING: type=z:i32
987
+ 'c' ;
988
+ "Hello" ;
989
+ 123.0f64 ;
990
+ true ;
991
+ false ;
992
+ }
993
+ }
994
+
981
995
fn main ( ) {
982
996
field_access:: f ( ) ;
983
997
method_impl:: f ( ) ;
@@ -995,4 +1009,5 @@ fn main() {
995
1009
implicit_self_borrow:: f ( ) ;
996
1010
borrowed_typed:: f ( ) ;
997
1011
try_expressions:: f ( ) ;
1012
+ builtins:: f ( ) ;
998
1013
}
Original file line number Diff line number Diff line change @@ -1094,7 +1094,7 @@ inferType
1094
1094
| main.rs:975:49:975:62 | ...::Ok(...) | E | main.rs:925:5:926:14 | S1 |
1095
1095
| main.rs:975:49:975:62 | ...::Ok(...) | T | main.rs:925:5:926:14 | S1 |
1096
1096
| main.rs:975:60:975:61 | S1 | | main.rs:925:5:926:14 | S1 |
1097
- | main.rs:983 :5:983 :20 | ...::f(...) | | main.rs:67:5:67:21 | Foo |
1098
- | main.rs:984 :5:984 :60 | ...::g(...) | | main.rs:67:5:67:21 | Foo |
1099
- | main.rs:984 :20:984 :38 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
1100
- | main.rs:984 :41:984 :59 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
1097
+ | main.rs:997 :5:997 :20 | ...::f(...) | | main.rs:67:5:67:21 | Foo |
1098
+ | main.rs:998 :5:998 :60 | ...::g(...) | | main.rs:67:5:67:21 | Foo |
1099
+ | main.rs:998 :20:998 :38 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
1100
+ | main.rs:998 :41:998 :59 | ...::Foo {...} | | main.rs:67:5:67:21 | Foo |
You can’t perform that action at this time.
0 commit comments