diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-02 16:35:50 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-02 22:11:46 -0700 |
| commit | 6217ce958e4b1007ca9e49751dba1aa1b68fbe67 (patch) | |
| tree | 50946dc61777d9898b40c9c82e2babe2bc7d1e45 /src | |
| parent | b16457627c79b0b4aa2034251f8ba1223df1b4b8 (diff) | |
Print the type of istrs as 'str' in error messages. Issue #855
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp/util/ppaux.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/binop-bitxor-str.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/fail-type-err.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/minus-string.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs index 8846d5c5380..ede973149c5 100644 --- a/src/comp/util/ppaux.rs +++ b/src/comp/util/ppaux.rs @@ -107,7 +107,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str { ty_uint. { "uint" } ty_machine(tm) { ty_mach_to_str(tm) } ty_char. { "char" } - ty_istr. { "istr" } + ty_istr. { "str" } ty_box(tm) { "@" + mt_to_str(cx, tm) } ty_uniq(t) { "~" + ty_to_str(cx, t) } ty_vec(tm) { "[" + mt_to_str(cx, tm) + "]" } diff --git a/src/test/compile-fail/binop-bitxor-str.rs b/src/test/compile-fail/binop-bitxor-str.rs index cfb0ac6ed3a..65e0996fa62 100644 --- a/src/test/compile-fail/binop-bitxor-str.rs +++ b/src/test/compile-fail/binop-bitxor-str.rs @@ -1,3 +1,3 @@ -// error-pattern:^ cannot be applied to type `istr` +// error-pattern:^ cannot be applied to type `str` fn main() { let x = "a" ^ "b"; } diff --git a/src/test/compile-fail/fail-type-err.rs b/src/test/compile-fail/fail-type-err.rs index 8d1f36fc25f..8ea86d80a7b 100644 --- a/src/test/compile-fail/fail-type-err.rs +++ b/src/test/compile-fail/fail-type-err.rs @@ -1,2 +1,2 @@ -// error-pattern:expected istr but found [int] +// error-pattern:expected str but found [int] fn main() { fail [0]; } diff --git a/src/test/compile-fail/minus-string.rs b/src/test/compile-fail/minus-string.rs index 8141c510b47..e30a2dbe7df 100644 --- a/src/test/compile-fail/minus-string.rs +++ b/src/test/compile-fail/minus-string.rs @@ -1,3 +1,3 @@ -// error-pattern:applying unary minus to non-numeric type istr +// error-pattern:applying unary minus to non-numeric type str fn main() { -"foo"; } |
