opened
farodin91
username_0
Prevent examples as project name
issue
created
matklad
username_1
Why do we need this? Does Cargo fail if one names one's project "examples"?
comment
created
farodin91
username_0
Cargo fails with a base folder name "examples".
comment
created
matklad
username_1
Hm, seems to work fine here:

```
~/trash master*
λ cargo new examples
     Created library `examples` project

~/trash master*
λ cd examples/cargo

~/trash/examples master*
λ ls
src  Cargo.toml

~/trash/examples master*
λ cargo test --all
   Compiling examples v0.1.0 (file:///home/user/trash/examples)
    Finished dev [unoptimized + debuginfo] target(s) in 0.78 secs
     Running target/debug/deps/examples-ab5a25f76fbb9f9e

running 1 test
test tests::it_works ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests examples

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
```

Perhaps this a bug in Cargo specific to your invornment, or a bug in IntelliJ-Rust? Does creating `examples` project from the command line work for you?
comment
created
farodin91
username_0
Interesting
comment
created
farodin91
username_0
I created the project with intellij-rust.
comment
created
matklad
username_1
Ok, I would say that it is a bug in Cargo: https://github.com/rust-lang/cargo/issues/3990.

We shouldn't duplicate this logic in IntelliJ Rust. Instead, we can show the error generated by Cargo when that issue is fixed.
comment
closed
matklad
username_1
issue
created
matklad
username_1
PR to fix cargo: https://github.com/rust-lang/cargo/pull/3994
comment