about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
AgeCommit message (Collapse)AuthorLines
2014-05-28Replace StrAllocating.into_owned() with .into_string()Kevin Ballard-1/+1
We already have into_string(), but it was implemented in terms of into_owned(). Flip it around and deprecate into_owned(). Remove a few spurious calls to .into_owned() that existed in libregex and librustdoc.
2014-05-28std: Remove format_strbuf!()Alex Crichton-3/+3
This was only ever a transitionary macro.
2014-05-27rustdoc: Only link to local inlined foreign itemsAlex Crichton-1/+1
This commit alters rustdoc to keep a hash set of known inlined items which is a whitelist for generating URLs to. Closes #14438
2014-05-27std: Rename strbuf operations to stringRicho Healey-10/+10
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-25rustdoc: Fix rendering of the 'static boundAlex Crichton-1/+1
2014-05-25rustdoc: Link to local reexportations of itemsAlex Crichton-1/+1
Within the documentation for a crate, all hyperlinks to reexported items don't go across crates, but rather to the items in the crate itself. This will allow references to Option in the standard library to link to the standard library's Option, instead of libcore's. This does mean that other crate's links for Option will still link to libcore's Option.
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-9/+9
[breaking-change]
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-1/+1
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-11/+19
2014-05-22rustdoc: Fill in external trait methodsAlex Crichton-3/+7
This commit alters rustdoc to crawl the metadata of upstream libraries in order to fill in default methods for traits implemented in downstream crates. This, for example, documents the `insert` function on hash maps. This is a fairly lossy extraction from the metadata. Documentation and attributes are lost, but they aren't used anyway. Unfortunately, argument names are also lost because they are not present in the metadata. Source links are also lost because the spans are not serialized. While not perfect, it appears that presenting this documentation through rustdoc is much better than nothing, so I wanted to land this to allow iteration on it later on.
2014-05-15core: Update all tests for fmt movementAlex Crichton-1/+1
2014-05-15Updates with core::fmt changesAlex Crichton-70/+70
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
2014-05-12librustdoc: Remove all `~str` usage from librustdoc.Patrick Walton-19/+26
2014-05-10auto merge of #14068 : alexcrichton/rust/rustdoc-xcrate-links, r=brsonbors-42/+19
This should improve the libcore experience quite a bit when looking at the libstd documentation.
2014-05-09rustdoc: Hyperlink cross-crate reexportsAlex Crichton-42/+19
This should improve the libcore experience quite a bit when looking at the libstd documentation.
2014-05-08Handle more falloutKevin Ballard-1/+1
os::args() no longer auto-borrows to &[~str].
2014-05-08auto merge of #13835 : alexcrichton/rust/localdata, r=brsonbors-69/+60
This commit brings the local_data api up to modern rust standards with a few key improvements: * All functionality is now exposed as a method on the keys themselves. Instead of importing std::local_data, you now use "key.set()" and "key.get()". * All closures have been removed in favor of RAII functionality. This means that get() and get_mut() no long require closures, but rather return Option<SmartPointer> where the smart pointer takes care of relinquishing the borrow and also implements the necessary Deref traits * The modify() function was removed to cut the local_data interface down to its bare essentials (similarly to how RefCell removed set/get). [breaking-change]
2014-05-07std: Modernize the local_data apiAlex Crichton-69/+60
This commit brings the local_data api up to modern rust standards with a few key improvements: * The `pop` and `set` methods have been combined into one method, `replace` * The `get_mut` method has been removed. All interior mutability should be done through `RefCell`. * All functionality is now exposed as a method on the keys themselves. Instead of importing std::local_data, you now use "key.replace()" and "key.get()". * All closures have been removed in favor of RAII functionality. This means that get() and get_mut() no long require closures, but rather return Option<SmartPointer> where the smart pointer takes care of relinquishing the borrow and also implements the necessary Deref traits * The modify() function was removed to cut the local_data interface down to its bare essentials (similarly to how RefCell removed set/get). [breaking-change]
2014-05-06rustc: Enable writing "unsafe extern fn() {}"Alex Crichton-5/+4
Previously, the parser would not allow you to simultaneously implement a function with a different abi as well as being unsafe at the same time. This extends the parser to allow functions of the form: unsafe extern fn foo() { // ... } The closure type grammar was also changed to reflect this reversal, types previously written as "extern unsafe fn()" must now be written as "unsafe extern fn()". The parser currently has a hack which allows the old style, but this will go away once a snapshot has landed. Closes #10025 [breaking-change]
2014-04-22add support for quadruple precision floating pointDaniel Micay-0/+1
This currently requires linking against a library like libquadmath (or libgcc), because compiler-rt barely has any support for this and most hardware does not yet have 128-bit precision floating point. For this reason, it's currently hidden behind a feature gate. When compiler-rt is updated to trunk, some tests can be added for constant evaluation since there will be support for the comparison operators. Closes #13381
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-7/+7
2014-04-16rustc: Remove private enum variantsAlex Crichton-1/+0
This removes the `priv` keyword from the language and removes private enum variants as a result. The remaining use cases of private enum variants were all updated to be a struct with one private field that is a private enum. RFC: 0006-remove-priv Closes #13535
2014-04-14rustdoc: Represent item types as a small number in the search index.Kang Seonghoon-8/+10
Has negligible improvements with gzip, but saves about 7% without it. This also has an effect of changing the tie-breaking order of item types.
2014-04-13rustdoc: Fix rendering closures and trait boundsAlex Crichton-21/+53
Closures did not have their bounds printed at all, nor their lifetimes. Trait bounds were also printed in angle brackets rather than after a colon with a '+' inbetween them. Note that on the current task::spawn [1] documentation page, there is no mention of a `Send` bound even though it is crucially important! [1] - http://static.rust-lang.org/doc/master/std/task/fn.task.html
2014-04-11rustdoc: fix fallout from removing ast::Sigil.Eduard Burtescu-8/+13
2014-04-10auto merge of #13440 : huonw/rust/strbuf, r=alexcrichtonbors-8/+10
libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269
2014-04-10Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and ↵Kasey Carrothers-9/+9
updated associated variable and function names.
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-8/+10
port all code over to use it.
2014-03-31Switch some tuple structs to pub fieldsAlex Crichton-3/+3
This commit deals with the fallout of the previous change by making tuples structs have public fields where necessary (now that the fields are private by default).
2014-03-24test: Update all tests with the sync changesAlex Crichton-4/+4
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-8/+8
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-12rustc: Remove matching on ~str from the languageMichael Darakananda-1/+2
The `~str` type is not long for this world as it will be superseded by the soon-to-come DST changes for the language. The new type will be `~Str`, and matching over the allocation will no longer be supported. Matching on `&str` will continue to work, in both a pre and post DST world.
2014-02-20Mass rename if_ok! to try!Alex Crichton-44/+44
This "bubble up an error" macro was originally named if_ok! in order to get it landed, but after the fact it was discovered that this name is not exactly desirable. The name `if_ok!` isn't immediately clear that is has much to do with error handling, and it doesn't look fantastic in all contexts (if if_ok!(...) {}). In general, the agreed opinion about `if_ok!` is that is came in as subpar. The name `try!` is more invocative of error handling, it's shorter by 2 letters, and it looks fitting in almost all circumstances. One concern about the word `try!` is that it's too invocative of exceptions, but the belief is that this will be overcome with documentation and examples. Close #12037
2014-02-13auto merge of #12017 : FlaPer87/rust/replace-mod-crate, r=alexcrichtonbors-4/+4
The first setp for #9880 is to add a new `crate` keyword. This PR does exactly that. I took a chance to refactor `parse_item_foreign_mod` and I broke it down into 2 separate methods to isolate each feature. The next step will be to push a new stage0 snapshot and then get rid of all `extern mod` around the code.
2014-02-13Add some missing Show implementations in libstdBrendan Zabarauskas-15/+14
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-4/+4
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-08std::fmt: convert the formatting traits to a proper self.Huon Wilson-37/+37
Poly and String have polymorphic `impl`s and so require different method names.
2014-02-07Removed @self and @Trait.Eduard Burtescu-1/+0
2014-02-03Fixing remaining warnings and errors throughoutAlex Crichton-1/+0
2014-02-03rustdoc: Remove io_error usageAlex Crichton-88/+124
2014-02-02std: rename fmt::Default to `Show`.Huon Wilson-14/+14
This is a better name with which to have a #[deriving] mode. Decision in: https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-01-28
2014-01-26Removed all instances of XXX in preparation for relaxing of FIXME ruleSalem Talha-3/+3
2014-01-21[std::vec] Rename .last_opt() to .last(), drop the old .last() behaviorSimon Sapin-4/+4
2014-01-12Removed remnants of `@mut` and `~mut` from comments and the type system.Eduard Burtescu-2/+1
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-25/+25
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-3/+15
2014-01-03librustc: Remove `@mut` support from the parserPatrick Walton-7/+1
2013-12-16Fallout of rewriting std::commAlex Crichton-57/+55
2013-12-11Make 'self lifetime illegal.Erik Price-3/+3
Also remove all instances of 'self within the codebase. This fixes #10889.