1
Fork 0

add a simple test that running with hir-tree doesn't go bonkers

Akin to the existing expanded test.
This commit is contained in:
Niko Matsakis 2017-11-19 17:55:10 -05:00
parent 1058c89c69
commit 61f31fd559
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,9 @@
-include ../tools.mk
# Test that hir-tree output doens't crash and includes
# the string constant we would expect to see.
all:
$(RUSTC) -o $(TMPDIR)/input.hir -Z unstable-options \
--unpretty=hir-tree input.rs
grep '"Hello, Rustaceans!\\n"' $(TMPDIR)/input.hir

View file

@ -0,0 +1,13 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
println!("Hello, Rustaceans!");
}