We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e80402 commit 0186284Copy full SHA for 0186284
tests/run-make/short-ice/Makefile
@@ -0,0 +1,9 @@
1
+include ../../run-make-fulldeps/tools.mk
2
+
3
+# ignore-windows
4
5
+export RUSTC := $(RUSTC_ORIGINAL)
6
+export TMPDIR := $(TMPDIR)
7
8
+all:
9
+ bash check.sh
tests/run-make/short-ice/check.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+RUST_BACKTRACE=1 $RUSTC src/lib.rs -Z treat-err-as-bug=1 1>$TMPDIR/rust-test-1.log 2>&1
+RUST_BACKTRACE=full $RUSTC src/lib.rs -Z treat-err-as-bug=1 1>$TMPDIR/rust-test-2.log 2>&1
+short=$(cat $TMPDIR/rust-test-1.log | wc -l)
+full=$(cat $TMPDIR/rust-test-2.log | wc -l)
+echo "short backtrace: $short"
+echo "full backtrace: $full"
10
11
+if [ $full -gt $short ]; then
12
+ exit 0
13
+else
14
+ exit 1
15
+fi
tests/run-make/short-ice/src/lib.rs
@@ -0,0 +1,5 @@
+extern crate error_lib;
+fn main() {
+ println!("Hello, world!");
+}
0 commit comments