match String::from_utf8(buf) {
Ok(src) => {
+ // Add this input file to the code map to make it available as
+ // dependency information
+ self.cx.codemap().new_filemap_and_lines(&filename, &src);
+
let include_info = vec![
dummy_spanned(ast::NestedMetaItemKind::MetaItem(
attr::mk_name_value_item_str("file".into(),
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:
--- /dev/null
+# Hello, world!
// 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");