about summary refs log tree commit diff
path: root/src/test/run-make/unicode-input/Makefile
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-02-23 16:40:04 +1100
committerAlex Crichton <alex@alexcrichton.com>2014-02-24 21:22:26 -0800
commitff79a4471cbf5fa4e78fcf56be129a3d56690127 (patch)
tree6835775de94115c4f499981198c8b618330dd2fd /src/test/run-make/unicode-input/Makefile
parentdad52cfcb58cb30170c6247f2053bc0f0d57466a (diff)
downloadrust-ff79a4471cbf5fa4e78fcf56be129a3d56690127.tar.gz
rust-ff79a4471cbf5fa4e78fcf56be129a3d56690127.zip
syntax: record multibyte chars' positions absolutely, not relative to
file.

Previously multibyte UTF-8 chars were being recorded as byte offsets
from the start of the file, and then later compared against global byte
positions, resulting in the compiler possibly thinking it had a byte
position pointing inside a multibyte character, if there were multibyte
characters in any non-crate files. (Although, sometimes the byte offsets
line up just right to not ICE, but that was a coincidence.)

Fixes #11136.
Fixes #11178.
Diffstat (limited to 'src/test/run-make/unicode-input/Makefile')
-rw-r--r--src/test/run-make/unicode-input/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/run-make/unicode-input/Makefile b/src/test/run-make/unicode-input/Makefile
new file mode 100644
index 00000000000..1e420bddb77
--- /dev/null
+++ b/src/test/run-make/unicode-input/Makefile
@@ -0,0 +1,6 @@
+-include ../tools.mk
+
+all:
+	# check that we don't ICE on unicode input, issue #11178
+	$(RUSTC) multiple_files.rs
+	$(call RUN,multiple_files)  "$(RUSTC)" "$(TMPDIR)"