Ident == AsRef<str>
diff --git a/src/lib.rs b/src/lib.rs
index 3a059e6..7991723 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -521,6 +521,15 @@
     }
 }
 
+impl<T> PartialEq<T> for Ident
+where
+    T: ?Sized + AsRef<str>,
+{
+    fn eq(&self, other: &T) -> bool {
+        self.to_string() == other.as_ref()
+    }
+}
+
 impl Eq for Ident {}
 
 impl PartialOrd for Ident {