diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-07-18 12:59:42 +0200 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-07-18 12:59:55 +0200 |
| commit | bc061fa31983e1b36305051c3eaa1e893d223d9d (patch) | |
| tree | 888a1e3e723b764c006d7b5442fb49388c3bffcc /example | |
| parent | cff5eed8ef6205a33f93537ac224adcb3f31c0be (diff) | |
| download | rust-bc061fa31983e1b36305051c3eaa1e893d223d9d.tar.gz rust-bc061fa31983e1b36305051c3eaa1e893d223d9d.zip | |
Rustup to rustc 1.64.0-nightly (263edd43c 2022-07-17)
Diffstat (limited to 'example')
| -rw-r--r-- | example/mini_core.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs index 489259d1a6b..8b6042a3d66 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -458,7 +458,7 @@ pub trait FnMut<Args>: FnOnce<Args> { #[lang = "panic"] #[track_caller] -pub fn panic(_msg: &str) -> ! { +pub fn panic(_msg: &'static str) -> ! { unsafe { libc::puts("Panicking\n\0" as *const str as *const i8); intrinsics::abort(); @@ -497,7 +497,7 @@ pub trait Deref { #[repr(transparent)] #[rustc_layout_scalar_valid_range_start(1)] #[rustc_nonnull_optimization_guaranteed] -pub struct NonNull<T: ?Sized>(pub *mut T); +pub struct NonNull<T: ?Sized>(pub *const T); impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {} impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: Unsize<U> {} @@ -521,7 +521,7 @@ impl<T: ?Sized> Drop for Box<T> { } } -impl<T> Deref for Box<T> { +impl<T: ?Sized> Deref for Box<T> { type Target = T; fn deref(&self) -> &Self::Target { |
