mozilla/rust — Issue #1654: Syntax extension to load an entire file into [u8] at compile-time
Author: brson
Created: 2012-01-25 02:34:31+00:00
State: open
Labels: feature, front

For testing purposes I've frequently wanted to do something like:

```
// Run my test on some external data
let source = str::from_bytes(#readfile("test.rs"));
...
```

It would read a file relative to the directory of the current source file (not sure what it would do when building stdin - probably relative to cwd).

I think @nmatsakis mentioned that D can do something like this. Let's copy it.