File tree 5 files changed +20
-25
lines changed
run-make-fulldeps/obtain-borrowck
5 files changed +20
-25
lines changed Original file line number Diff line number Diff line change
1
+ include ../tools.mk
2
+
3
+ # This example shows how to implement a rustc driver that retrieves MIR bodies
4
+ # together with the borrow checker information.
5
+
6
+ # How to run this
7
+ # $ ./x.py test src/test/run-make/obtain-borrowck
8
+
9
+ DRIVER_BINARY := "$(TMPDIR ) "/driver
10
+ SYSROOT := $(shell $(RUSTC ) --print sysroot)
11
+
12
+ all :
13
+ $(RUSTC ) driver.rs -o " $( DRIVER_BINARY) "
14
+ $(TARGET_RPATH_ENV ) " $( DRIVER_BINARY) " --sysroot $(SYSROOT ) test.rs -o " $( TMPDIR) /driver_test" > " $( TMPDIR) " /output.stdout
15
+
16
+ ifdef RUSTC_BLESS_TEST
17
+ cp "$(TMPDIR)"/output.stdout output.stdout
18
+ else
19
+ $(DIFF) output.stdout "$(TMPDIR)"/output.stdout
20
+ endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments