-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-inferenceArea: Type inferenceArea: Type inferenceC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
rustc 1.37.0 (eae3437 2019-08-13)
Repo: https://github.com/svenschmidt75/Rust
Commit: svenschmidt75/Rust@23ec342
When building, I get error message
Compiling ann v0.1.0 (/home/svenschmidt75/Develop/Rust/NeuralNetwork/lib/ann)
error[E0282]: type annotations needed
--> lib/ann/src/ann/cost_function.rs:25:9
|
25 | diff2.iter().sum() as f64 / 2.0
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `S`
|
= note: type must be known at this point
error: aborting due to previous error
For more information about this error, try `rustc --explain E0282`.
error: Could not compile `ann`.
warning: build failed, waiting for other jobs to finish...
error[E0282]: type annotations needed
--> lib/ann/src/ann/cost_function.rs:25:9
|
25 | diff2.iter().sum() as f64 / 2.0
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `S`
|
= note: type must be known at this point
error: aborting due to previous error
For more information about this error, try `rustc --explain E0282`.
error: Could not compile `ann`.
To learn more, run the command again with --verbose.
Process finished with exit code 101
Where does S come from?
Thanks,
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-inferenceArea: Type inferenceArea: Type inferenceC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.