fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
957 B25 linesraw
1include ../tools.mk
2
3# ignore-none no-std is not supported
4# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std'
5
6# Regression test for issue #83112
7# The generated test harness code contains spans with a dummy location,
8# but a non-dummy SyntaxContext. Previously, the incremental cache was encoding
9# these spans as a full span (with a source file index), instead of skipping
10# the encoding of the location information. If the file gest moved, the hash
11# of the span will be unchanged (since it has a dummy location), so the incr
12# cache would end up try to load a non-existent file using the previously
13# enccoded source file id.
14
15SRC=$(TMPDIR)/src
16INCR=$(TMPDIR)/incr
17
18all:
19	mkdir $(SRC)
20	mkdir $(SRC)/mydir
21	mkdir $(INCR)
22	cp main.rs $(SRC)/main.rs
23	$(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
24	mv $(SRC)/main.rs $(SRC)/mydir/main.rs
25	$(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs --target $(TARGET)