From 8aa5762d2eed9e64bfe01f31069a3cbb90b1d5f4 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Wed, 20 Jun 2012 16:14:53 -0700 Subject: [PATCH] Repair the formatting of the table in is_binopable. --- src/rustc/middle/ty.rs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs index 890295490e95..e3cd479a124b 100644 --- a/src/rustc/middle/ty.rs +++ b/src/rustc/middle/ty.rs @@ -3002,21 +3002,18 @@ fn is_binopable(_cx: ctxt, ty: t, op: ast::binop) -> bool { const t: bool = true; const f: bool = false; + let tbl = [ /*. add, shift, bit . sub, rel, logic . mult, eq, */ - /*other*/ - /*bool*/ - /*int*/ - /*float*/ - /*str*/ - /*vec*/ - /*bot*/ - let tbl = - [[f, f, f, f, t, t, f, f], [f, f, f, f, t, t, t, t], - [t, t, t, t, t, t, t, f], [t, t, t, f, t, t, f, f], - [t, f, f, f, t, t, f, f], [t, f, f, f, t, t, f, f], - [f, f, f, f, t, t, f, f], [t, t, t, t, t, t, t, t]]; /*struct*/ + /*other*/ [f, f, f, f, t, t, f, f], + /*bool*/ [f, f, f, f, t, t, t, t], + /*int*/ [t, t, t, t, t, t, t, f], + /*float*/ [t, t, t, f, t, t, f, f], + /*str*/ [t, f, f, f, t, t, f, f], + /*vec*/ [t, f, f, f, t, t, f, f], + /*bot*/ [f, f, f, f, t, t, f, f], + /*struct*/ [t, t, t, t, t, t, t, t]]; ret tbl[tycat(ty)][opcat(op)]; }