2 个 估计版本的可能
这个会子表达式 自动转换点
3.ruobofish语法
一直安慰为啥不学其他语言
为啥在调用操作符前加::
直接mytest《i32》()
也好理解
- 来自 水木社区APP v3.5.7
【 在 hellowub 的大作中提到: 】
: 早上回复了下,但说要等审核。。。。。换个论坛吧
:
: ---
:
: 2. 我这里编译是不通过的:
:
: error[E0308]: mismatched types
: --> src/main.rs:2:16
: |
: 2 | let _a:i32 =(1.0+8.9);
: | --- ^^^^^^^^^ expected `i32`, found floating-point number
: | |
: | expected due to this
:
: For more information about this error, try `rustc --explain E0308`.
:
:
: 3. 我之前没有学过其他支持泛型的语言,没有先入为主,所以还是觉得很好理解的。
:
: 这个turbofish并不是强制的,大部分时候不需要这么写,有时候才需要。
:
: 这里`i32` 就是myfn里的泛型T。
:
: 4. 我理解 const fn 并不是说
--
FROM 223.104.41.*