2022-06-05 20:56:26 -05:00
|
|
|
error[E0369]: cannot add `{integer}` to `N`
|
2022-07-15 20:02:26 -05:00
|
|
|
--> $DIR/issue-97677.rs:4:7
|
2022-06-05 20:56:26 -05:00
|
|
|
|
|
|
|
|
LL | n + 10
|
|
|
|
| - ^ -- {integer}
|
|
|
|
| |
|
|
|
|
| N
|
|
|
|
|
|
|
|
|
help: consider restricting type parameter `N`
|
|
|
|
|
|
2022-09-04 17:38:12 -05:00
|
|
|
LL | fn add_ten<N: std::ops::Add<i32, Output = N>>(n: N) -> N {
|
|
|
|
| ++++++++++++++++++++++++++++++++
|
2022-06-05 20:56:26 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0369`.
|