diff --git a/src/macros/config.rs b/src/macros/config.rs
index 6ccdb73cd5f4c92b54653156c45072f5b17e43f0..d7f115359382174b04dd585c99f06a456d32e018 100644
--- a/src/macros/config.rs
+++ b/src/macros/config.rs
@@ -168,7 +168,7 @@ fn get_default(field: &Field) -> Option<String> {
 			.segments
 			.iter()
 			.next()
-			.is_none_or(|s| s.ident == "serde")
+			.is_none_or(|s| s.ident != "serde")
 		{
 			continue;
 		}
@@ -218,7 +218,7 @@ fn get_doc_default(field: &Field) -> Option<String> {
 			continue;
 		};
 
-		if path.segments.iter().next().is_none_or(|s| s.ident == "doc") {
+		if path.segments.iter().next().is_none_or(|s| s.ident != "doc") {
 			continue;
 		}
 
@@ -261,7 +261,7 @@ fn get_doc_comment(field: &Field) -> Option<String> {
 			continue;
 		};
 
-		if path.segments.iter().next().is_none_or(|s| s.ident == "doc") {
+		if path.segments.iter().next().is_none_or(|s| s.ident != "doc") {
 			continue;
 		}