Commit Graph

78 Commits

Author SHA1 Message Date
Mark Rousskov
997feacddd Snap cfgs 2019-11-12 16:36:57 -05:00
Amanieu d'Antras
3de7698e12 Fix typo from #65214 2019-10-21 13:30:43 +01:00
Amanieu d'Antras
dfe76a1093 Split non-CAS atomic support off into target_has_atomic_load_store 2019-10-08 20:34:30 +01:00
Simon Sapin
7454b29efc HashMap is UnwindSafe
Fixes https://github.com/rust-lang/rust/issues/62301, a regression in 1.36.0 which was caused by hashbrown using `NonZero<T>` where the older hashmap used `Unique<T>`.
2019-07-02 16:01:06 +02:00
Taylor Cramer
3f966dcd53 Stabilize futures_api 2019-04-23 16:13:53 -07:00
Taylor Cramer
1691e06db6 Future-proof the Futures API 2019-04-05 15:03:33 -07:00
Mazdak Farrokhzad
379c380a60 libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00
Taiki Endo
93b6d9e086 libstd => 2018 2019-02-28 04:06:15 +09:00
kennytm
e3a8f7db47
Rollup merge of #58553 - scottmcm:more-ihle, r=Centril
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-20 11:59:10 +08:00
Scott McMurray
3bea2ca49d Use more impl header lifetime elision
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-17 19:42:36 -08:00
Matthias Einwag
d9a4b22d32 Update the future/task API
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
2019-02-03 13:46:53 -08:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Alex Crichton
cf47a19305 Bump to 1.33.0
* 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-12 08:09:26 -08:00
Alexander Regueiro
ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
Simonas Kazlauskas
99f7dc451f Do not Atomic{I,U}128 in stage0 2018-11-05 18:54:17 +02:00
Oliver Middleton
01674fbe06 Correct alignment of atomic types and (re)add Atomic{I,U}128
LLVM requires that atomic loads and stores be aligned to at least the size of the type.
2018-10-27 13:47:11 +03:00
Ralf Jung
54a3583da7 it's auto traits that make for automatic implementations 2018-10-08 17:44:33 +02:00
Taylor Cramer
1b00f0b9fa Remove spawning from task::Context 2018-09-19 15:01:19 -07:00
Without Boats
974bdc80fe
Update to a new pinning API. 2018-09-01 06:57:58 +02:00
Niv Kaminer
13da951868 move PinMut into pin module and export through std 2018-08-23 01:37:03 +03:00
ljedrz
560d8079ec Deny bare trait objects in src/libstd. 2018-07-10 20:35:36 +02:00
Josef Reinhard Brandl
3bcb85ee65 PinMut: Add safe get_mut and rename unsafe fns to get_mut_unchecked and map_unchecked 2018-06-23 18:29:56 +02:00
Esteban Küber
776544f011 Add message to rustc_on_unimplemented attributes in core 2018-06-19 15:19:13 -07:00
tinaun
fb507cadf3 add inherent methods to Poll 2018-06-09 00:38:11 -04:00
tinaun
49eb754cc0 addressed nits 2018-06-08 23:16:51 -04:00
tinaun
6e5c18e8dc add a few blanket future impls to std 2018-06-08 17:56:59 -04:00
Pazzaz
368fe37c22 Add more links in panic docs 2018-04-29 13:45:33 +02:00
memoryleak47
64ddb390ef typos 2018-04-05 13:04:00 +02:00
bors
1ad094d81c Auto merge of #47687 - SimonSapin:panic-impl, r=sfackler
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-02-18 06:02:35 +00:00
Simon Sapin
2f98f4b12b Move PanicInfo and Location to libcore
Per https://rust-lang.github.io/rfcs/2070-panic-implementation.html
2018-01-23 16:38:26 +01:00
Simon Sapin
3f557947ab NonNull ended up landing in 1.25 2018-01-21 09:48:23 +01:00
Simon Sapin
55c50cd8ac Stabilize std::ptr::NonNull 2018-01-20 11:09:23 +01:00
Simon Sapin
c97c1f7dc3 Mark Unique as perma-unstable, with the feature renamed to ptr_internals. 2018-01-20 11:09:23 +01:00
Simon Sapin
f19baf0977 Rename std::ptr::Shared to NonNull
`Shared` is now a deprecated `type` alias.

CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2018-01-20 10:55:16 +01:00
leonardo.yvens
02b5fee732 Adjust tests for removal of impl Foo for .. {} 2018-01-13 18:48:00 +03:00
leonardo.yvens
f93183adb4 Remove impl Foo for .. in favor of auto trait Foo
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.
2018-01-13 18:48:00 +03:00
Marco A L Barbosa
941852eef3 Fix some docs summary nits 2017-11-20 14:46:31 -02:00
leonardo.yvens
8b586e68b5 auto trait future compatibility lint 2017-11-03 16:13:21 -02:00
Bastien Orivel
3ab86fbab2 Fix some typos 2017-08-12 14:01:11 +02:00
Bastien Orivel
47cb3c5bc2 Fix some typos 2017-08-11 00:16:18 +02:00
gaurikholkar
bc7eb3bd3a Changing error message for interior mutability, adding ui test 2017-06-07 01:38:05 +05:30
Alex Crichton
347e1af66b std: Relax UnwindSafe impl for Unique
Add the `?Sized` bound as we don't require the type to be sized.

Closes #40011
2017-02-21 14:36:24 -08:00
Oliver Middleton
9128f6100c Fix a few impl stability attributes
The versions show up in rustdoc.
2017-01-29 13:31:47 +00:00
Corey Farwell
86fc63e62d Implement fmt::Debug for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
2016-12-18 14:55:14 -08:00
Andrew Paseltiner
f8322035eb
Implement RefUnwindSafe for atomic types
Closes #37136
2016-10-16 19:48:59 -04:00
Oliver Middleton
06a7dcd355 std: Correct stability attributes for some implementations
These are displayed by rustdoc so should be correct.
2016-10-01 23:58:14 +01:00
Jeffrey Seyfried
9a2c8783d9 Use #[prelude_import] in libstd. 2016-08-24 22:12:48 +00:00
Nikhil Shagrithaya
00b1e88680 Added a shim around rust_panic to update panic counter 2016-08-10 22:04:41 +05:30
Aaron Gallagher
fbec232df1 Set unwind_safe_lock_refs stability to 1.12.0.
This is the first (and presumably only) use of this feature.
2016-07-11 07:34:20 -07:00
Aaron Gallagher
c11540587f Mutex and RwLock need RefUnwindSafe too. 2016-07-10 15:22:15 -07:00