dtolnay / dtolnay/reflect

How to reference types in other crates inside `library!`?

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
780
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I'm trying to write a `library!` declaration along these lines:

```rust
reflect::library!{
extern crate anyhow {
type Result;
}

extern crate my_crate {
trait MyTrait {
fn trait_fn(&self) -> anyhow::Result;
}
}
}
```

But the macro doesn't seem to support the `anyhow::Result` path. Since the README mentions "There may be additional `extern crate` blocks here if we need to use types from outside the standard library", I'm wondering if I'm missing something or if this is not supported yet. Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.