about summary refs log tree commit diff
path: root/src/libcore/panic.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-04-19 04:04:02 +0000
committerbors <bors@rust-lang.org>2019-04-19 04:04:02 +0000
commit316a391dcb7d66dc25f1f9a4ec9d368ef7615005 (patch)
tree8701a634c23f3bd64688468562f1f57458199d61 /src/libcore/panic.rs
parente928e9441157f63a776ba1f8773818838e0912ea (diff)
parent3ad9fcccbbfef027386c6f42fe6321c885b04817 (diff)
Auto merge of #60104 - Centril:rollup-7vmae1a, r=Centril
Rollup of 16 pull requests

Successful merges:

 - #59915 (Implement event filtering for self-profiler.)
 - #59933 (Make clear that format padding doesn't work for Debug)
 - #60023 (implement specialized nth_back() for Bytes, Fuse and Enumerate)
 - #60032 (Remove unwanted z-index change)
 - #60041 (Simplify the returning of a Result a bit)
 - #60045 (Suggest appropriate path when calling associated item on bare types)
 - #60052 (Correct unused parameter diagnostic)
 - #60056 (Update rustfmt to 1.2.1)
 - #60060 (whitelist RTM x86 target cpu feature)
 - #60061 (Change suggestion of field when not in self context)
 - #60064 (Point at try `?` on errors affecting the err match arm of the desugared code)
 - #60078 (Use more realistic example for thread builder)
 - #60080 (Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.)
 - #60082 (Update miri)
 - #60097 (Use -mergefunc-use-aliases for any LLVM >= 8)
 - #60098 (libcore: deny `elided_lifetimes_in_paths`)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libcore/panic.rs')
-rw-r--r--src/libcore/panic.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs
index bcb87bdd098..989fc96732a 100644
--- a/src/libcore/panic.rs
+++ b/src/libcore/panic.rs
@@ -86,7 +86,7 @@ impl<'a> PanicInfo<'a> {
     ///
     /// [`fmt::write`]: ../fmt/fn.write.html
     #[unstable(feature = "panic_info_message", issue = "44489")]
-    pub fn message(&self) -> Option<&fmt::Arguments> {
+    pub fn message(&self) -> Option<&fmt::Arguments<'_>> {
         self.message
     }
 
@@ -115,7 +115,7 @@ impl<'a> PanicInfo<'a> {
     /// panic!("Normal panic");
     /// ```
     #[stable(feature = "panic_hooks", since = "1.10.0")]
-    pub fn location(&self) -> Option<&Location> {
+    pub fn location(&self) -> Option<&Location<'_>> {
         // NOTE: If this is changed to sometimes return None,
         // deal with that case in std::panicking::default_hook and std::panicking::begin_panic_fmt.
         Some(&self.location)
@@ -124,7 +124,7 @@ impl<'a> PanicInfo<'a> {
 
 #[stable(feature = "panic_hook_display", since = "1.26.0")]
 impl fmt::Display for PanicInfo<'_> {
-    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+    fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
         formatter.write_str("panicked at ")?;
         if let Some(message) = self.message {
             write!(formatter, "'{}', ", message)?
@@ -249,7 +249,7 @@ impl<'a> Location<'a> {
 
 #[stable(feature = "panic_hook_display", since = "1.26.0")]
 impl fmt::Display for Location<'_> {
-    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+    fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(formatter, "{}:{}:{}", self.file, self.line, self.col)
     }
 }