diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 71617347e4c..56ccea19b8a 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -4800,7 +4800,7 @@ impl ParseIntError { reason = "it can be useful to match errors when making error messages \ for integer parsing", issue = "22639")] - pub fn kind(self) -> IntErrorKind { + pub fn kind(&self) -> &IntErrorKind { self.kind } #[unstable(feature = "int_error_internals",