summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
AgeCommit message (Collapse)AuthorLines
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-0/+2
2014-01-01Remove `extern mod foo (name="bar")` syntax, closes #9543Florian Hahn-1/+1
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-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-181/+85
2013-12-11Make 'self lifetime illegal.Erik Price-18/+18
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-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-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-2/+2
2013-11-28Register new snapshotsAlex Crichton-81/+81
2013-11-26librustc: Remove non-procedure uses of `do` from librustc, librustdoc,Patrick Walton-37/+35
and librustpkg.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-3/+3
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-2/+2
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-11Move std::rt::io to std::ioAlex Crichton-4/+4
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-1/+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-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-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-10-22Drop the '2' suffix from logging macrosAlex Crichton-8/+8
Who doesn't like a massive renaming?
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-18Fix struct field visibility and add enum field docSteven Fackler-0/+20
Struct fields with inherited visibility were previously stripped. Closes #9899
2013-10-17rustdoc: Don't treat "super" specially for urlsAlex Crichton-3/+12
This was just incorrectly handled before, the path component shouldn't be looked at at all (we used absolute paths everywhere instead of relative to the current module location). Closes #9861
2013-10-16auto merge of #9833 : alexcrichton/rust/fixes, r=brsonbors-2/+2
Commits have all the fun details
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-1/+1
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-15/+15
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-34/+33
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-14rustdoc: Don't abort if there's nothing to documentAlex Crichton-1/+1
Instead there's no index.html file emitted because there wasn't anything to document. Closes #9828
2013-10-14rustdoc: Use privacy visibility for pruningAlex Crichton-1/+1
This commit ends rustdoc's approximation of privacy and instead uses the result of the various compiler passes instead. Closes #9827
2013-10-13Make Rustdoc strip private fieldsSteven Fackler-2/+12
In addition, the renderer will add comments to structs and enums saying that fields or variants have been stripped.
2013-10-07Fix existing privacy/visibility violationsAlex Crichton-1/+1
This commit fixes all of the fallout of the previous commit which is an attempt to refine privacy. There were a few unfortunate leaks which now must be plugged, and the most horrible one is the current `shouldnt_be_public` module now inside `std::rt`. I think that this either needs a slight reorganization of the runtime, or otherwise it needs to just wait for the external users of these modules to get replaced with their `rt` implementations. Other fixes involve making things pub which should be pub, and otherwise updating error messages that now reference privacy instead of referencing an "unresolved name" (yay!).
2013-10-03rustdoc: Document what's going on throughoutAlex Crichton-13/+146
This addresses some of @huonw's in #9691 about the startling lack of documentation guiding one throughout the innards of rustdoc::html
2013-10-02rustdoc: Generate hyperlinks between cratesAlex Crichton-19/+55
The general idea of hyperlinking between crates is that it should require as little configuration as possible, if any at all. In this vein, there are two separate ways to generate hyperlinks between crates: 1. When you're generating documentation for a crate 'foo' into folder 'doc', then if foo's external crate dependencies already have documented in the folder 'doc', then hyperlinks will be generated. This will work because all documentation is in the same folder, allowing links to work seamlessly both on the web and on the local filesystem browser. The rationale for this use case is a package with multiple libraries/crates that all want to link to one another, and you don't want to have to deal with going to the web. In theory this could be extended to have a RUST_PATH-style searching situtation, but I'm not sure that it would work seamlessly on the web as it does on the local filesystem, so I'm not attempting to explore this case in this pull request. I believe to fully realize this potential rustdoc would have to be acting as a server instead of a static site generator. 2. One of foo's external dependencies has a #[doc(html_root_url = "...")] attribute. This means that all hyperlinks to the dependency will be rooted at this url. This use case encompasses all packages using libstd/libextra. These two crates now have this attribute encoded (currently at the /doc/master url) and will be read by anything which has a dependency on libstd/libextra. This should also work for arbitrary crates in the wild that have online documentation. I don't like how the version is hard-wired into the url, but I think that this may be a case-by-case thing which doesn't end up being too bad in the long run. Closes #9539
2013-10-02Make source links highlight the entire definition and not just the first lineJordi Boggiano-2/+7
2013-10-01Migrate users of 'loop' to 'continue'Alex Crichton-6/+6
Closes #9467
2013-10-01auto merge of #9636 : alexcrichton/rust/rustdoc, r=huonwbors-35/+113
Commits have all the juicy details. Import thing to note in this pull request is that `rustdoc html crate.rs` becomes `rustdoc crate.rs`
2013-09-30rustdoc: Remove usage of fmt!Alex Crichton-1/+1
2013-09-30rustdoc: Don't ignore dox on impl blocksAlex Crichton-12/+36
Closes #9611
2013-09-30rustdoc: Stop ignoring dox on fields/variantsAlex Crichton-11/+34
This is progress towards #9611
2013-09-30rustdoc: Use a BufferedWriter when emitting sourceAlex Crichton-2/+12
This takes the rendering time of source files for libstd from 12.5s to 0.1s, turns out write! calls the write function *a lot*
2013-09-30rustdoc: Add the ability to input jsonAlex Crichton-7/+24
This modifies the command-line usage of rustdoc to intake its own JSON output as well as a rust source file. This also alters the command line from `rustdoc input file` to `rustdoc file` with the input/output formats specified as -r and -w, respectively. When using a JSON input, no passes or plugins are re-run over the json, instead the output is generated directly from the JSON that was provided. Passes and plugins are still run on rust source input, however.