dtolnay / dtolnay/reflect

Support freestanding functions in library macro

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

Description

The reflect::library! macro currently only accepts functions as trait functions or associated functions. We'll also need to work with free functions like str::from_utf8 that are not part of a trait or impl block.

```rust
reflect::library! {
extern crate std {
mod str {
fn from_utf8(&[u8]) -> Result<&str, Utf8Error>
}
}
}
```

```rust
let result = RUNTIME::std::str::from_utf8.INVOKE(bytes);
```

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.