# A new error

**URL:** <https://internals.rust-lang.org/t/a-new-error/8800>\
**Category:** Uncategorized\
**Created:** [November 9, 2018, 5:32pm UTC](https://internals.rust-lang.org/t/a-new-error/8800 "2018-11-09T17:32:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![storyfeet](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/storyfeet/32/4461_2.png) [@storyfeet](https://internals.rust-lang.org/u/storyfeet)\
**Post date:** [November 9, 2018, 5:32pm UTC](https://internals.rust-lang.org/t/a-new-error/8800/1 "2018-11-09T17:32:04Z")

</div>

So I spent a very long time today trying to work out why a local crate was not importing properly.

The only message I got was `not found in {{root}}` but I knew it was in there.

It turned out to be a bin not a library. It could have spared me a lot of pain if there was a “crate is not a library” error.

I may not have been bright about this but I doubt I’ll be the only one it helps.

Thanks.

---

<div class="post-metadata">

**Author:** ![eminence](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/eminence/32/4018_2.png) [@eminence](https://internals.rust-lang.org/u/eminence)\
**Post date:** [November 9, 2018, 8:10pm UTC](https://internals.rust-lang.org/t/a-new-error/8800/2 "2018-11-09T20:10:09Z")

</div>

If you write up simple instructions on how to reproduce this, the Rust team would be grateful for an issue filed on github.

---

<div class="post-metadata">

**Author:** ![bjorn3](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/bjorn3/32/2736_2.png) [@bjorn3](https://internals.rust-lang.org/u/bjorn3)\
**Post date:** [November 10, 2018, 10:10am UTC](https://internals.rust-lang.org/t/a-new-error/8800/3 "2018-11-10T10:10:33Z")

</div>

@storyfeet Rustc doesn’t know about the existence of executables, because `cargo` doesn’t tell it about that. Doing so would give:

```rust
echo "extern crate abc;" | rustc --extern abc=$(where rustc) - bjorn@iMac
error[E0463]: can't find crate for `abc`
 --> <anon>:1:1
  |
1 | extern crate abc;
  | ^^^^^^^^^^^^^^^^^ can't find crate
  |
  = note: extern location for abc is of an unknown type: /Users/bjorn/.cargo/bin/rustc
  = help: file name should be lib*.rlib or lib*..dylib

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:31am UTC](https://internals.rust-lang.org/t/a-new-error/8800/4 "2019-03-25T08:31:07Z")

</div>

Closed on March 25, 2019, 8:31am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
