Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/tamer
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2020-04-01 15:56:33 -0400
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-04-01 15:56:33 -0400
commita4657580caf17e0fadfffb7d219f35158a8a7a78 (patch)
treedac7547d53f2d3df306104403326ca459327f4d4 /tamer
parenteab47783ab7aee9a8a1ab71effe5ea2543a79922 (diff)
downloadtame-a4657580caf17e0fadfffb7d219f35158a8a7a78.tar.gz
tame-a4657580caf17e0fadfffb7d219f35158a8a7a78.tar.bz2
tame-a4657580caf17e0fadfffb7d219f35158a8a7a78.zip
[DEV-7086] TAMER: TransitionError::Incompatible: Remove unused
Diffstat (limited to 'tamer')
-rw-r--r--tamer/src/ir/asg/base.rs12
-rw-r--r--tamer/src/ir/asg/object.rs11
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,