Commit Graph

31386 Commits

Author SHA1 Message Date
Huon Wilson
e753dbb431 rustc: use Name numbers rather than the Show impl for constants.
Using the Show impl for Names created global symbols with names like
`"str\"str\"(1027)"`. This adjusts strings, binaries and vtables to
avoid using that impl.

Fixes #15799.
2014-08-04 16:32:35 +10:00
bors
765a23f73d auto merge of #16233 : omasanori/rust/abs_sub, r=steveklabnik
Use proper argument names and unbackquote the word "zero" because it is not an identifier.
2014-08-04 05:16:35 +00:00
OGINO Masanori
3e6edee002 num: Fix the documentation of abs_sub.
Use proper argument names and unbackquote the word "zero" because it is
not an identifier.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-04 14:04:28 +09:00
bors
d3ac386ea9 auto merge of #16139 : michaelwoerister/rust/rlib-bc-versioning, r=alexcrichton
Before this commit, the LLVM IR of exported items was simply zip-compressed and stored as an object file inside rlib archives. This commit adds a header to this "object" containing a file identifier and a format version number so the compiler can deal with changes in the way bytecode objects are stored within rlibs.

While updating the format of bytecode objects, this commit also worksaround a problem in LLDB which could not handle odd-sized objects within archives before mid-2014.

Fixes #15950.
2014-08-04 01:31:09 +00:00
Michael Sproul
806e4f0b14 Gedit/GTKSourceView: Add macro syntax highlighting. 2014-08-04 11:28:37 +10:00
bors
25741603fe auto merge of #16215 : cakebaker/rust/remove_bin_section_from_toml, r=alexcrichton
According to the [source code](https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_new.rs#L31) <code>cargo new</code> doesn't generate a <code>[[bin]]</code> section in the <code>Cargo.toml</code>, hence removing it from the example.
2014-08-03 23:46:10 +00:00
Tshepang Lekhonkhobe
349afcfa74 doc: make the sentence make more sense 2014-08-03 21:08:49 +02:00
Michael Woerister
ff0fa8f1d1 Use a versioning scheme for bytecode objects in rlibs.
Before this commit, the LLVM IR of exported items was simply zip-compressed and stored as an object file inside rlib archives. This commit adds a header to this "object" containing a file identifier and a format version number so the compiler can deal with changes in the way bytecode objects are stored within rlibs.

While updating the format of bytecode objects, this commit also worksaround a problem in LLDB which could not handle odd-sized objects within archives before mid-2014.
2014-08-03 20:27:06 +02:00
bors
d34e011b8e auto merge of #16209 : tomjakubowski/rust/rustdoc-html-changes, r=alexcrichton
This PR introduces a couple of minor changes to the rustdoc html templates:

1. The `<meta name="generator" content="rustdoc">` tag now appears in API documentation as well.
2. Adds a `rustdoc` class to the top-level `<body>` tag on all HTML pages.

The second point is a nice-to-have for those who would like to apply a user stylesheet to Rust documentation regardless of where it is hosted. Easier use of user stylesheets may alleviate much of the bikeshedding of personal taste on the rustdoc styles.
2014-08-03 17:01:06 +00:00
OGINO Masanori
bf2d98e190 Remove the "NFKC clause" in the reference manual.
The reference manual said that code is interpreted as UTF-8 text and a
implementation will normalize it to NFKC. However, rustc doesn't do
any normalization now.

We may want to do any normalization for symbols, but normalizing whole
text seems harmful because doing so loses some sort of information even
if we choose a non-K variant of normalization.

I'd suggest removing "normalized to Unicode normalization form NFKC"
phrase for the present so that the manual represents the current state
properly. When we address the problem (with a RFC?), then the manual
should be updated.

Closes #12388.

Reference: https://github.com/rust-lang/rust/issues/2253

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-03 23:41:05 +09:00
bors
8b9ab0d912 auto merge of #16212 : huonw/rust/unicode-gitignore, r=pnkfelix 2014-08-03 14:01:06 +00:00
Daniel Hofstetter
7ba9c44b94 Remove "bin" section from Cargo.toml 2014-08-03 14:19:05 +02:00
bors
845ff6567f auto merge of #16203 : Gankro/rust/vec_flow, r=alexcrichton
fixes #16200
2014-08-03 11:36:07 +00:00
bors
9a3b25fa98 auto merge of #16202 : db48x/rust/eq-for-time-tm, r=alexcrichton 2014-08-03 09:56:07 +00:00
bors
ed264286dd auto merge of #16198 : cakebaker/rust/remove_unused_tuple_struct, r=steveklabnik 2014-08-03 08:11:10 +00:00
Huon Wilson
c41c1edf3b gitignore: Add the autogenerated/downloaded unicode data files. 2014-08-03 17:32:53 +10:00
bors
ce01b4b1b7 auto merge of #16155 : huonw/rust/Ordering-reverse, r=alexcrichton
This flips the comparison and is designed to be used when sorting etc.
2014-08-03 06:31:09 +00:00
bors
055e25acbe auto merge of #16194 : omasanori/rust/gitignore, r=alexcrichton
I also sorted lines in .gitignore. The file might include some obsoleted lines but I left.
2014-08-03 04:51:10 +00:00
bors
46d1ee72ac auto merge of #16191 : DaGenix/rust/fix-aligned-access, r=alexcrichton
When I originally wrote the read_u32v_be() and write_u32_be() functions, I didn't consider memory alignment requirements of various architectures. Unfortunately, the current implementations may result in unaligned reads and writes. This doesn't impact x86 / x86_64, but it can cause a compiler crash on ARM. This pull requests rewrites those functions to make sure that all memory access is always correctly aligned.

This fix is a little bit academic - due to the way that LLVM aligns the structures that are passed as arguments to these functions, I believe that the end result is that all memory access happens to be aligned anyway. However, there is nothing in that code that actually enforces that, at least not explicitly. The new implementations are definitely slower than the existing ones. However, I don't believe that these functions are all that significant when looking at the overall performance of the compiler. I think getting rid of some unsafe code and removing a potential portability landmine justifies a very slight decrease in raw performance.
2014-08-03 03:06:12 +00:00
Tom Jakubowski
9b44dfc764 rustdoc: Add rustdoc class to <body> tag
This allows for easier application of user stylesheets to rustdocs no
matter where they are hosted.
2014-08-02 18:59:59 -07:00
Huon Wilson
7df277115a core: add a reverse method to Ordering.
This flips the comparison and is designed to be used when sorting etc.
2014-08-03 11:50:19 +10:00
Tom Jakubowski
1c6ee3f27d rustdoc: Add generator meta tag to API docs
This is consistent with the meta tag in Markdown docs run through
rustdoc.
2014-08-02 18:21:33 -07:00
bors
12306da80c auto merge of #16189 : steveklabnik/rust/gh15494, r=alexcrichton
Fixes #15494.
2014-08-03 01:21:08 +00:00
bors
4d4eb10230 auto merge of #16186 : steveklabnik/rust/guide_cargo_new, r=alexcrichton
Two commits here: one to add `cargo new` to the guide, and a second to mention the lockfile that Cargo now generates.
2014-08-02 23:36:09 +00:00
bors
756b7b23c4 auto merge of #16180 : jbcrail/rust/fix-comments, r=steveklabnik 2014-08-02 21:51:10 +00:00
bors
147d117cff auto merge of #16169 : Gankro/rust/simple-docs, r=cmr
<strike>Adds a simple/detailed toggle to api doc pages.
Detailed mode is the current behaviour, simple mode hides all doccomment details leaving only signatures for quick browsing.
</strike>
Adds [expand all] and [collapse all] "links" to all api doc pages. All doccomments are collapsed, leaving only signatures for quick browsing.

In addition, clicking on a <strike>function name</strike> function's [toggle details] link now toggles the visibility of the associated doccomment.

--------

# [Live Build Here](http://cg.scs.carleton.ca/~abeinges/doc/std/vec/struct.Vec.html)

This is something that's been bothering me, and I've seen some people mention in IRC before. The docs are *great* if you want a full in-depth look at an API, but *awful* if you want to scan them. This provides the ability to toggle complexity freely. Interacts perfectly well with noscript, since the static page is effectively unchanged. Collapsing is just hiding divs with css.

I'm not much of a designer, so design input welcome on the actual UX for toggling.

The actual javascript is *a bit* brittle to layout changes, but it always will be without adding lots of extra junk to the actual markup, which didn't seem worth it.
2014-08-02 20:06:11 +00:00
Alexis Beingessner
d9b2e6b74f fix underflow in vec swap_remove
fixes #16200
2014-08-02 14:50:29 -04:00
Alex Crichton
2677e5f4a0 native: Fix utime() for windows
Apparently the units are in milliseconds, not in seconds!
2014-08-02 10:52:49 -07:00
Daniel Brooks
cbf407c8d0 time::Tm should impl Eq in addition to PartialEq 2014-08-02 10:25:32 -07:00
bors
432042ac14 auto merge of #16183 : brson/rust/doctitles, r=alexcrichton 2014-08-02 17:21:09 +00:00
OGINO Masanori
821262f30e Use globs to ignore target directories.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-03 02:14:37 +09:00
OGINO Masanori
5ebda6d39d Sort .gitignore.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-03 02:14:37 +09:00
Alexis Beingessner
88fe6dfa31 Add hide/show detail toggles to rustdoc
All doccomments are now collapsable via a nearby [-] button
Adds [collapse all] and [expand all] buttons to the top of all api pages
Tweaks some layout to accomadate this
2014-08-02 13:12:12 -04:00
bors
032d5c1dcd auto merge of #16181 : brson/rust/colon, r=kballard 2014-08-02 15:36:09 +00:00
Daniel Hofstetter
867d8e6356 Remove unused tuple struct 2014-08-02 17:28:42 +02:00
bors
87bc22f587 auto merge of #16177 : nham/rust/collections_15294_eq_ord, r=alexcrichton
This implements:

 - Eq and Ord for DList, RingBuf, TreeMap and TreeSet
 - FromIterator and Extendable for BitvSet

cc #15294
2014-08-02 13:51:09 +00:00
bors
5bad333fec auto merge of #16175 : EduardoBautista/rust/fix-guessing-game-appearing-early, r=steveklabnik
Solves: https://github.com/rust-lang/rust/issues/16162
2014-08-02 12:06:09 +00:00
bors
1b44c5b0eb auto merge of #16165 : tinaun/rust/newcss, r=alexcrichton
remove unneeded `pre.rust a' selector

move transform into `.test-arrow`

fixes #16138
2014-08-02 10:21:11 +00:00
bors
020b91b436 auto merge of #16164 : anguslees/rust/rfc3999, r=alexcrichton
Fixes #16158
2014-08-02 08:36:09 +00:00
bors
5793b4211c auto merge of #16163 : anguslees/rust/strptime-str, r=alexcrichton
Also modernise a few constructs in match_strs().
2014-08-02 06:51:12 +00:00
Palmer Cox
fd69365ead Rewrite read_u32v_be() and write_u32_be() to make sure that all memory access is properly aligned 2014-08-02 01:21:02 -04:00
bors
71a42807ad auto merge of #16160 : EduardoBautista/rust/use-bang-at-end-of-hello-world, r=alexcrichton
Further into the guide "Hello, world!" is used instead of "Hello, world".
2014-08-02 05:06:11 +00:00
Steve Klabnik
cf279105d5 Fix manual regarding attribute placement.
Fixes #15494.
2014-08-01 23:12:14 -04:00
nham
7e5440ea9d Add a split_at method to slice::ImmutableVector
This method is similar to the mut_split_at method of slice::MutableVector.
2014-08-01 23:05:16 -04:00
Steve Klabnik
2b9c5d2f74 Add note about Cargo.lock 2014-08-01 22:58:16 -04:00
Steve Klabnik
1a80dcbd56 Use cargo new.
Now that this feature exists, we should use it.

Fixes #16078
2014-08-01 22:58:01 -04:00
bors
06727d4720 auto merge of #16128 : steveklabnik/rust/speed_faq, r=brson
Fixes #11174.

I'm open to revising this text, but I figured it gets across the basics.
2014-08-02 02:16:02 +00:00
Simon Persson
6aca20564f Fix alignment tests for ARM on Linux. #14848 2014-08-02 01:38:06 +00:00
Brian Anderson
fe13a9fb59 doc: Make sure all doc titles say 'Rust'. #12466 2014-08-01 17:32:24 -07:00
bors
d7cfc34a22 auto merge of #16119 : steveklabnik/rust/guide_pointers, r=brson
This is the next section of the guide, and it's on pointers. It's not done yet, as I need to write the section on ownership and borrowing, but I figured I'd share the rest now, to get feedback on the rest of it while I take some time to get that right.
2014-08-02 00:31:03 +00:00