summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-3/+19
2014-01-03librustc: Remove `@mut` support from the parserPatrick Walton-7/+1
2014-01-01Remove `extern mod foo (name="bar")` syntax, closes #9543Florian Hahn-1/+1
2013-12-30rustdoc: Unify the handling of the hidden example lines.Huon Wilson-6/+15
2013-12-30rustdoc: only filter lines starting with '# ' from the shown code.Huon Wilson-2/+4
Currently any line starting with `#` is filtered from the output, including line like `#[deriving]`; this patch makes it so lines are only filtered when followed by a space similar to the current behaviour of the tutorial/manual tester.
2013-12-23rustdoc: Add the ability to test code in commentsAlex Crichton-6/+84
This adds support for the `--test` flag to rustdoc which will parse a crate, extract all code examples in doc comments, and then run each test in the extra::test driver.
2013-12-22std::vec: make the sorting closure use `Ordering` rather than just beingHuon Wilson-28/+28
(implicitly) less_eq.
2013-12-21std::vec: add a sugary .sort() method for plain Ord sorting.Huon Wilson-1/+1
This moves the custom sorting to `.sort_by`.
2013-12-20extra: remove sort in favour of the std method.Huon Wilson-8/+6
Fixes #9676.
2013-12-18auto merge of #11029 : huonw/rust/rm-vec-as-buf, r=cmrbors-3/+2
For `str.as_mut_buf`, un-closure-ification is achieved by outright removal (see commit message). The others are replaced by `.as_ptr`, `.as_mut_ptr` and `.len`
2013-12-19std::str: replace .as_imm_buf with .as_ptr.Huon Wilson-3/+2
2013-12-18rustdoc: thread through the context for renderingCorey Richardson-3/+9
This partially reverts 8b5a317.
2013-12-17auto merge of #11018 : sfackler/rust/variant-strip, r=alexcrichtonbors-1/+1
Previously, if every variant was private, it would display as a variantless enum instead of having the "some variants stripped" comment.
2013-12-17Fix rustdoc HTML renderingCorey Richardson-9/+8
By returning the items to process and storing them in a queue, we were losing the context that was setup for that item during the recursion. This is an easy fix, rather than hoisting out the state that it needs.
2013-12-16Fix rustdoc output of enums with private variantsSteven Fackler-1/+1
Previously, if every variant was private, it would display as a variantless enum instead of having the "some variants stripped" comment.
2013-12-16Fallout of rewriting std::commAlex Crichton-238/+140
2013-12-13auto merge of #10849 : adridu59/rust/patch-css, r=alexcrichtonbors-5/+11
rustdoc: - fix search-bar layout doc: CSS: - switch to native pandoc toc depth - rm some dead code - clamp width to be readable (we're not Wikipedia!) - don't background-color titles, it's bloating - make syntax-highlighting colors inline with rust-lang.org - space indents @alexcrichton
2013-12-11Make 'self lifetime illegal.Erik Price-31/+31
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-10librustdoc: Remove a couple of `Cell`s.Patrick Walton-3/+2
2013-12-10librustdoc: Don't use `finally`, shaving off a `Cell`.Patrick Walton-13/+25
2013-12-08Remove dead codesKiet Tran-7/+0
2013-12-07rustdoc: fix the search-bar layoutAdrien Tétar-5/+11
Now with broader compatibility.
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-2/+2
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-01Add a type="search" to the search bar in the documentation.SiegeLord-1/+2
2013-12-01Add placeholder text to the search bar in the documentation.SiegeLord-1/+2
2013-11-29Add generation of static libraries to rustcAlex Crichton-1/+1
This commit implements the support necessary for generating both intermediate and result static rust libraries. This is an implementation of my thoughts in https://mail.mozilla.org/pipermail/rust-dev/2013-November/006686.html. When compiling a library, we still retain the "lib" option, although now there are "rlib", "staticlib", and "dylib" as options for crate_type (and these are stackable). The idea of "lib" is to generate the "compiler default" instead of having too choose (although all are interchangeable). For now I have left the "complier default" to be a dynamic library for size reasons. Of the rust libraries, lib{std,extra,rustuv} will bootstrap with an rlib/dylib pair, but lib{rustc,syntax,rustdoc,rustpkg} will only be built as a dynamic object. I chose this for size reasons, but also because you're probably not going to be embedding the rustc compiler anywhere any time soon. Other than the options outlined above, there are a few defaults/preferences that are now opinionated in the compiler: * If both a .dylib and .rlib are found for a rust library, the compiler will prefer the .rlib variant. This is overridable via the -Z prefer-dynamic option * If generating a "lib", the compiler will generate a dynamic library. This is overridable by explicitly saying what flavor you'd like (rlib, staticlib, dylib). * If no options are passed to the command line, and no crate_type is found in the destination crate, then an executable is generated With this change, you can successfully build a rust program with 0 dynamic dependencies on rust libraries. There is still a dynamic dependency on librustrt, but I plan on removing that in a subsequent commit. This change includes no tests just yet. Our current testing infrastructure/harnesses aren't very amenable to doing flavorful things with linking, so I'm planning on adding a new mode of testing which I believe belongs as a separate commit. Closes #552
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-2/+2
2013-11-28Register new snapshotsAlex Crichton-82/+82
2013-11-28rustdoc: Use new ||/proc syntaxklutzy-19/+23
2013-11-26librustc: Remove non-procedure uses of `do` from librustc, librustdoc,Patrick Walton-51/+49
and librustpkg.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-5/+5
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-3/+3
2013-11-24auto merge of #10603 : alexcrichton/rust/no-linked-failure, r=brsonbors-3/+4
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-24Remove linked failure from the runtimeAlex Crichton-3/+4
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-21Process ffi generics in rustdocAlex Crichton-8/+9
This prevents an assertion from being tripped because the generics weren't categorized. Closes #10597
2013-11-13doc: disable parser error highlighting + a few fixesAdrien Tétar-0/+1
CodeMirror parser errors are related to #9873.
2013-11-12doc: CSS: fix code fontsAdrien Tétar-1/+7
Closes #10330.
2013-11-11Move std::rt::io to std::ioAlex Crichton-7/+7
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-3/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-17/+19
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-2/+2
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-7/+8
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-38/+29
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-11-02auto merge of #10199 : alexcrichton/rust/no-propagate, r=brsonbors-0/+1
This commit removes the propagation of `link_args` attributes across crates. The first commit message has the reasons as to why. Additionally, this starts statically linking some C/C++ helper libraries that we have to their respective crates instead of throwing then in librustrt and then having everything depend on librustrt. The major downside of this movement is that we're losing the ability to control visible symbols. I couldn't figure out a way to internalize symbols from a static library during the linking process, so everyone who links to librustdoc will be able to use its sundown implementation (not exactly ideal). I'm not entirely sure how to fix this (beyond generating a list of all public symbols, including rust ones, and passing that to the linker), but we may have a much easier time with this once we start using llvm's linker toolchain. There's certainly a lot more possibilities in where this can go, but I didn't want to go too deep just yet. The main idea here is to stop propagating linker arguments and then see how we're able to start statically linking libraries as a result. r? @catamorphism, you're going to be working on linking soon, so feel free to completely throw this away for something else!
2013-11-01Rustdoc: Properly strip private modulesSteven Fackler-0/+5
A private module will survive the strip-private pass if it contains trait implementations, which aren't stripped until a separate pass in render.
2013-11-01Statically link sundown to librustdocAlex Crichton-0/+1
Closes #10103
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-8/+8
Who doesn't like a massive renaming?
2013-10-22auto merge of #10003 : alexcrichton/rust/issue-fixes, r=brsonbors-29/+63
Commits have all the fun details.
2013-10-21rustdoc: Render default methods for impls as wellAlex Crichton-29/+56
This does not work for cross-crate implementations of traits. Cross-crate implementations are a separate issue that should be addressed separately. Basically when an implementation of an external trait is detected, the trait would have to be loaded at that time (or possibly sooner...). Rustdoc currently doesn't have the proper infrastructure for adding this. Closes #9985 cc #9999
2013-10-21rustdoc: Don't overflow long type/module namesAlex Crichton-0/+7
Closes #9862