about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-05-03Add doc example for how to determine total number of secs in Duration.Corey Farwell-0/+15
2017-05-02Update Duration::as_secs doc example to demonstrate truncation.Corey Farwell-2/+2
2017-05-02Update Duration::from_millis doc example to show underlying values.Corey Farwell-1/+4
2017-05-02Update Duration::from_secs doc example to show underlying values.Corey Farwell-1/+4
2017-05-03Auto merge of #41624 - RalfJung:mutexguard-sync, r=alexcrichtonbors-5/+3
MutexGuard<T> may be Sync only if T is Sync Fixes #41622 This is a breaking change. Does that imply any further process? I am not sure whether I wrote that "compilation must fail"-test correctly, but at least it is passing here with the patch applied. Same for the `since = "1.18.0"`, I just picked it because I had to pick something.
2017-05-01Fix incorrect hex value in doc comment example.Corey Farwell-1/+1
2017-05-01Add profiling support, through the rustc -Z profile flag.whitequark-0/+2
When -Z profile is passed, the GCDAProfiling LLVM pass is added to the pipeline, which uses debug information to instrument the IR. After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno file is created, containing initial profiling information. After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda file is created, containing branch counters. The created *.gcno and *.gcda files can be processed using the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM generates does not faithfully follow the GCC's format for *.gcno and *.gcda files, and so it will probably not work with other tools (such as gcov itself) that consume these files.
2017-04-29Update stage0 bootstrap compilerAlex Crichton-1/+0
We've got a freshly minted beta compiler, let's update to use that on nightly! This has a few other changes associated with it as well * A bump to the rustc version number (to 1.19.0) * Movement of the `cargo` and `rls` submodules to their "proper" location in `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude` option this can work. * Updates of the `cargo` and `rls` submodules to their master branches. * Tweak to the `src/stage0.txt` format to be more amenable for Cargo version numbers. On the beta channel Cargo will bootstrap from a different version than rustc (e.g. the version numbers are different), so we need different configuration for this. * Addition of `dev` as a readable key in the `src/stage0.txt` format. If present then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead of `static.rust-lang.org`. This is added to accomodate our updated release process with Travis and AppVeyor.
2017-04-29need to pick a new feature nameRalf Jung-1/+1
2017-04-29MutexGuard<T> may be Sync only if T is SyncRalf Jung-5/+3
Also remove some unnecessary unsafe impl from the tests.
2017-04-27Rollup merge of #41526 - steveklabnik:gh35950, r=GuillaumeGomezCorey Farwell-9/+8
Clean up TcpStream example Fixes #35950
2017-04-27Rollup merge of #41438 - projektir:mpsc_docs, r=steveklabnikCorey Farwell-29/+254
Adding links and examples for various mspc pages #29377 Adding links and copying examples for the various Iterators; adding some extra stuff to `Sender`/`SyncSender`/`Receiver`.
2017-04-26Adding links and examples for various mspc pages #29377projektir-29/+254
2017-04-26Rollup merge of #41499 - steveklabnik:gh25164, r=alexcrichtonAriel Ben-Yehuda-0/+7
Address platform-specific behavior in TcpStream::shutdown Fixes #25164 r? @rust-lang/libs from the GitHub thread, it seems like documenting this behavior is okay, but I want to make sure that's what you want.
2017-04-26restructured docs for thread and added linksChristian Poveda-13/+19
2017-04-26Auto merge of #41352 - kennytm:macos-sanitizers, r=alexcrichtonbors-0/+4
Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin [ASan](https://clang.llvm.org/docs/AddressSanitizer.html#supported-platforms) and [TSan](https://clang.llvm.org/docs/ThreadSanitizer.html#supported-platforms) are supported on macOS, and this commit enables their support. The sanitizers are always built as `*.dylib` on Apple platforms, so they cannot be statically linked into the corresponding `rustc_?san.rlib`. The dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/` instead. Note, although Xcode also ships with their own copies of ASan/TSan dylibs, we cannot use them due to version mismatch. ---- ~~There is a caveat: the sanitizer libraries are linked as `@rpath/` (due to https://reviews.llvm.org/D6018), so the user needs to additionally pass `-C rpath`:~~ **Edit:** Passing rpath is now automatic.
2017-04-26Address platform-specific behavior in TcpStream::shutdownsteveklabnik-0/+7
Fixes #25164
2017-04-26Clean up TcpStream examplesteveklabnik-9/+8
Fixes #35950
2017-04-26added moveChristian Poveda-1/+1
2017-04-25Rollup merge of #41518 - tbu-:pr_fix_cp_error, r=sfacklerCorey Farwell-1/+1
Fix a copy-paste error in `Instant::sub_duration` Fixes #41514.
2017-04-25Rollup merge of #41463 - SergioBenitez:master, r=alexcrichtonCorey Farwell-0/+139
Add internal accessor methods to io::{Chain, Take}. Resolves #29067.
2017-04-25Rollup merge of #41442 - tbu-:pr_writeall_interrupted, r=aturonCorey Farwell-6/+16
Specify behavior of `write_all` for `ErrorKind::Interrupted` errors Also spell out that read and write operations should be retried on `ErrorKind::Interrupted` errors. Fixes #38494.
2017-04-25rewrote the thread struct docsChristian Poveda-7/+12
2017-04-25Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin.kennytm-0/+4
ASan and TSan are supported on macOS, and this commit enables their support. The sanitizers are always built as *.dylib on Apple platforms, so they cannot be statically linked into the corresponding `rustc_?san.rlib`. The dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/` instead. Note, although Xcode also ships with their own copies of ASan/TSan dylibs, we cannot use them due to version mismatch. There is a caveat: the sanitizer libraries are linked as @rpath, so the user needs to additionally pass `-C rpath`: rustc -Z sanitizer=address -C rpath file.rs ^~~~~~~~ Otherwise there will be a runtime error: dyld: Library not loaded: @rpath/libclang_rt.asan_osx_dynamic.dylib Referenced from: /path/to/executable Reason: image not found Abort trap: 6 The next commit includes a temporary change in compiler to force the linker to emit a usable @rpath.
2017-04-24Add cautions to io::get_mut method documentation.Sergio Benitez-0/+8
2017-04-24Reference tracking issue for more_io_inner_methods.Sergio Benitez-5/+5
2017-04-24Add internal accessor methods to io::{Chain, Take}.Sergio Benitez-0/+131
Resolves #29067.
2017-04-25Fix a copy-paste error in `Instant::sub_duration`Tobias Bucher-1/+1
Fixes #41514.
2017-04-23Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichtonbors-397/+1
Remove items that are unstable and deprecated This removes unstable items that have been deprecated for more than one cycle. - Since 1.16.0, `#![feature(enumset)]` - All of `mod collections::enum_set` - Since 1.15.0, `#![feature(borrow_state)]` - `cell::BorrowState` - `RefCell::borrow_state()` - Since 1.15.0, `#![feature(is_unique)]` - `Rc::is_unique()` (made private like `Arc::is_unique()`) - Since 1.15.0, `#![feature(rc_would_unwrap)]` - `Rc::would_wrap()` - Since 1.13.0, `#![feature(binary_heap_extras)]` - `BinaryHeap::push_pop()` - `BinaryHeap::replace()` - Since 1.12.0, `#![feature(as_unsafe_cell)]` - `Cell::as_unsafe_cell()` - `RefCell::as_unsafe_cell()` - Since 1.12.0, `#![feature(map_entry_recover_keys)]` - `btree_map::OccupiedEntry::remove_pair()` - `hash_map::OccupiedEntry::remove_pair()` - Since 1.11.0, `#![feature(float_extras)]` - `Float::nan()` - `Float::infinity()` - `Float::neg_infinity()` - `Float::neg_zero()` - `Float::zero()` - `Float::one()` - `Float::integer_decode()` - `f32::integer_decode()` - `f32::ldexp()` - `f32::frexp()` - `f32::next_after()` - `f64::integer_decode()` - `f64::ldexp()` - `f64::frexp()` - `f64::next_after()` - Since 1.11.0, `#![feature(zero_one)]` - `num::Zero` - `num::One`
2017-04-22Remove unused import.Corey Farwell-1/+1
2017-04-22Fix invalid linkageGuillaume Gomez-4/+4
2017-04-21Rollup merge of #41426 - malbarbo:android-x86_64, r=alexcrichtonCorey Farwell-0/+63
Add x86_64-linux-android target
2017-04-21Rollup merge of #41376 - mbrubeck:docs, r=frewsxcvCorey Farwell-2/+15
Expanded docs and examples for PathBuf::file_name and friends This addresses some common surprises when `PathBuf::set_file_name` is called on the path of a directory rather than a file. r? @steveklabnik
2017-04-21Specify behavior of `write_all` for `ErrorKind::Interrupted` errorsTobias Bucher-6/+16
Also spell out that read and write operations should be retried on `ErrorKind::Interrupted` errors. Fixes #38494.
2017-04-20Remove float_extrasJosh Stone-384/+0
[unstable, deprecated since 1.11.0]
2017-04-20Remove num::{Zero,One}Josh Stone-4/+0
[unstable, deprecated since 1.11.0]
2017-04-20Remove RefCell::borrow_stateJosh Stone-1/+0
[unstable, deprecated since 1.15.0]
2017-04-20Remove OccupiedEntry::remove_pairJosh Stone-7/+0
[unstable, deprecated since 1.12.0]
2017-04-20Add x86_64-linux-android targetMarco A L Barbosa-0/+63
2017-04-20Expanded docs and examples for PathBuf::file_name and friendsMatt Brubeck-2/+15
2017-04-20Rollup merge of #40812 - mgattozzi:ChildDocs, r=steveklabnikCorey Farwell-11/+9
Update `Child` docs to not have a note section In #29370 it's noted that for "the Note shouldn't be one, and should come before the examples." This commit changes the positioning of the section and removes wording that said take note in order for it to flow better with the surrounding text and it's new position.
2017-04-20Rollup merge of #41390 - scottmcm:toowned-clone-into, r=alexcrichtonCorey Farwell-1/+30
Override ToOwned::clone_into for Path and OsStr The only non-overridden one remaining is the CStr impl, which cannot be optimized as doing so would break CString's second invariant. Follow-up to 7ec27ae (PR #41009). r? @alexcrichton
2017-04-19Rollup merge of #41380 - ollie27:stability, r=BurntSushiCorey Farwell-1/+1
Fix a few stability attributes These show up in rustdoc so need to be correct.
2017-04-19Rollup merge of #41348 - lukaramu:std-path-docs, r=frewsxcvCorey Farwell-120/+257
Improve std::path docs Fixes #29368. This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples. For more details, see the commit descriptions. r? @steveklabnik
2017-04-19Fix link for waitMichael Gattozzi-1/+1
2017-04-18Override ToOwned::clone_into for Path and OsStrScott McMurray-1/+30
The only non-overridden one remaining is the CStr impl, which cannot be optimized as doing so would break CString's second invariant.
2017-04-18Fix a few stability attributesOliver Middleton-1/+1
These show up in rustdoc so need to be correct.
2017-04-18Rollup merge of #41364 - alexcrichton:less-backtrace-prune, r=petrochenkovCorey Farwell-80/+4
std: Back out backtrace pruning logic It was discovered #40264 that this backtrace pruning logic is a little too aggressive, so while we figure how out to handle #40264 this commit backs out the changes to prune frames. Note that other cosmetic changes, such as better path printing and such remain.
2017-04-18Rollup merge of #41353 - redox-os:master, r=alexcrichtonCorey Farwell-9/+18
Improve Process::spawn with piped stdio on Redox - Adds `dup2`, and uses it for stdio piping - Removes `O_CLOEXEC` from piped stdio, as `dup` on Redox does not disable O_CLOEXEC
2017-04-18std: Back out backtrace pruning logicAlex Crichton-80/+4
It was discovered #40264 that this backtrace pruning logic is a little too aggressive, so while we figure how out to handle #40264 this commit backs out the changes to prune frames. Note that other cosmetic changes, such as better path printing and such remain.