diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-07-10 20:39:28 +0200 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-07-25 10:21:41 +0900 |
| commit | 8646a1714306473011e79e1c1a213928bfa6025f (patch) | |
| tree | 2c8c4d403782936f31140895a36a9da6126e433c /src/libcore/panic.rs | |
| parent | 46804ef0cee4b55ed9922719da243b6edd9101b2 (diff) | |
| download | rust-8646a1714306473011e79e1c1a213928bfa6025f.tar.gz rust-8646a1714306473011e79e1c1a213928bfa6025f.zip | |
Enforce #![deny(bare_trait_objects)] in src/libcore
Diffstat (limited to 'src/libcore/panic.rs')
| -rw-r--r-- | src/libcore/panic.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs index 10f02ca2fdc..17cac5aa0a0 100644 --- a/src/libcore/panic.rs +++ b/src/libcore/panic.rs @@ -43,7 +43,7 @@ use fmt; #[stable(feature = "panic_hooks", since = "1.10.0")] #[derive(Debug)] pub struct PanicInfo<'a> { - payload: &'a (Any + Send), + payload: &'a (dyn Any + Send), message: Option<&'a fmt::Arguments<'a>>, location: Location<'a>, } @@ -64,7 +64,7 @@ impl<'a> PanicInfo<'a> { #[doc(hidden)] #[inline] - pub fn set_payload(&mut self, info: &'a (Any + Send)) { + pub fn set_payload(&mut self, info: &'a (dyn Any + Send)) { self.payload = info; } @@ -86,7 +86,7 @@ impl<'a> PanicInfo<'a> { /// panic!("Normal panic"); /// ``` #[stable(feature = "panic_hooks", since = "1.10.0")] - pub fn payload(&self) -> &(Any + Send) { + pub fn payload(&self) -> &(dyn Any + Send) { self.payload } @@ -270,6 +270,6 @@ impl<'a> fmt::Display for Location<'a> { #[unstable(feature = "std_internals", issue = "0")] #[doc(hidden)] pub unsafe trait BoxMeUp { - fn box_me_up(&mut self) -> *mut (Any + Send); - fn get(&mut self) -> &(Any + Send); + fn box_me_up(&mut self) -> *mut (dyn Any + Send); + fn get(&mut self) -> &(dyn Any + Send); } |
