about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2020-03-09Add test of Debug representation of BacktraceDavid Tolnay-0/+52
2020-03-09Make it possible to instantiate hardcoded Backtrace from testDavid Tolnay-3/+28
2020-03-09Change disabled and unsupported backtraces to print using placeholder styleDavid Tolnay-2/+2
2020-03-09Add quotes around filename in Backtrace debugDavid Tolnay-1/+1
2020-03-09Remove quotes around unknown fn placeholder in backtraceDavid Tolnay-1/+1
2020-03-09Use GetSystemTimePreciseAsFileTime if it is availableDan Aloni-1/+5
2020-03-08unix: Don't override existing SIGSEGV/BUS handlersJosh Stone-8/+20
Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either.
2020-03-08Rollup merge of #69777 - lukas-code:patch-1, r=jonas-schievinkMazdak Farrokhzad-1/+1
Add missing ` in doc for File::with_options()
2020-03-08Allow ZSTs in `AllocRef`Tim Diekmann-11/+36
2020-03-07reduce references on match patterns (clippy::match_ref_pats)Matthias Krüger-5/+5
2020-03-07Use writeln!(fmt, "word") instead of write!(fmt, "word\n") ↵Matthias Krüger-1/+1
(clippy::write_with_newline)
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-6/+6
fix various typos
2020-03-07Rollup merge of #69782 - matthiaskrgr:redundant_field_name_rep, r=cramertjMazdak Farrokhzad-10/+7
Don't redundantly repeat field names (clippy::redundant_field_names)
2020-03-07Implement Error for TryReserveErrorLena Wildervanck-0/+7
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-10/+7
2020-03-06Fix missing ` in doc for File::with_optionsLukas-1/+1
2020-03-06fix various typosMatthias Krüger-6/+6
2020-03-05Update deprecation version to 1.42 for Error::descriptionDylan Nugent-1/+1
Error::description is deprecated as of version 1.42, as the commit was not in the release for 1.41.
2020-03-05Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPCDylan DPC-2/+2
even more clippy cleanups * Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed) * Use more efficient &&str to String conversion (clippy::inefficient_to_string) * Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call) * Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg) * Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator) * Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes) * Remove redundant patterns when matching ( x @ _ to x) (clippy::redundant_pattern)
2020-03-05Simplify the try intrinsic by using a callback in the catch blockAmanieu d'Antras-13/+52
2020-03-05Const items have by default a static lifetime, there's no need to annotate ↵Matthias Krüger-2/+2
it. (clippy::redundant_static_lifetimes)
2020-03-04Update macros.rs: fix documentation typo.Penelope Phippen-1/+1
2020-03-04Auto merge of #68952 - faern:stabilize-assoc-int-consts, r=dtolnaybors-27/+8
Stabilize assoc_int_consts associated int/float constants The next step in RFC https://github.com/rust-lang/rfcs/pull/2700 (tracking issue #68490). Stabilizing the associated constants that were added in #68325. * Stabilize all constants under the `assoc_int_consts` feature flag. * Update documentation on old constants to say they are soft-deprecated and the new ones should be preferred. * Update documentation examples to use new constants. * Remove `uint_macro` and use `int_macro` for all integer types since the macros were identical anyway. r? @LukasKalbertodt
2020-03-03Rollup merge of #69637 - matthiaskrgr:if_let_some_result, r=ecstatic-morseYuki Okushi-1/+1
Don't convert Results to Options just for matching.
2020-03-03Rollup merge of #69619 - matthiaskrgr:misc, r=eddybYuki Okushi-1/+1
more cleanups * use starts_with() instead of chars().next() == Some(x) * use subsec_micros() instead of subsec_nanos() / 1000 * use for (idx, item) in iter.enumerate() instead of manually counting loop iterations with variables * use values() or keys() respectively when iterating only over keys or values of maps.
2020-03-03Rollup merge of #69609 - TimDiekmann:excess, r=AmanieuYuki Okushi-6/+10
Remove `usable_size` APIs This removes the usable size APIs: - remove `usable_size` (obv) - change return type of allocating methods to include the allocated size - remove `_excess` API r? @Amanieu closes rust-lang/wg-allocators#17
2020-03-03Remove `usable_size` APIsTim Diekmann-6/+10
2020-03-02Don't convert Results to Options just for matching.Matthias Krüger-1/+1
2020-03-02Apply review feedbackAmanieu d'Antras-28/+6
2020-03-02Fix some minor issuesAmanieu d'Antras-2/+2
2020-03-02Mark cleanup coldMark Rousskov-0/+5
2020-03-02Inline catching panics into std::catch_unwindMark Rousskov-26/+44
This allows LLVM to inline the happy path, such that catching unwinding is zero-cost when no panic occurs. This also allows us to match the code generated by C++ try/catch.
2020-03-01use subdsec_micros() instead of subsec_nanos() / 1000Matthias Krüger-1/+1
2020-03-01Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-SimulacrumDylan DPC-1/+1
simplify boolean expressions
2020-02-29Rollup merge of #69584 - zantysor:fix-saturating-duration-since-comment, ↵Dylan DPC-1/+1
r=varkor Correct comment to match behavior Corrects the header comment on `saturating_duration_since` to match the behavior of returning 0 if the other timestamp is _later_ than the invocant, not earlier, This is purely a documentation change, so hopefully it doesn't require an issue; if it does, I'll open one and resubmit.
2020-02-29Rollup merge of #69571 - matthiaskrgr:useless_asref, r=CentrilDylan DPC-1/+1
remove unneeded .as_ref() calls.
2020-02-29correct comment to match behaviorZan Tysor-1/+1
2020-02-29simplify boolean expressionsMatthias Krüger-1/+1
2020-02-29Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-SimulacrumDylan DPC-1/+1
use is_empty() instead of len() == x to determine if structs are empty.
2020-02-29Rollup merge of #69477 - Pulkit07:issue69298, r=cramertjDylan DPC-0/+9
docs: add mention of async blocks in move keyword docs Fixes #69298
2020-02-29remove unneeded .as_ref() calls.Matthias Krüger-1/+1
2020-02-28Rollup merge of #69481 - matthiaskrgr:single_char, r=ecstatic-morseMazdak Farrokhzad-2/+2
use char instead of &str for single char patterns
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-1/+1
2020-02-28docs: add mention of async blocks in move keyword docsPulkit Goyal-0/+9
Fixes #69298
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-3/+1
example: let s: String = format!("hello").into();
2020-02-27use char instead of &str for single char patternsMatthias Krüger-2/+2
2020-02-27Remove spotlight usageGuillaume Gomez-3/+0
2020-02-26Rollup merge of #67637 - Mark-Simulacrum:primitive-mod, r=dtolnayDylan DPC-1/+4
Add primitive module to libcore This re-exports the primitive types from libcore at `core::primitive` to allow macro authors to have a reliable location to use them from. Fixes #44865
2020-02-23Bump core::primitive to 1.43David Tolnay-1/+1
2020-02-23docs: Stdin::read_line: mention the appendingJakub Kądziołka-1/+1