mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Print the type of istrs as 'str' in error messages. Issue #855
This commit is contained in:
@@ -107,7 +107,7 @@ fn mt_to_str(cx: &ctxt, m: &mt) -> 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) + "]" }
|
||||
|
||||
@@ -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"; }
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// error-pattern:expected istr but found [int]
|
||||
// error-pattern:expected str but found [int]
|
||||
fn main() { fail [0]; }
|
||||
|
||||
@@ -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"; }
|
||||
|
||||
Reference in New Issue
Block a user