1025 Commits

Author SHA1 Message Date
Ruud van Asseldonk
67380065d9 Make rustdoc output comply with licenses
The output of rustdoc includes resources licensed under the SIL Open
Font License, the MIT license, and the Apache License 2.0. All of these
licenses permit redistribution provided that the license text is also
redistributed. Previously this was not the case, making rustdoc output
unsuitable for distribution by default. This resolves that problem by
including the license texts in rustdoc output.
2015-09-19 10:42:03 +01:00
Nick Cameron
e9f1b06329 Use ast attributes every where (remove HIR attributes).
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-16 10:57:06 +12:00
Jan-Erik Rediger
7f5ec6c392 Disable browser history API on file:/ URLs
history.pushState is defined, but not working whenever document.origin is "null"
(literally that string, not just the null object).
This is due to some security considerations and is unlikely to be ever working.

For now just disable the usage of the history API when the documentation
is accessed through a file:/ URL.

See https://code.google.com/p/chromium/issues/detail?id=301210 for a
Chrome-specific issue on the history API on file:/ URLs

Closes #25953
2015-09-14 22:48:34 +02:00
Kang Seonghoon
e98fa0e88f rustdoc: Tweak the main template and CSS for semantic mark-up.
- section.sidebar -> nav.sidebar, also added an unordered list.
- div#help -> aside#help, also added a hidden heading.
- the current crate is now emphasized in the sidebar.

Fixes #16310.
2015-09-09 00:49:23 +09:00
Vadim Petrochenkov
405c616eaf Use consistent terminology for byte string literals
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03 10:54:53 +03:00
Nick Cameron
facdf2ebb1 Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00
bors
fd7344c4fe Auto merge of #27945 - Eljay:upgrade-hoedown, r=alexcrichton
Some hoedown FFI changes:
- `HOEDOWN_EXT_NO_INTRA_EMPHASIS` constant changed.
- Updated/tidied up all callback function signatures.
- All opaque data access has an additional layer of indirection for some reason (`hoedown_renderer_data`).

This also fixes #27862.
2015-08-25 01:10:55 +00:00
Eljay
efc98fab26 Update hoedown to latest version (3.0.4). 2015-08-24 19:21:08 +01:00
Niko Matsakis
e91bef2e05 fallout from moving def-id 2015-08-24 05:35:34 -04:00
bors
e617a17369 Auto merge of #27919 - Eljay:doc-varargs, r=alexcrichton
Fixes #27876.
2015-08-23 04:24:35 +00:00
Lee Jeffery
90ed188c14 Show variadic args in rustdoc output. 2015-08-20 18:27:53 +01:00
Martin Wernstål
10d08f0466 rustdoc: Removed command line option issue-tracker-base-url 2015-08-17 20:24:28 +02:00
Martin Wernstål
d893145cae rustdoc: Adjusted style for unstable feature-name 2015-08-17 20:23:47 +02:00
Martin Wernstål
ed02a768ef librustdoc: Fix tidy 2015-08-16 23:06:57 +02:00
Martin Wernstål
9698e8fd17 rustdoc: Print feature flag and issue link if present in short_stability 2015-08-16 22:15:26 +02:00
Martin Wernstål
b31038764d rustdoc: Pass the Context down to short_stability() 2015-08-16 22:15:26 +02:00
Martin Wernstål
440c0f07c3 rustdoc: Added issue tracker option and issue data to clean::Stability 2015-08-16 22:15:26 +02:00
Robin Kruppe
16ec84b75f Correct signature of hoedown callback for codespans 2015-08-16 16:49:10 +02:00
Alex Crichton
737397c584 rollup merge of #27622: eefriedman/https-url
Also fixes a few outdated links.
2015-08-11 22:11:25 -07:00
Eli Friedman
bbbfed2f93 Use https URLs to refer to rust-lang.org where appropriate.
Also fixes a few outdated links.
2015-08-09 14:28:46 -07:00
Sean McArthur
cfcd449c4c rustc: rename multiple imports in a list 2015-08-08 11:54:15 -07:00
Eljay
acf9d6768e Improve rustdoc search type filtering. 2015-08-04 16:40:23 +01:00
Oliver Schneider
00a5e66f81 remove get_ident and get_name, make as_str sound 2015-07-28 18:07:20 +02:00
Alex Crichton
b3aa1a6d4a std: Deprecate a number of unstable features
Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are:

* cmp_partial
* fs_time
* hash_default
* int_slice
* iter_min_max
* iter_reset_fuse
* iter_to_vec
* map_in_place
* move_from
* owned_ascii_ext
* page_size
* read_and_zero
* scan_state
* slice_chars
* slice_position_elem
* subslice_offset
2015-07-27 16:38:25 -07:00
bors
238765e1eb Auto merge of #27103 - wthrowe:doc_format, r=alexcrichton
This fixes a couple of bugs visible on https://doc.rust-lang.org/nightly/std/marker/trait.Sync.html .  For example:
* `impl<T> Sync for *const T` should read `impl<T> !Sync for *const T`
* `impl<T> !Sync for Weak<T>` should read `impl<T> !Sync for Weak<T> where T: ?Sized`

This does change a struct in librustdoc and it seems that almost everything there is marked public, so if librustdoc has stability guarantees that could be a problem.  If it is, I'll find a way to rework the change to avoid modifying public structures.
2015-07-21 01:41:22 +00:00
Andreas Tolfsen
6b64826469 librustdoc: blur page when help dialogue is present
Blurs the document's background when the help dialogue is present,
making the contents of the dialogue stand out more.
2015-07-20 11:36:47 +01:00
William Throwe
456770472b Fix rustdoc formatting of impls
Some cases displayed negative impls as positive, and some were missing
where clauses.  This factors all the impl formatting into one
function so the different cases can't get out of sync again.
2015-07-18 02:26:58 -04:00
Tamir Duberstein
b3a9cd3a69 DRY 2015-07-17 14:35:09 -04:00
Steve Klabnik
c9e6d9a323 Merge branch 'fix-26673' of https://github.com/nhowell/rust into rollup_central 2015-07-16 17:55:19 -04:00
Manish Goregaokar
3a5bc736ae Rollup merge of #26977 - brson:stddoc, r=Gankro
Yet another attempt to make the prose on the std crate page
clearer and more informative.

This does a lot of things: tightens up the opening, adds useful links
(including a link to the search bar), offers guidance on how to use
the docs, and expands the prelude docs as a useful newbie entrypoint.

r? @steveklabnik cc @aturon
2015-07-16 10:48:47 +05:30
Brian Anderson
3a180d15f8 Address feedback 2015-07-13 18:38:00 -07:00
Ivan Ukhov
71e7fee803 Set zero padding for pre tags 2015-07-12 19:42:42 -04:00
bors
05d8767289 Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton
Fixes #26900
2015-07-12 22:05:59 +00:00
Manish Goregaokar
1cf7b1e938 Rollup merge of #26967 - tsurai:master, r=steveklabnik
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples.

Documentation:
```rust
pub struct String {
    // some fields omitted
}
```

Playground:
```rust
Struct std::String
            
                [−]
            
        [src]
```

r? @steveklabnik
2015-07-12 18:35:54 +05:30
Manish Goregaokar
ad930f4145 Rollup merge of #26881 - andreastt:international_keyboard, r=alexcrichton
Avoids some code duplication and relies less on deprecated properties on `KeyboardEvent`.  The code is still looking quite bad, but that’s primarily because interop in this area is a disaster zone.
2015-07-12 18:35:54 +05:30
bors
b8bb908d88 Auto merge of #26882 - andreastt:style_improvements, r=alexcrichton
Sharpens the help dialogues edges by removing border-padding, which
matches better with the rest of the document.

Also increases somewhat the rounded edges of the key symbols to
make it clear they are symbols.

Also introduces closing apostrophes and ellipsis for search field
placeholder.
2015-07-11 21:48:44 +00:00
Cristian Kubis
9e9698213c doc: remove playground links for structs and traits 2015-07-11 13:48:10 +02:00
Wesley Wiser
93ddee6cee Change some instances of .connect() to .join() 2015-07-10 19:40:46 -04:00
Cristian Kubis
682a007d24 doc: set playground to nightly for unstable code 2015-07-10 09:40:44 +02:00
Ulrik Sverdrup
836f32e769 Use vec![elt; n] where possible
The common pattern `iter::repeat(elt).take(n).collect::<Vec<_>>()` is
exactly equivalent to `vec![elt; n]`, do this replacement in the whole
tree.

(Actually, vec![] is smart enough to only call clone n - 1 times, while
the former solution would call clone n times, and this fact is
virtually irrelevant in practice.)
2015-07-09 11:05:32 +02:00
Andreas Tolfsen
8792c5c040 librustdoc: generalise handling of keyboard shortcuts 2015-07-08 13:12:18 +01:00
Andreas Tolfsen
885e701f0b librustdoc: sharpen help dialogue edges
Sharpens the help dialogues edges by removing border-padding, which
matches better with the rest of the document.

Also increases somewhat the rounded edges of the key symbols to
make it clear they are symbols.

Also introduces closing apostrophes and ellipsis for search field
placeholder.
2015-07-08 13:10:39 +01:00
Nick Howell
b51aea3256 rustdoc: Update jQuery from 2.1.0 to 2.1.4 2015-07-01 23:54:55 -04:00
Nick Howell
36882a0007 rustdoc: Reset the title when pressing the back button
Fixes #26673
2015-07-01 23:28:54 -04:00
Mathieu David
49b73e46d6 In js from the docs, change keyboard eventlistener to be compatible with non-english keyboard layouts. Fixes #26016 Fixes #16572 2015-07-01 10:11:23 +02:00
bors
2287b4b628 Auto merge of #26037 - nhowell:plain_js_playpen, r=steveklabnik
Since the "Book" already avoids jQuery in its inline script tags and playpen.js is tiny, I figured I would convert it to plain old JS as well.

Side note: This is a separate issue, but another thing I noticed in my testing is that the "⇱" character doesn't display correctly in Chrome on Windows 7. (Firefox and IE work fine; other browsers not tested)

r? @steveklabnik

Edit: Github didn't like the "script" tag above
Edit 2: Actually, now IE seems to render "⇱" fine for me. Odd.
2015-06-22 05:23:50 +00:00
Johannes Oertel
d234b0bb5f rustdoc: Update document title when displaying search results
Fixes #26360.
2015-06-18 18:39:31 +02:00
Mihnea Dobrescu-Balaur
434684bc9e Find type of orphan methods for rustdoc search. 2015-06-14 14:35:44 +03:00
Nick Howell
95dc32dde6 Convert playpen.js to plain JS.
It is still compatible with IE9+.

This removes the jQuery dependency from the "Book" entirely.
2015-06-12 16:26:07 -04:00
Joshua Landau
d7f5fa4636 Conver reborrows to .iter() calls where appropriate 2015-06-11 13:56:07 +01:00