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