diff --git a/clippy_lints/src/methods/map_unwrap_or.rs b/clippy_lints/src/methods/map_unwrap_or.rs index 7a19ac42e5ed..c90fba815e71 100644 --- a/clippy_lints/src/methods/map_unwrap_or.rs +++ b/clippy_lints/src/methods/map_unwrap_or.rs @@ -61,6 +61,7 @@ pub(super) fn lint<'a, 'tcx>( arg, suggest ) } else { + debug_assert!(is_result); "called `map(f).unwrap_or(a)` on a Result value. \ This can be done more directly by calling `map_or(a, f)` instead" .to_string()