add files loaded through doc(include) into dep-info

This commit is contained in:
QuietMisdreavus 2017-12-19 16:43:32 -06:00
parent 8fc0d47581
commit 95b87d18c0
4 changed files with 11 additions and 1 deletions

View file

@ -8,7 +8,7 @@ ifneq ($(shell uname),FreeBSD)
ifndef IS_WINDOWS
all:
$(RUSTC) --emit dep-info main.rs
$(CGREP) "input.txt" "input.bin" < $(TMPDIR)/main.d
$(CGREP) "input.txt" "input.bin" "input.md" < $(TMPDIR)/main.d
else
all:

View file

@ -0,0 +1 @@
# Hello, world!

View file

@ -8,6 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(external_doc)]
#[doc(include="input.md")]
pub struct SomeStruct;
pub fn main() {
const INPUT_TXT: &'static str = include_str!("input.txt");
const INPUT_BIN: &'static [u8] = include_bytes!("input.bin");