Rename verifier's Result and Error.

This provides consistency with similar types in other parts of
Cretonne, and avoids shadowing `Result` from the standard prelude.
This commit is contained in:
Dan Gohman
2018-06-07 14:57:52 -07:00
parent 683880bd02
commit 13f22065a2
8 changed files with 82 additions and 76 deletions

View File

@@ -1,6 +1,6 @@
//! Result and error types representing the outcome of compiling a function.
use verifier;
use verifier::VerifierError;
/// A compilation error.
///
@@ -12,7 +12,7 @@ pub enum CtonError {
/// This always represents a bug, either in the code that generated IR for Cretonne, or a bug
/// in Cretonne itself.
#[fail(display = "Verifier error: {}", _0)]
Verifier(#[cause] verifier::Error),
Verifier(#[cause] VerifierError),
/// An implementation limit was exceeded.
///
@@ -34,8 +34,8 @@ pub enum CtonError {
/// A Cretonne compilation result.
pub type CtonResult = Result<(), CtonError>;
impl From<verifier::Error> for CtonError {
fn from(e: verifier::Error) -> Self {
impl From<VerifierError> for CtonError {
fn from(e: VerifierError) -> Self {
CtonError::Verifier(e)
}
}