Fixes #504: Implement Display/Fail for SetError and LookupError;

This commit is contained in:
Benjamin Bouvier
2018-10-02 15:05:16 +02:00
committed by Dan Gohman
parent 0b3d3ac880
commit 8b296e4874
2 changed files with 7 additions and 2 deletions

View File

@@ -120,12 +120,14 @@ pub fn lookup(triple: Triple) -> Result<Builder, LookupError> {
}
/// Describes reason for target lookup failure
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[derive(Fail, PartialEq, Eq, Copy, Clone, Debug)]
pub enum LookupError {
/// Support for this target was disabled in the current build.
#[fail(display = "Support for this target is disabled")]
SupportDisabled,
/// Support for this target has not yet been implemented.
#[fail(display = "Support for this target has not been implemented yet")]
Unsupported,
}