diff options
author | Mike Gerwitz <mike.gerwitz@ryansg.com> | 2020-04-01 15:56:33 -0400 |
---|---|---|
committer | Mike Gerwitz <mike.gerwitz@ryansg.com> | 2020-04-01 15:56:33 -0400 |
commit | a4657580caf17e0fadfffb7d219f35158a8a7a78 (patch) | |
tree | dac7547d53f2d3df306104403326ca459327f4d4 /tamer/src | |
parent | eab47783ab7aee9a8a1ab71effe5ea2543a79922 (diff) | |
download | tame-a4657580caf17e0fadfffb7d219f35158a8a7a78.tar.gz tame-a4657580caf17e0fadfffb7d219f35158a8a7a78.tar.bz2 tame-a4657580caf17e0fadfffb7d219f35158a8a7a78.zip |
[DEV-7086] TAMER: TransitionError::Incompatible: Remove unused
Diffstat (limited to 'tamer/src')
-rw-r--r-- | tamer/src/ir/asg/base.rs | 12 | ||||
-rw-r--r-- | tamer/src/ir/asg/object.rs | 11 |
2 files changed, 10 insertions, 13 deletions
diff --git a/tamer/src/ir/asg/base.rs b/tamer/src/ir/asg/base.rs index 98155a8..16e66d9 100644 --- a/tamer/src/ir/asg/base.rs +++ b/tamer/src/ir/asg/base.rs @@ -621,7 +621,11 @@ mod test { // Set up an object to fail redeclaration. let node = sut.declare(&sym, IdentKind::Meta, src.clone())?; let obj = sut.get(node).unwrap(); - let terr = TransitionError::Incompatible(String::from("test fail")); + let terr = TransitionError::ExternResolution { + name: String::from("test fail"), + expected: IdentKind::Meta, + given: IdentKind::Meta, + }; obj.fail_redeclare.replace(Some(terr.clone())); // Should invoke StubIdentObject::redeclare on the above `obj`. @@ -682,7 +686,11 @@ mod test { // It doesn't matter that this isn't the error that'll actually be // returned, as long as it's some sort of TransitionError. - let terr = TransitionError::Incompatible(String::from("test fail")); + let terr = TransitionError::ExternResolution { + name: String::from("test fail"), + expected: IdentKind::Meta, + given: IdentKind::Meta, + }; obj.fail_extern.replace(Some(terr.clone())); // Should invoke StubIdentObject::extern_ on the above `obj`. diff --git a/tamer/src/ir/asg/object.rs b/tamer/src/ir/asg/object.rs index 0bf75e9..fd9fb55 100644 --- a/tamer/src/ir/asg/object.rs +++ b/tamer/src/ir/asg/object.rs @@ -390,13 +390,6 @@ impl<'i> IdentObjectState<'i, IdentObject<'i>> for IdentObject<'i> { /// TODO: Provide enough information to construct a useful message. #[derive(Clone, Debug, PartialEq)] pub enum TransitionError { - /// An attempt to redeclare an identifier with additional information - /// has failed because the provided information was not compatible - /// with the original declaration. - /// - /// See [`IdentObjectState::resolve`]. - Incompatible(String), - /// Extern resolution failure. /// /// An extern could not be resolved because the provided identifier had @@ -417,10 +410,6 @@ pub enum TransitionError { impl std::fmt::Display for TransitionError { fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { match self { - Self::Incompatible(msg) => { - write!(fmt, "object incompatible: {}", msg) - } - Self::ExternResolution { name, expected, |