summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-2/+2
2014-03-29auto merge of #13188 : FlaPer87/rust/master, r=alexcrichtonbors-13/+2
2014-03-28auto merge of #13170 : eddyb/rust/syntax-cleanup, r=alexcrichtonbors-2/+2
Removes all Cell's/RefCell's from lexer::Reader implementations and a couple @.
2014-03-29Register new snapshotFlavio Percoco-13/+2
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-8/+8
Closes #2569
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-2/+2
2014-03-28auto merge of #13149 : brson/rust/rustdoclogo, r=alexcrichtonbors-2/+2
2014-03-28auto merge of #13107 : seanmonstar/rust/encoder-errors, r=ericktbors-2/+13
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-27auto merge of #13173 : alexcrichton/rust/rustdoc-mods, r=huonwbors-2/+4
... be stripped out" This reverts commit 7180b5de4452095b032e6c77a77d8c6f81c4f6d3. We don't particularly need this, I've never seen it clutter up the docs, it just seemed nice at the time. Sadly it caused a regression for reexported methods. Closes #13091
2014-03-27serialize: use ResultSean McArthur-2/+13
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-27Revert "Modules are either public, or private, so private modules should be ↵Alex Crichton-2/+4
stripped out" This reverts commit 7180b5de4452095b032e6c77a77d8c6f81c4f6d3.
2014-03-27Fix fallout of removing default boundsAlex Crichton-1/+1
This is all purely fallout of getting the previous commit to compile.
2014-03-25auto merge of #13039 : Kimundi/rust/iter_by_value_extend, r=alexcrichtonbors-5/+5
# Summary Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by value. These functions always exhaust the passed `Iterator`, and are often used for transferring the values of a new `Iterator` directly into a data structure, so using them usually require the use of the `&mut` operator: ``` foo.extend(&mut bar.move_iter()); // Transfer content from bar into foo let mut iter = ...; foo.extend(&mut iter); // iter is now empty ``` This patch changes both the `FromIterator` and `Extendable` traits to take the iterator by value instead, which makes the common case of using these traits less heavy: ``` foo.extend(bar.move_iter()); // Transfer content from bar into foo let iter = ...; foo.extend(iter); // iter is now inaccessible if it moved // or unchanged if it was Pod and copied. ``` # Composability This technically makes the traits less flexible from a type system pov, because they now require ownership. However, because `Iterator` provides the `ByRef` adapter, there is no loss of functionality: ``` foo.extend(iter.by_ref()); // Same semantic as today, for the few situations where you need it. ``` # Motivation This change makes it less painful to use iterators for shuffling values around between collections, which makes it more acceptable to always use them for this, enabling more flexibility. For example, `foo.extend(bar.move_iter())` can generally be the fastest way to append an collections content to another one, without both needing to have the same type. Making this easy to use would allow the removal of special cased methods like `push_all()` on vectors. (See https://github.com/mozilla/rust/issues/12456) I opened https://github.com/mozilla/rust/issues/13038 as well, to discuss this change in general if people object to it. # Further work This didn't change the `collect()` method to take by value `self`, nor any of the other adapters that also exhaust their iterator argument. For consistency this should probably happen in the long term, but for now this is too much trouble, as every use of them would need to be checked for accidentally changed semantic by going `&mut self -> self`. (which allows for the possibility that a `Pod` iterator got copied instead of exhausted without generating a type error by the change)
2014-03-25rustdoc: Display rust logo again. Closes #13148Brian Anderson-2/+2
2014-03-25auto merge of #12961 : cmr/rust/rustdoc-impls, r=alexcrichtonbors-32/+65
Rendered form available at http://docs.octayn.net/doc/ This moves derived impls to the bottom of the list, separate from the rest, and collapses default methods that aren't overridden into an expandible accordion.
2014-03-25Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by ↵Marvin Löbel-5/+5
value
2014-03-25rustdoc: render derived impls separatelyCorey Richardson-3/+30
2014-03-25rustdoc: add some docs for item typesCorey Richardson-0/+6
2014-03-25rustdoc: html: use raw strings for great justiceCorey Richardson-29/+29
2014-03-24test: Update all tests with the sync changesAlex Crichton-8/+8
2014-03-23iter: remove `to_owned_vec`Daniel Micay-7/+7
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
2014-03-22auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichtonbors-2/+2
This PR removes the `Freeze` kind and the `NoFreeze` marker completely. Fixes #12577 cc @nikomatsakis r?
2014-03-22rustc: Remove all usage of manual deref()Alex Crichton-1/+1
Favor using '*' instead
2014-03-22rustdoc: Fix fallout of removing get()Alex Crichton-7/+5
2014-03-22doc: Remove Freeze / NoFreeze from docsFlavio Percoco-2/+2
2014-03-21auto merge of #13016 : huonw/rust/new-opt-vec, r=cmrbors-5/+2
Replace syntax::opt_vec with syntax::owned_slice The `owned_slice::OwnedSlice` is `(*T, uint)` (i.e. a direct equivalent to DSTs `~[T]`). This shaves two words off the old OptVec type; and also makes substituting in other implementations easy, by removing all the mutation methods. (And also everything that's very rarely/never used.)
2014-03-21auto merge of #13043 : alexcrichton/rust/fix-rustdoc-windows, r=brsonbors-3/+13
If the dwShareMode parameter is 0 on windows, it "prevents other processes from opening a file or device if they request delete, read, or write access", which is the opposite of what we want! This changes the 0 parameter to something which will allow multiple processes to open the file and then lock it.
2014-03-22Migrate all users of opt_vec to owned_slice, delete opt_vec.Huon Wilson-5/+2
syntax::opt_vec is now entirely unused, and so can go.
2014-03-21rustdoc: Fix file locking on windowsAlex Crichton-3/+13
If the dwShareMode parameter is 0 on windows, it "prevents other processes from opening a file or device if they request delete, read, or write access", which is the opposite of what we want! This changes the 0 parameter to something which will allow multiple processes to open the file and then lock it.
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-175/+205
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-6/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-5/+5
Closes #12771
2014-03-20rename std::vec -> std::sliceDaniel Micay-9/+9
Closes #12702
2014-03-19auto merge of #12879 : Aatch/rust/rustdoc-mod-privacy, r=alexcrichtonbors-4/+2
Modules don't actually inherit privacy, so anything other than Public should be considered private. Fixes #12801 cc @cmr
2014-03-18rustdoc: Implement cross-crate searchingAlex Crichton-156/+382
A major discoverability issue with rustdoc is that all crates have their documentation built in isolation, so it's difficult when looking at the documentation for libstd to learn that there's a libcollections crate with a HashMap in it. This commit moves rustdoc a little closer to improving the multiple crate experience. This unifies all search indexes for all crates into one file so all pages share the same search index. This allows searching to work across crates in the same documentation directory (as the standard distribution is currently built). This strategy involves updating a shared file amongst many rustdoc processes, so I implemented a simple file locking API for handling synchronization for updates to the shared files. cc #12554
2014-03-18libsyntax: librustdoc: ignore utf-8 BOM in .rs filesLiigo Zhuang-1/+8
Closes #12974
2014-03-17Fix rustdoc and tests.Eduard Burtescu-32/+20
2014-03-17De-@ ParseSess uses.Eduard Burtescu-3/+3
2014-03-17De-@ filesearch.Eduard Burtescu-14/+12
2014-03-17De-@ Session usage.Eduard Burtescu-40/+48
2014-03-17Modules are either public, or private, so private modules should be stripped outJames Miller-4/+2
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-3/+9
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-14extra: Put the nail in the coffin, delete libextraAlex Crichton-6/+1
This commit shreds all remnants of libextra from the compiler and standard distribution. Two modules, c_vec/tempfile, were moved into libstd after some cleanup, and the other modules were moved to separate crates as seen fit. Closes #8784 Closes #12413 Closes #12576
2014-03-13auto merge of #12861 : huonw/rust/lint-owned-vecs, r=thestingerbors-0/+4
lint: add lint for use of a `~[T]`. This is useless at the moment (since pretty much every crate uses `~[]`), but should help avoid regressions once completely removed from a crate.
2014-03-14lint: add lint for use of a `~[T]`.Huon Wilson-0/+4
This is useless at the moment (since pretty much every crate uses `~[]`), but should help avoid regressions once completely removed from a crate.
2014-03-13auto merge of #12815 : alexcrichton/rust/chan-rename, r=brsonbors-3/+3
* Chan<T> => Sender<T> * Port<T> => Receiver<T> * Chan::new() => channel() * constructor returns (Sender, Receiver) instead of (Receiver, Sender) * local variables named `port` renamed to `rx` * local variables named `chan` renamed to `tx` Closes #11765
2014-03-13std: Rename Chan/Port types and constructorAlex Crichton-3/+3
* Chan<T> => Sender<T> * Port<T> => Receiver<T> * Chan::new() => channel() * constructor returns (Sender, Receiver) instead of (Receiver, Sender) * local variables named `port` renamed to `rx` * local variables named `chan` renamed to `tx` Closes #11765
2014-03-13Remove Rc's borrow method to avoid conflicts with RefCell's borrow in ↵Eduard Burtescu-1/+1
Rc<RefCell<T>>.
2014-03-12auto merge of #12756 : pongad/rust/remove_owned_str_pat, r=alexcrichtonbors-22/+23
match-drop-strs-issue-4541.rs deleted as it's the same with issue-4541.rs