about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-09-25Fix ExitStatus on FuchsiaTyler Mandry-75/+93
Fuchsia exit codes don't follow the convention of libc::WEXITSTATUS et al, and they are 64 bits instead of 32 bits. This gives Fuchsia its own representation of ExitStatus. Additionally, the zircon syscall structs were out of date, causing us to see bogus return codes.
2019-09-25Snap cfgs to new betaMark Rousskov-1/+0
2019-09-25Rollup merge of #64481 - tomtau:fix/tls-error-message, r=KodrAusMazdak Farrokhzad-2/+2
A more explanatory thread local storage panic message Outside rust-std internals, TLS is usually understood as Transport Layer Security, so the existing message could be a bit puzzling when one has TLS sessions in `thread_local!`.
2019-09-24Rollup merge of #64720 - Wind-River:master, r=alexcrichtonMazdak Farrokhzad-302/+2
remove rtp.rs, and move rtpSpawn and RTP_ID_ERROR to libc r? @alexcrichton
2019-09-24Rollup merge of #64702 - sinkuu:deps, r=jonas-schievinkMazdak Farrokhzad-3/+0
Remove unused dependencies
2019-09-24Rollup merge of #63356 - ali-raheem:issue#63183, r=KodrAusMazdak Farrokhzad-0/+25
Issue#63183: Add fs::read_dir() and ReadDir warning about iterator order + example As per https://github.com/rust-lang/rust/issues/63183 Add warning about iterator order to read_dir and ReadDir, add example of explicitly ordering direntrys.
2019-09-23remove rtp.rs, and move rtpSpawn and RTP_ID_ERROR to libcBaoshan Pang-302/+2
2019-09-23Remove unused dependenciesShotaro Yamada-3/+0
2019-09-23Rollup merge of #64294 - wchargin:wchargin-stdio-piped-docs, r=Dylan-DPCMazdak Farrokhzad-1/+1
Fix `Stdio::piped` example code and lint Summary: Invoking `rev` does not add a trailing newline when none is present in the input (at least on my Debian). Nearby examples use `echo` rather than `rev`, which probably explains the source of the discrepancy. Also, a `mut` qualifier is unused. Test Plan: Copy the code block into <https://play.rust-lang.org> with a `fn main` wrapper, and run it. Note that it compiles and runs cleanly; prior to this commit, it would emit an `unused_mut` warning and then panic. wchargin-branch: stdio-piped-docs
2019-09-20Merge pull request #25 from Wind-River/statn-salim-1/+1
rust stat should call libc stat
2019-09-20rust stat should call libc statBaoshan Pang-1/+1
2019-09-20No home directory on vxWorksBaoshan Pang-22/+1
2019-09-19Remove unnecessary `mut` in doc exampleAdrian Heine né Lang-1/+1
2019-09-17Rollup merge of #64505 - pickfire:patch-1, r=Mark-SimulacrumTyler Mandry-6/+6
Fix inconsistent link formatting
2019-09-16Rollup merge of #64504 - guanqun:use-println-without-empty-str, ↵Mazdak Farrokhzad-1/+1
r=jonas-schievink use println!() instead of println!("") The empty string is unnecessary.
2019-09-16Rollup merge of #64444 - RalfJung:no-backtrace, r=alexcrichtonMazdak Farrokhzad-27/+25
fix building libstd without backtrace feature Fixes https://github.com/rust-lang/rust/issues/64410 r? @alexcrichton
2019-09-16avoid #[cfg] in favor of cfg!Ralf Jung-13/+7
2019-09-16Fix inconsistent link formattingIvan Tham-6/+6
2019-09-16updated the panic message wordingTomas Tauber-1/+1
2019-09-15Rollup merge of #63872 - marmistrz:readdir, r=jonas-schievinkMazdak Farrokhzad-1/+2
Document platform-specific behavior of the iterator returned by std::fs::read_dir
2019-09-15use println!()Guanqun Lu-1/+1
2019-09-15Made a thread local storage panic message more explanatoryTomas Tauber-2/+2
(TLS is usually understood as Transport Layer Security outside rust-std internals)
2019-09-14Rollup merge of #64393 - Wind-River:master_002_envKey, r=alexcrichtonMazdak Farrokhzad-2/+1
declare EnvKey before use to fix build error r? @alexcrichton
2019-09-14Rollup merge of #64378 - Rosto75:master, r=jonas-schievinkMazdak Farrokhzad-4/+4
Fix inconsistent link formatting.
2019-09-14Rollup merge of #64372 - Wind-River:master, r=alexcrichtonMazdak Farrokhzad-7/+14
use randSecure and randABytes r? @alexcrichton cc @n-salim
2019-09-14Rollup merge of #64203 - alexreg:rush-pr-2, r=centrilMazdak Farrokhzad-20/+20
A few cosmetic improvements to code & comments in liballoc and libcore Factored out from hacking on rustc for work on the REPL. r? @Centril
2019-09-14Rollup merge of #63846 - DevQps:32626-document-time-system-calls, r=rkruppeMazdak Farrokhzad-0/+46
Added table containing the system calls used by Instant and SystemTime. # Description See #32626 for a discussion on documenting system calls used by Instant and SystemTime. ## Changes - Added a table containing the system calls used by each platform. EDIT: If I can format this table better (due to the large links) please let me know. I'd also be happy to learn a quick command to generate the docs on my host machine! Currently I am using: `python x.py doc --stage 0 src/libstd` but that gives me some `unrecognized intrinsic` errors. Advice is always welcome :) closes #32626
2019-09-14rename the crate, not the featureRalf Jung-20/+22
2019-09-14std: always depend on backtrace, but only enable its features on demandRalf Jung-19/+21
2019-09-13Update src/libstd/time.rsChristian Veenman-1/+1
Co-Authored-By: Robin Kruppe <robin.kruppe@gmail.com>
2019-09-11Auto merge of #64154 - alexcrichton:std-backtrace, r=sfacklerbors-54/+433
std: Add a `backtrace` module This commit adds a `backtrace` module to the standard library, as designed in [RFC 2504]. The `Backtrace` type is intentionally very conservative, effectively only allowing capturing it and printing it. Additionally this commit also adds a `backtrace` method to the `Error` trait which defaults to returning `None`, as specified in [RFC 2504]. More information about the design here can be found in [RFC 2504] and in the [tracking issue]. Implementation-wise this is all based on the `backtrace` crate and very closely mirrors the `backtrace::Backtrace` type on crates.io. Otherwise it's pretty standard in how it handles everything internally. [RFC 2504]: https://github.com/rust-lang/rfcs/blob/master/text/2504-fix-error.md [tracking issue]: https://github.com/rust-lang/rust/issues/53487 cc #53487
2019-09-11Fix inconsistent link formatting.Tomasz Różański-4/+4
2019-09-10declare EnvKey before use to fix build errorBaoshan Pang-2/+1
2019-09-11Rollup merge of #64326 - hman523:master, r=joshtriplettMazdak Farrokhzad-2/+4
Fixed documentation within c_str::from_ptr Fixed the documentation issue mentioned in #63590
2019-09-11Rollup merge of #64129 - Wind-River:master_003, r=alexcrichtonMazdak Farrokhzad-5/+3
vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn r? @alexcrichton cc @n-salim
2019-09-10use randSecure and randABytesBaoshan Pang-7/+14
2019-09-10remove Copyright noticBaoshan Pang-6/+0
2019-09-10Rollup merge of #64331 - hman523:fix-64322, r=varkorMazdak Farrokhzad-1/+1
Changed instant is earlier to instant is later Fixed the documentation issue from #64322
2019-09-10Rollup merge of #64323 - cramertj:fuchsia-rust-backtrace-noop, r=alexcrichtonMazdak Farrokhzad-0/+6
Always show backtrace on Fuchsia r? @alexcrichton cc @jakeehrlich
2019-09-09Changed instant is earlier to instant is laterhman523-1/+1
2019-09-09Update added backticks around a function callhman523-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-09-09Fixed documentation within c_str::from_ptrhman523-2/+4
2019-09-09Always show backtrace on FuchsiaTaylor Cramer-0/+6
2019-09-09Rollup merge of #63806 - mati865:rand, r=alexcrichtonMazdak Farrokhzad-3/+3
Upgrade rand to 0.7 Also upgrades `getrandom` to avoid bug encountered by https://github.com/rust-lang/rust/pull/61393 which bumps libc to `0.2.62`.
2019-09-09Added some context on SGX. Lists Darwin separately.Christian-18/+32
2019-09-09Replace println statements with explanatory commentsAli Raheem-7/+4
2019-09-09std: Add a `backtrace` moduleAlex Crichton-54/+433
This commit adds a `backtrace` module to the standard library, as designed in [RFC 2504]. The `Backtrace` type is intentionally very conservative, effectively only allowing capturing it and printing it. Additionally this commit also adds a `backtrace` method to the `Error` trait which defaults to returning `None`, as specified in [RFC 2504]. More information about the design here can be found in [RFC 2504] and in the [tracking issue]. Implementation-wise this is all based on the `backtrace` crate and very closely mirrors the `backtrace::Backtrace` type on crates.io. Otherwise it's pretty standard in how it handles everything internally. [RFC 2504]: https://github.com/rust-lang/rfcs/blob/master/text/2504-fix-error.md [tracking issue]: https://github.com/rust-lang/rust/issues/53487 cc #53487
2019-09-09Auto merge of #63118 - Centril:stabilize-bind-by-move, r=matthewjasperbors-1/+1
Stabilize `bind_by_move_pattern_guards` in Rust 1.39.0 Closes https://github.com/rust-lang/rust/issues/15287. After stabilizing `#![feature(bind_by_move_pattern_guards)]`, you can now use bind-by-move bindings in patterns and take references to those bindings in `if` guards of `match` expressions. For example, the following now becomes legal: ```rust fn main() { let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]); match array { nums // ---- `nums` is bound by move. if nums.iter().sum::<u8>() == 10 // ^------ `.iter()` implicitly takes a reference to `nums`. => { drop(nums); // --------- Legal as `nums` was bound by move and so we have ownership. } _ => unreachable!(), } } ``` r? @matthewjasper
2019-09-08Fix `Stdio::piped` example code and lintWilliam Chargin-2/+2
Summary: Invoking `rev` does not add a trailing newline when none is present in the input (at least on my Debian). Nearby examples use `echo` rather than `rev`, which probably explains the source of the discrepancy. Also, a `mut` qualifier is unused. Test Plan: Copy the code block into <https://play.rust-lang.org> with a `fn main` wrapper, and run it. Note that it compiles and runs cleanly; prior to this commit, it would emit an `unused_mut` warning and then panic. wchargin-branch: stdio-piped-docs
2019-09-08Rollup merge of #64152 - cramertj:update-backtrace, r=alexcrichtonMazdak Farrokhzad-151/+94
Use backtrace formatting from the backtrace crate r? @alexcrichton