Upgrade to rustfmt 0.8.0.

Lots of changes this time.

Worked around what looks like a rustfmt bug in parse_inst_operands where
a large match was nested inside Ok().
This commit is contained in:
Jakob Stoklund Olesen
2017-03-14 10:48:05 -07:00
parent 849f3f3e9b
commit 32709a56ca
37 changed files with 462 additions and 377 deletions

View File

@@ -66,7 +66,10 @@ pub trait SubTest {
/// match 'inst10'.
impl<'a> filecheck::VariableMap for Context<'a> {
fn lookup(&self, varname: &str) -> Option<FCValue> {
self.details.map.lookup_str(varname).map(|e| FCValue::Regex(format!(r"\b{}\b", e).into()))
self.details
.map
.lookup_str(varname)
.map(|e| FCValue::Regex(format!(r"\b{}\b", e).into()))
}
}
@@ -77,8 +80,7 @@ pub fn run_filecheck(text: &str, context: &Context) -> Result<()> {
Ok(())
} else {
// Filecheck mismatch. Emit an explanation as output.
let (_, explain) = checker.explain(&text, context)
.map_err(|e| format!("explain: {}", e))?;
let (_, explain) = checker.explain(&text, context).map_err(|e| format!("explain: {}", e))?;
Err(format!("filecheck failed:\n{}{}", checker, explain))
}
}