about summary refs log tree commit diff
path: root/src/libstd/macros.rs
AgeCommit message (Collapse)AuthorLines
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-40/+0
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-11-29tweak cfg! doc commentAlex Burka-3/+3
2015-11-26fix docs for compiler builtin macrosAlex Burka-3/+3
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+14
2015-09-25Change the first line of the println macro docBen S-1/+1
This makes the first lines of the print! and println! macros different. Previously, they would show up exactly the same in the documentation for the macros in libstd [1], with nothing about how one of them also prints a newline. [1]: https://doc.rust-lang.org/stable/std/#macros
2015-09-19added panic docs for print\! and println\! macrosllogiq-0/+8
2015-09-07Clarify that `include_bytes!` returns a reference to an array, not just a sliceJake Goulding-2/+2
This can be shown with the example code ```rust fn main() { let () = include_bytes!("/etc/hosts"); } Which will have the error: expected `&[u8; 195]`, found `()`
2015-08-28Auto merge of #28047 - steveklabnik:doc_print, r=alexcrichtonbors-0/+20
2015-08-27Add some examples for the print! macroSteve Klabnik-0/+20
2015-08-27fix some more unstable issue annotationsAlex Burka-1/+1
2015-08-17std: Clean up primitive integer modulesAlex Crichton-0/+9
All of the modules in the standard library were just straight reexports of those in libcore, so remove all the "macro modules" from the standard library and just reexport what's in core directly.
2015-07-27Show appropriate feature flags in docsSteve Klabnik-1/+2
2015-06-26std: clean up duplicated attrs and comment on panicRicho Healey-22/+0
2015-06-19Fix docs for column/lineSteve Klabnik-2/+2
Fixes #26424
2015-06-17std: Split the `std_misc` featureAlex Crichton-4/+2
2015-06-03Indent 4 spaces instead of 2Carol Nichols-2/+2
2015-06-03Return Ok(()) instead of Ok()Carol Nichols-2/+2
2015-06-03Use write_all instead of write_lineCarol Nichols-2/+2
2015-06-03Add prelude to get WriteCarol Nichols-0/+1
2015-06-03Improve `try!` docs to make clearer it returns `Result`.Carol Nichols-1/+27
The API documentation is not explicit enough that because `try!` returns `Err` early for you, you can only use it in functions that return `Result`. The book mentions this, but if you come across `try!` outside of the book and look it up in the docs, this restriction on the return type of the function is not particularly clear.
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-9/+9
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-05-05Auto merge of #25101 - alexcrichton:fix-flaky-windows-test, r=nikomatsakisbors-2/+4
This test has deadlocked on Windows once or twice now and we've had lots of problems in the past of threads panicking when the process is being shut down. One of the two threads in this test is guaranteed to panic because of the `.unwrap()` on the `send` calls, so just call `recv` on both receivers after the test executes to ensure that both threads are dying/dead.
2015-05-04std: Join threads in select! doctestAlex Crichton-2/+4
This test has deadlocked on Windows once or twice now and we've had lots of problems in the past of threads panicking when the process is being shut down. One of the two threads in this test is guaranteed to panic because of the `.unwrap()` on the `send` calls, so just call `recv` on both receivers after the test executes to ensure that both threads are dying/dead.
2015-05-04Fix spelling errors in documentation.Joseph Crail-1/+1
2015-04-28Register new snapshotsTamir Duberstein-25/+0
2015-04-11Change the rt::unwind line argument type from usize to u32.Ryan Prichard-1/+48
2015-04-08std: Destabilize the internals of panic!Alex Crichton-0/+1
Now that we have a `#[allow_internal_unstable]` attribute for macros there's no need for these two `begin_unwind` functions to be stable. Right now the `panic!` interface is the only one we wish to stabilize, so remove the stability markers from these functions. While this is a breaking change, it is highly unlikely to break any actual code. It is recommended to use the `panic!` macro instead if it breaks explicit calls into `std::rt`. [breaking-change] cc #24208
2015-03-31rollup merge of #23879: seanmonstar/del-from-errorAlex Crichton-1/+1
Conflicts: src/libcore/error.rs
2015-03-30convert: remove FromError, use From<E> insteadSean McArthur-1/+1
This removes the FromError trait, since it can now be expressed using the new convert::Into trait. All implementations of FromError<E> where changed to From<E>, and `try!` was changed to use From::from instead. Because this removes FromError, it is a breaking change, but fixing it simply requires changing the words `FromError` to `From`, and `from_error` to `from`. [breaking-change]
2015-03-30std: Add a note about the print! macro and output bufferingRicho Healey-0/+4
2015-03-26syntax: Remove support for #[should_fail]Alex Crichton-1/+1
This attribute has been deprecated in favor of #[should_panic]. This also updates rustdoc to no longer accept the `should_fail` directive and instead renames it to `should_panic`.
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+1
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+1
2015-03-22Remove bad reference to std::ioSteve Klabnik-2/+1
Closes #23540
2015-03-19Document include!Steve Klabnik-0/+14
Fixes #22309
2015-03-17Rollup merge of #23329 - jbcrail:rm-syntax-highlight, r=sanxiynManish Goregaokar-5/+5
As suggested by @steveklabnik in #23254, I removed the redundant Rust syntax highlighting from the documentation.
2015-03-15Use new io in print and println macrosesSimonas Kazlauskas-6/+9
2015-03-13Remove explicit syntax highlight from docs.Joseph Crail-5/+5
2015-03-11Example -> ExamplesSteve Klabnik-14/+14
This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown
2015-02-21Resolve includeme.fragment conflict.Brian Brooks-2/+2
2015-02-17Register new snapshotsAlex Crichton-17/+0
2015-02-17Fallout from stabilizationAaron Turon-3/+3
2015-02-07Don't use std:: paths in syntax extensions when compiling a #![no_std] crateKeegan McAllister-0/+1
Fixes #16803. Fixes #14342. Fixes half of #21827 -- slice syntax is still broken.
2015-01-30Remove all `i` suffixesTobias Bucher-3/+3
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-4/+4
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-26Fallout of io => old_ioAlex Crichton-4/+4
2015-01-23grandfathered -> rust1Brian Anderson-5/+5
2015-01-23Set unstable feature names appropriatelyBrian Anderson-2/+2
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-21Remove 'since' from unstable attributesBrian Anderson-2/+2
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-7/+7