V
V
Vladimir T2017-10-05 02:17:32
Rust
Vladimir T, 2017-10-05 02:17:32

Rust issues warning, what does it need?

When compiling, Rust issues this warning:

warning: path `/home/user/example/src/main.rs` was erroneously implicitly accepted for binary `main`,
please set bin.path in Cargo.toml

The following is written in Cargo.toml:
[package]
name = "example"
version = "0.1.0"
authors = ["myName"]


name = "main"

[dependencies]
...

What else does he need?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Orlov, 2017-10-05
@32bit_me

See the last answer at https://github.com/rust-lang/cargo/issues/4293
Apparently, you need to add a path like:

name = "main"
path = "src/main.rs"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question