Created
July 26, 2014 15:19
-
-
Save killerswan/337f9f84a2e788a3c2a5 to your computer and use it in GitHub Desktop.
Why should an uppercase variable (defined by macro expansion) cause an out-of-bounds ICE? Although this was on rustc 0.11.0-pre (b47f2226a25654c5b781d27a91f2fa5274b3a347 2014-06-28 14:31:37 +0000), rather than current master rustc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ovid $ git ll -1 --oneline | |
* 220b83a (HEAD, master) now naming the column [singular] | |
ovid $ | |
ovid $ git diff | |
diff --git a/CSVSample.rs b/CSVSample.rs | |
index 9e57175..4e279c4 100644 | |
--- a/CSVSample.rs | |
+++ b/CSVSample.rs | |
@@ -3,7 +3,6 @@ | |
#![allow(unused_imports)] | |
#![allow(unused_variable)] | |
-#![allow(uppercase_variables)] | |
#![feature(phase)] | |
ovid $ | |
ovid $ ./build.sh | |
provide_csv_given_labels: name: MyCSV | |
provide_csv_given_labels: path: ./sample1.txt | |
provide_csv_given_labels: labels: Verse | |
Defining items in the CSV provider... | |
OK | |
<quote expansion>:1:1: 44:60 warning: structure field names should start with a lowercase character, #[warn(uppercase_variables)] on by default | |
<quote expansion>:1 Verse | |
error: internal compiler error: unexpected failure | |
note: the compiler hit an unexpected failure path. this is a bug. | |
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html | |
note: run with `RUST_BACKTRACE=1` for a backtrace | |
task 'rustc' failed at 'index out of bounds: the len is 1 but the index is 1', /Users/kevin/code/rust/src/libsyntax/lib.rs:1 | |
ovid $ | |
ovid $ cat build.sh | |
#!/bin/sh | |
rustc CSVProvider.rs \ | |
&& rustc --test -L . CSVSample.rs \ | |
&& ./CSVSample | |
#&& RUST_BACKTRACE=1 rustc --test -L . CSVSample.rs \ | |
#&& rustc --test -L . --pretty expanded CSVSample.rs | |
ovid $ | |
ovid $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment