Infer arg type from comparison to constants
The type inference system is currently able to detect that `a` in the following are a constant (and all members have the same type for the list case), but then it should infer that the arg `b` must also then be constrained to the same type to have a sensible implementation.  Then the compilers can reject bad uses of the functions.

After Rust Option/Result-like support is added, the function args types could use that in their signature to more closely emulate Python, but that seems like a long way off, and may not even be desirable.  IMO it is better to get simple functions like these for the most common uses of functions like this (80/20 rule).

```py
def infer_arg_str(b):
    a = 'a'
    return b == a

def infer_arg_list(b):
    a = ['a']
    return b in a
```

Currently that fails for all langs other than C++ and Dart.

For Rust in generates:

```rust
pub fn infer_arg_str<T0>(b: T0) -> bool {
    let a: &str = "a";
    return b == a;
}

pub fn infer_arg_list<T0>(b: T0) -> bool {
    let a: &Vec<&str> = &vec!["a"];
    return a.iter().any(|&x| x == b);
}
```
which fails with errors like
```rust
error[E0369]: binary operation `==` cannot be applied to type `T0`
  --> infer.rs:26:14
   |
26 |     return b == a;
   |            - ^^ - &str
   |            |
   |            T0
   |
help: consider restricting type parameter `T0`

error[E0277]: can't compare `&str` with `T0`
  --> infer.rs:34:32
   |
28 |     return a.iter().any(|&x| x == b);
   |                                ^^ no implementation for `&str == T0`
   |
   = help: the trait `PartialEq<T0>` is not implemented for `&str`
```