Create three files:
Cargo.toml:
[package]
name = "test"
version = "0.0.0"
[lib]
name = "lib"
path = "src/lib.rs"
src/lib.rs can be empty
src/main.rs:
Compiling the project gives:
[ben@windoze8isbest8 testbed]$ cargo build
Compiling test v0.0.0 (file:///home/ben/testbed)
src/main.rs:1:1: 1:12 error: expected item, found `arglebargle`
src/main.rs:1 arglebargle
^~~~~~~~~~~
Could not compile `test`.
Removing main.rs or moving the files out of the src directory causes it to build fine.
Create three files:
Cargo.toml:
src/lib.rs can be empty
src/main.rs:
Compiling the project gives:
Removing
main.rsor moving the files out of thesrcdirectory causes it to build fine.