Rename subtest's Result to SubtestResult.

This avoids naming confusion with the standard `Result`, which is
included in the prelude.
This commit is contained in:
Dan Gohman
2018-06-04 16:32:55 -07:00
parent 1087ff3a01
commit 4e64fc11c9
16 changed files with 45 additions and 47 deletions

View File

@@ -7,11 +7,11 @@ use cretonne_codegen::ir::Function;
use cretonne_codegen::print_errors::pretty_error;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use subtest::{run_filecheck, Context, Result, SubTest};
use subtest::{run_filecheck, Context, SubTest, SubtestResult};
struct TestPostopt;
pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
pub fn subtest(parsed: &TestCommand) -> SubtestResult<Box<SubTest>> {
assert_eq!(parsed.command, "postopt");
if !parsed.options.is_empty() {
Err(format!("No options allowed on {}", parsed))
@@ -29,7 +29,7 @@ impl SubTest for TestPostopt {
true
}
fn run(&self, func: Cow<Function>, context: &Context) -> Result<()> {
fn run(&self, func: Cow<Function>, context: &Context) -> SubtestResult<()> {
let mut comp_ctx = cretonne_codegen::Context::for_function(func.into_owned());
let isa = context.isa.expect("postopt needs an ISA");