about summary refs log tree commit diff
path: root/src/libstd/panic.rs
AgeCommit message (Collapse)AuthorLines
2019-04-23Stabilize futures_apiTaylor Cramer-1/+1
2019-04-05Future-proof the Futures APITaylor Cramer-3/+3
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-1/+1
2019-02-28libstd => 2018Taiki Endo-14/+14
2019-02-20Rollup merge of #58553 - scottmcm:more-ihle, r=Centrilkennytm-3/+3
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-17Use more impl header lifetime elisionScott McMurray-3/+3
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-03Update the future/task APIMatthias Einwag-3/+3
This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592. Changes: - Replacing UnsafeWake with RawWaker and RawWakerVtable - Removal of LocalWaker - Removal of Arc-based Wake trait
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-12Bump to 1.33.0Alex Crichton-2/+2
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-05Do not Atomic{I,U}128 in stage0Simonas Kazlauskas-2/+2
2018-10-27Correct alignment of atomic types and (re)add Atomic{I,U}128Oliver Middleton-0/+6
LLVM requires that atomic loads and stores be aligned to at least the size of the type.
2018-10-08it's auto traits that make for automatic implementationsRalf Jung-1/+1
2018-09-19Remove spawning from task::ContextTaylor Cramer-3/+3
2018-09-01Update to a new pinning API.Without Boats-4/+4
2018-08-23move PinMut into pin module and export through stdNiv Kaminer-1/+1
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-1/+1
2018-06-23`PinMut`: Add safe `get_mut` and rename unsafe fns to `get_mut_unchecked` ↵Josef Reinhard Brandl-8/+3
and `map_unchecked`
2018-06-19Add message to `rustc_on_unimplemented` attributes in coreEsteban Küber-5/+10
2018-06-09add inherent methods to Polltinaun-1/+1
2018-06-08addressed nitstinaun-3/+3
2018-06-08add a few blanket future impls to stdtinaun-0/+18
2018-04-29Add more links in panic docsPazzaz-18/+33
2018-04-05typosmemoryleak47-1/+1
2018-02-18Auto merge of #47687 - SimonSapin:panic-impl, r=sfacklerbors-1/+4
RFC 2070 part 1: PanicInfo and Location API changes This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html Tracking issue: https://github.com/rust-lang/rust/issues/44489 * Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`. * Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`. * Implement `Display` for `PanicInfo` and `Location`
2018-01-23Move PanicInfo and Location to libcoreSimon Sapin-1/+4
Per https://rust-lang.github.io/rfcs/2070-panic-implementation.html
2018-01-21NonNull ended up landing in 1.25Simon Sapin-1/+1
2018-01-20Stabilize std::ptr::NonNullSimon Sapin-1/+1
2018-01-20Mark Unique as perma-unstable, with the feature renamed to ptr_internals.Simon Sapin-1/+1
2018-01-20Rename std::ptr::Shared to NonNullSimon Sapin-3/+3
`Shared` is now a deprecated `type` alias. CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2018-01-13Adjust tests for removal of `impl Foo for .. {}`leonardo.yvens-2/+2
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-9/+2
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2017-11-20Fix some docs summary nitsMarco A L Barbosa-1/+1
2017-11-03auto trait future compatibility lintleonardo.yvens-0/+4
2017-08-12Fix some typosBastien Orivel-1/+1
2017-08-11Fix some typosBastien Orivel-1/+1
2017-06-07Changing error message for interior mutability, adding ui testgaurikholkar-1/+1
2017-02-21std: Relax UnwindSafe impl for UniqueAlex Crichton-1/+1
Add the `?Sized` bound as we don't require the type to be sized. Closes #40011
2017-01-29Fix a few impl stability attributesOliver Middleton-1/+1
The versions show up in rustdoc.
2016-12-18Implement `fmt::Debug` for all structures in libstd.Corey Farwell-0/+10
Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
2016-10-16Implement `RefUnwindSafe` for atomic typesAndrew Paseltiner-1/+41
Closes #37136
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-2/+2
These are displayed by rustdoc so should be correct.
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-1/+0
2016-08-10Added a shim around rust_panic to update panic counterNikhil Shagrithaya-1/+1
2016-07-11Set unwind_safe_lock_refs stability to 1.12.0.Aaron Gallagher-3/+2
This is the first (and presumably only) use of this feature.
2016-07-10Mutex and RwLock need RefUnwindSafe too.Aaron Gallagher-0/+6
2016-05-30std: Clean out old unstable + deprecated APIsAlex Crichton-95/+1
These should all have been deprecated for at least one cycle, so this commit cleans them all out.
2016-05-28Rollup merge of #33831 - diwic:patch-1, r=aturonManish Goregaokar-35/+35
panic.rs: fix docs (recover -> catch_unwind) The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).
2016-05-25Auto merge of #33699 - alexcrichton:stabilize-1.10, r=aturonbors-1/+1
std: Stabilize APIs for the 1.10 release This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018
2016-05-24std: Stabilize APIs for the 1.10 releaseAlex Crichton-1/+1
This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 cc #27784 (but encode methods still exist) Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018