]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoMerge commit '74ae05ad90d1e809663702f374bba6e62671692c' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:22 +0000 (11:25 -0700)]
Merge commit '74ae05ad90d1e809663702f374bba6e62671692c' into rollup

9 years agoMerge commit '881bfb1a180a1b545daa9da1539ec4c8ebda7ed1' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:14 +0000 (11:25 -0700)]
Merge commit '881bfb1a180a1b545daa9da1539ec4c8ebda7ed1' into rollup

9 years agoauto merge of #15865 : jamesrhurst/rust/ctags-regex, r=alexcrichton
bors [Wed, 6 Aug 2014 15:51:19 +0000 (15:51 +0000)]
auto merge of #15865 : jamesrhurst/rust/ctags-regex, r=alexcrichton

Previously the implementation detection regex would detect
`impl fmt::Show for MyStruct` as `fmt`. Now it will be detected as
`fmt::Show for MyStruct`. Implementations such as `impl MyStruct` will
still be detected as `MyStruct`.

9 years agoauto merge of #16276 : nham/rust/fix_marker_docs, r=steveklabnik
bors [Wed, 6 Aug 2014 13:21:27 +0000 (13:21 +0000)]
auto merge of #16276 : nham/rust/fix_marker_docs, r=steveklabnik

9 years agoauto merge of #16263 : brson/rust/morestack, r=alexcrichton
bors [Wed, 6 Aug 2014 10:26:30 +0000 (10:26 +0000)]
auto merge of #16263 : brson/rust/morestack, r=alexcrichton

9 years agoauto merge of #16258 : aturon/rust/stabilize-atomics, r=alexcrichton
bors [Wed, 6 Aug 2014 08:31:28 +0000 (08:31 +0000)]
auto merge of #16258 : aturon/rust/stabilize-atomics, r=alexcrichton

This commit stabilizes the `std::sync::atomics` module, renaming it to
`std::sync::atomic` to match library precedent elsewhere, and tightening
up behavior around incorrect memory ordering annotations.

The vast majority of the module is now `stable`. However, the
`AtomicOption` type has been deprecated, since it is essentially unused
and is not truly a primitive atomic type. It will eventually be replaced
by a higher-level abstraction like MVars.

Due to deprecations, this is a:

[breaking-change]

9 years agoauto merge of #16254 : brson/rust/rustdocmeta, r=aturon
bors [Wed, 6 Aug 2014 04:56:25 +0000 (04:56 +0000)]
auto merge of #16254 : brson/rust/rustdocmeta, r=aturon

This teach rustdoc to add `<meta name="description">` and `<meta name="keywords">` tags to crate docs. Description is important for search engines because they display it as the page description. Keywords are less useful but still generally recommended.

This also changes the "stability dashboard" link to just say "stability", because the current link takes up a lot of space.

cc https://github.com/rust-lang/rust/issues/12466

9 years agoRenamed `record_stack_bounds` for clarity.
Vadim Chugunov [Wed, 6 Aug 2014 03:53:42 +0000 (20:53 -0700)]
Renamed `record_stack_bounds` for clarity.
For a good measure, implemented target_record_stack_bounds for 32-bit Windows as well.

9 years agoauto merge of #16252 : conradkleinespel/rust/master, r=alexcrichton
bors [Wed, 6 Aug 2014 03:11:29 +0000 (03:11 +0000)]
auto merge of #16252 : conradkleinespel/rust/master, r=alexcrichton

I found the current docs to be a little confusing. I believe this makes them straight to the point and less confusing.

9 years agoAdded clarification regarding rust_try_inner.
Vadim Chugunov [Wed, 6 Aug 2014 02:07:38 +0000 (19:07 -0700)]
Added clarification regarding rust_try_inner.

9 years agosyntax: Handle \r\n in byte string literals
Alex Crichton [Tue, 5 Aug 2014 22:13:57 +0000 (15:13 -0700)]
syntax: Handle \r\n in byte string literals

This ended up passing through the lexer but dying later on in parsing when it
wasn't handled. The strategy taken was to copy the `str_lit` funciton, but adapt
it for bytes.

Closes #16278

9 years agoRemove references to `~[]` in core::kinds::marker docs.
nham [Tue, 5 Aug 2014 19:23:06 +0000 (15:23 -0400)]
Remove references to `~[]` in core::kinds::marker docs.

9 years agoauto merge of #16247 : TimDumol/rust/patch-1, r=alexcrichton
bors [Tue, 5 Aug 2014 19:06:23 +0000 (19:06 +0000)]
auto merge of #16247 : TimDumol/rust/patch-1, r=alexcrichton

The 30-minute intro had a comment mentioning that `+=` will be included in the future. It's already included, and this fixes it to use `+=`.

9 years agoauto merge of #15709 : hirschenberger/rust/issue-14269, r=cmr
bors [Tue, 5 Aug 2014 17:21:23 +0000 (17:21 +0000)]
auto merge of #15709 : hirschenberger/rust/issue-14269, r=cmr

Fixes missing overflow lint for i64 #14269

The `type_overflow` lint, doesn't catch the overflow for `i64` because the overflow happens earlier in the parse phase when the `u64` as biggest possible int gets casted to `i64` , without checking the for
overflows.
We can't lint in the parse phase, so we emit a compiler error, as we do for overflowing `u64`

Perhaps a consistent behaviour would be to emit a parse error for *all*  overflowing integer types.

See #14269

9 years agoauto merge of #16246 : ruud-v-a/rust/patch-1, r=brson
bors [Tue, 5 Aug 2014 15:36:23 +0000 (15:36 +0000)]
auto merge of #16246 : ruud-v-a/rust/patch-1, r=brson

9 years agoauto merge of #16243 : alexcrichton/rust/fix-utime-for-windows, r=brson
bors [Tue, 5 Aug 2014 13:11:20 +0000 (13:11 +0000)]
auto merge of #16243 : alexcrichton/rust/fix-utime-for-windows, r=brson

Apparently the units are in milliseconds, not in seconds!

9 years agoauto merge of #16234 : cakebaker/rust/rename_guessing_game_rs_to_main_rs, r=steveklabnik
bors [Tue, 5 Aug 2014 11:31:22 +0000 (11:31 +0000)]
auto merge of #16234 : cakebaker/rust/rename_guessing_game_rs_to_main_rs, r=steveklabnik

Follow-up to #16215

9 years agoauto merge of #16231 : michaelsproul/rust/gedit-macro, r=alexcrichton
bors [Tue, 5 Aug 2014 09:51:23 +0000 (09:51 +0000)]
auto merge of #16231 : michaelsproul/rust/gedit-macro, r=alexcrichton

Gedit currently lacks syntax highlighting for macros.

9 years agoauto merge of #16216 : omasanori/rust/nfkc, r=brson
bors [Tue, 5 Aug 2014 08:06:25 +0000 (08:06 +0000)]
auto merge of #16216 : omasanori/rust/nfkc, r=brson

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

9 years agoFixes missing overflow lint for i64 #14269
Falco Hirschenberger [Tue, 5 Aug 2014 07:59:03 +0000 (09:59 +0200)]
Fixes missing overflow lint for i64 #14269

The `type_overflow` lint, doesn't catch the overflow for `i64` because
the overflow happens earlier in the parse phase when the `u64` as biggest
possible int gets casted to `i64` , without checking the for overflows.
We can't lint in the parse phase, so a refactoring of the `LitInt` type
was necessary.

The types `LitInt`, `LitUint` and `LitIntUnsuffixed` where merged to one
type `LitInt` which stores it's value as `u64`. An additional parameter was
added which indicate the signedness of the type and the sign of the value.

9 years agoRemove obsolete stack growth tests
Brian Anderson [Tue, 5 Aug 2014 04:51:31 +0000 (21:51 -0700)]
Remove obsolete stack growth tests

9 years agoauto merge of #16188 : nham/rust/immut_slice_split_at, r=brson
bors [Tue, 5 Aug 2014 03:21:27 +0000 (03:21 +0000)]
auto merge of #16188 : nham/rust/immut_slice_split_at, r=brson

This operation seems common enough that it would be convenient for it to be a standard method.

9 years agoauto merge of #16187 : steveklabnik/rust/gh15830, r=alexcrichton
bors [Tue, 5 Aug 2014 01:41:25 +0000 (01:41 +0000)]
auto merge of #16187 : steveklabnik/rust/gh15830, r=alexcrichton

Fixes #15830.

9 years agoFix tests.
Vadim Chugunov [Fri, 1 Aug 2014 08:51:08 +0000 (01:51 -0700)]
Fix tests.

9 years agoImplement unwinding for Win64.
Vadim Chugunov [Thu, 10 Apr 2014 17:48:38 +0000 (10:48 -0700)]
Implement unwinding for Win64.
The original trick used to trigger unwinds would not work with GCC's implementation of SEH, so I had to invent a new one: rust_try now consists of two routines: the outer one, whose handler triggers unwinds, and the inner one, that stops unwinds by having a landing pad that swallows exceptions and passes them on to the outer routine via a normal return.

9 years agoUpdate LLVM
Vadim Chugunov [Fri, 1 Aug 2014 09:23:05 +0000 (02:23 -0700)]
Update LLVM

9 years agoFix crash in OsRng when compiling with -O.
Vadim Chugunov [Mon, 28 Jul 2014 20:35:34 +0000 (13:35 -0700)]
Fix crash in OsRng when compiling with -O.

9 years agoUse gcc for cross-build linking, not g++.
Vadim Chugunov [Sat, 5 Jul 2014 07:53:46 +0000 (00:53 -0700)]
Use gcc for cross-build linking, not g++.

9 years agoUse mingw64 target spelling.
Vadim Chugunov [Sat, 5 Jul 2014 07:52:32 +0000 (00:52 -0700)]
Use mingw64 target spelling.

9 years agolibnative should not mess with stack limits in the TIB. Only libgreen has a legitima...
Vadim Chugunov [Sat, 5 Jul 2014 07:47:09 +0000 (00:47 -0700)]
libnative should not mess with stack limits in the TIB.  Only libgreen has a legitimate need to set them.

9 years agoEnsure that Registers struct is 16-byte aligned on x86_64.
Vadim Chugunov [Sat, 5 Jul 2014 07:42:58 +0000 (00:42 -0700)]
Ensure that Registers struct is 16-byte aligned on x86_64.
This is important when building with --disable-jemalloc: unlike jemalloc,  msvcrt does not align on 16 bytes unless asked to.

9 years agoFix valgrind.h for Win64.
Vadim Chugunov [Sat, 5 Jul 2014 08:02:53 +0000 (01:02 -0700)]
Fix valgrind.h for Win64.
_WIN32 is defined for 64-bit builds as well, so test for _WIN64 first.

9 years agoauto merge of #16179 : SimonPersson/rust/master, r=brson
bors [Tue, 5 Aug 2014 00:01:28 +0000 (00:01 +0000)]
auto merge of #16179 : SimonPersson/rust/master, r=brson

This should solve issue 14848 for ARM.

9 years agostabilize atomics (now atomic)
Aaron Turon [Mon, 4 Aug 2014 22:42:36 +0000 (15:42 -0700)]
stabilize atomics (now atomic)

This commit stabilizes the `std::sync::atomics` module, renaming it to
`std::sync::atomic` to match library precedent elsewhere, and tightening
up behavior around incorrect memory ordering annotations.

The vast majority of the module is now `stable`. However, the
`AtomicOption` type has been deprecated, since it is essentially unused
and is not truly a primitive atomic type. It will eventually be replaced
by a higher-level abstraction like MVars.

Due to deprecations, this is a:

[breaking-change]

9 years agoauto merge of #16110 : alexcrichton/rust/issue-15460, r=brson
bors [Mon, 4 Aug 2014 22:21:25 +0000 (22:21 +0000)]
auto merge of #16110 : alexcrichton/rust/issue-15460, r=brson

As discovered in #15460, a particular #[link(kind = "static", ...)] line is not
actually guaranteed to link the library at all. The reason for this is that if
the external library doesn't have any referenced symbols in the object generated
by rustc, the entire library is dropped by the linker.

For dynamic native libraries, this is solved by passing -lfoo for all downstream
compilations unconditionally. For static libraries in rlibs this is solved
because the entire archive is bundled in the rlib. The only situation in which
this was a problem was when a static native library was linked to a rust dynamic
library.

This commit brings the behavior of dylibs in line with rlibs by passing the
--whole-archive flag to the linker when linking native libraries. On OSX, this
uses the -force_load flag. This flag ensures that the entire archive is
considered candidate for being linked into the final dynamic library.

This is a breaking change because if any static library is included twice in the
same compilation unit then the linker will start emitting errors about duplicate
definitions now. The fix for this would involve only statically linking to a
library once.

Closes #15460
[breaking-change]

9 years agoClarify Argument docs.
Steve Klabnik [Mon, 4 Aug 2014 19:57:54 +0000 (15:57 -0400)]
Clarify Argument docs.

Fixes #15830.

9 years agorustdoc: Just "stability" instead of "stability dashboard"
Brian Anderson [Mon, 4 Aug 2014 21:31:53 +0000 (14:31 -0700)]
rustdoc: Just "stability" instead of "stability dashboard"

The words "stability dashboard" take up too much space on small screens.

9 years agorustdoc: Emit keywords for all crate pages
Brian Anderson [Mon, 4 Aug 2014 21:30:06 +0000 (14:30 -0700)]
rustdoc: Emit keywords for all crate pages

cc #12466

9 years agorustdoc: Put field instantiation in declaration order.
Brian Anderson [Mon, 4 Aug 2014 21:15:47 +0000 (14:15 -0700)]
rustdoc: Put field instantiation in declaration order.

cc #12466

9 years agorustdoc: Use more descriptive description metadata.
Brian Anderson [Mon, 4 Aug 2014 20:53:33 +0000 (13:53 -0700)]
rustdoc: Use more descriptive description metadata.

This text appears in and improves search results.

cc #12466

9 years agolibgetopts: tweak HasHarg/Occur docs.
Conrad Kleinespel [Mon, 4 Aug 2014 19:43:30 +0000 (21:43 +0200)]
libgetopts: tweak HasHarg/Occur docs.

9 years agoauto merge of #16251 : apoelstra/rust/tcp-fix, r=alexcrichton
bors [Mon, 4 Aug 2014 20:41:25 +0000 (20:41 +0000)]
auto merge of #16251 : apoelstra/rust/tcp-fix, r=alexcrichton

Replacement for PR #16208 (make sockaddr* struct padding explicit) to make PR #15763 (fix nested returns) merge without breaking TCP code.

9 years agoChange everything returning `libc::sockaddr_storage` to use an &mut out-ptr instead
Andrew Poelstra [Mon, 4 Aug 2014 16:46:15 +0000 (09:46 -0700)]
Change everything returning `libc::sockaddr_storage` to use an &mut out-ptr instead

The BSD socket code does some cast tricks with the `libc::sockaddr*`
structs, which causes useful data to be stored in struct padding.
Since Load/Store instructions do not copy struct padding, this makes
these structures dangerous to pass or return by value.

In particular, https://github.com/rust-lang/rust/issues/15763 changes
return semantics so that a Load instruction is used, breaking the TCP
code. Once this PR is merged, that one should merge without error.

9 years agodoc: Fix the 30-minute intro to use += operator.
Tim Joseph Dumol [Mon, 4 Aug 2014 17:30:53 +0000 (01:30 +0800)]
doc: Fix the 30-minute intro to use += operator.

The 30-minute intro had a comment mentioning that `+=` will be included in the future. It's already included, and this fixes it to use `+=`.

9 years agorustc: Link entire archives of native libraries
Alex Crichton [Wed, 30 Jul 2014 14:44:20 +0000 (07:44 -0700)]
rustc: Link entire archives of native libraries

As discovered in #15460, a particular #[link(kind = "static", ...)] line is not
actually guaranteed to link the library at all. The reason for this is that if
the external library doesn't have any referenced symbols in the object generated
by rustc, the entire library is dropped by the linker.

For dynamic native libraries, this is solved by passing -lfoo for all downstream
compilations unconditionally. For static libraries in rlibs this is solved
because the entire archive is bundled in the rlib. The only situation in which
this was a problem was when a static native library was linked to a rust dynamic
library.

This commit brings the behavior of dylibs in line with rlibs by passing the
--whole-archive flag to the linker when linking native libraries. On OSX, this
uses the -force_load flag. This flag ensures that the entire archive is
considered candidate for being linked into the final dynamic library.

This is a breaking change because if any static library is included twice in the
same compilation unit then the linker will start emitting errors about duplicate
definitions now. The fix for this would involve only statically linking to a
library once.

Closes #15460
[breaking-change]

9 years agoauto merge of #15986 : Florob/rust/nfKc-new, r=alexcrichton
bors [Mon, 4 Aug 2014 17:06:19 +0000 (17:06 +0000)]
auto merge of #15986 : Florob/rust/nfKc-new, r=alexcrichton

This adds a new `Recompositions` iterator, which performs canonical composition on the result of the `Decompositions` iterator (which is canonical or compatibility decomposition). In effect this implements Unicode normalization forms C and KC.

9 years agodocs: Fix typo in tutorial.
Ruud van Asseldonk [Mon, 4 Aug 2014 16:01:54 +0000 (18:01 +0200)]
docs: Fix typo in tutorial.

9 years agoRename guessing_game.rs to main.rs in guide
Daniel Hofstetter [Mon, 4 Aug 2014 07:16:02 +0000 (09:16 +0200)]
Rename guessing_game.rs to main.rs in guide

9 years agoauto merge of #16235 : cakebaker/rust/rename_modules_rs_to_main_rs, r=steveklabnik
bors [Mon, 4 Aug 2014 14:41:18 +0000 (14:41 +0000)]
auto merge of #16235 : cakebaker/rust/rename_modules_rs_to_main_rs, r=steveklabnik

9 years agoRename modules.rs to main.rs in guide
Daniel Hofstetter [Mon, 4 Aug 2014 07:58:09 +0000 (09:58 +0200)]
Rename modules.rs to main.rs in guide

9 years agoauto merge of #16213 : huonw/rust/more-token-numbers, r=pnkfelix
bors [Mon, 4 Aug 2014 07:01:10 +0000 (07:01 +0000)]
auto merge of #16213 : huonw/rust/more-token-numbers, r=pnkfelix

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.

9 years agorustc: use Name numbers rather than the Show impl for constants.
Huon Wilson [Sun, 3 Aug 2014 07:00:13 +0000 (17:00 +1000)]
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.

9 years agoauto merge of #16233 : omasanori/rust/abs_sub, r=steveklabnik
bors [Mon, 4 Aug 2014 05:16:35 +0000 (05:16 +0000)]
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.

9 years agonum: Fix the documentation of abs_sub.
OGINO Masanori [Mon, 4 Aug 2014 05:00:45 +0000 (14:00 +0900)]
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>
9 years agoauto merge of #16139 : michaelwoerister/rust/rlib-bc-versioning, r=alexcrichton
bors [Mon, 4 Aug 2014 01:31:09 +0000 (01:31 +0000)]
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.

9 years agoGedit/GTKSourceView: Add macro syntax highlighting.
Michael Sproul [Mon, 4 Aug 2014 01:28:37 +0000 (11:28 +1000)]
Gedit/GTKSourceView: Add macro syntax highlighting.

9 years agoauto merge of #16215 : cakebaker/rust/remove_bin_section_from_toml, r=alexcrichton
bors [Sun, 3 Aug 2014 23:46:10 +0000 (23:46 +0000)]
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.

9 years agoUse a versioning scheme for bytecode objects in rlibs.
Michael Woerister [Thu, 31 Jul 2014 13:05:08 +0000 (15:05 +0200)]
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.

9 years agoauto merge of #16209 : tomjakubowski/rust/rustdoc-html-changes, r=alexcrichton
bors [Sun, 3 Aug 2014 17:01:06 +0000 (17:01 +0000)]
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.

9 years agoRemove the "NFKC clause" in the reference manual.
OGINO Masanori [Sun, 3 Aug 2014 14:41:05 +0000 (23:41 +0900)]
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>
9 years agoauto merge of #16212 : huonw/rust/unicode-gitignore, r=pnkfelix
bors [Sun, 3 Aug 2014 14:01:06 +0000 (14:01 +0000)]
auto merge of #16212 : huonw/rust/unicode-gitignore, r=pnkfelix

9 years agoRemove "bin" section from Cargo.toml
Daniel Hofstetter [Sun, 3 Aug 2014 12:19:05 +0000 (14:19 +0200)]
Remove "bin" section from Cargo.toml

9 years agoauto merge of #16203 : Gankro/rust/vec_flow, r=alexcrichton
bors [Sun, 3 Aug 2014 11:36:07 +0000 (11:36 +0000)]
auto merge of #16203 : Gankro/rust/vec_flow, r=alexcrichton

fixes #16200

9 years agoauto merge of #16202 : db48x/rust/eq-for-time-tm, r=alexcrichton
bors [Sun, 3 Aug 2014 09:56:07 +0000 (09:56 +0000)]
auto merge of #16202 : db48x/rust/eq-for-time-tm, r=alexcrichton

9 years agoauto merge of #16198 : cakebaker/rust/remove_unused_tuple_struct, r=steveklabnik
bors [Sun, 3 Aug 2014 08:11:10 +0000 (08:11 +0000)]
auto merge of #16198 : cakebaker/rust/remove_unused_tuple_struct, r=steveklabnik

9 years agogitignore: Add the autogenerated/downloaded unicode data files.
Huon Wilson [Sun, 3 Aug 2014 07:14:55 +0000 (17:14 +1000)]
gitignore: Add the autogenerated/downloaded unicode data files.

9 years agoauto merge of #16155 : huonw/rust/Ordering-reverse, r=alexcrichton
bors [Sun, 3 Aug 2014 06:31:09 +0000 (06:31 +0000)]
auto merge of #16155 : huonw/rust/Ordering-reverse, r=alexcrichton

This flips the comparison and is designed to be used when sorting etc.

9 years agoauto merge of #16194 : omasanori/rust/gitignore, r=alexcrichton
bors [Sun, 3 Aug 2014 04:51:10 +0000 (04:51 +0000)]
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.

9 years agoauto merge of #16191 : DaGenix/rust/fix-aligned-access, r=alexcrichton
bors [Sun, 3 Aug 2014 03:06:12 +0000 (03:06 +0000)]
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.

9 years agorustdoc: Add rustdoc class to <body> tag
Tom Jakubowski [Sun, 3 Aug 2014 01:20:27 +0000 (18:20 -0700)]
rustdoc: Add rustdoc class to <body> tag

This allows for easier application of user stylesheets to rustdocs no
matter where they are hosted.

9 years agocore: add a reverse method to Ordering.
Huon Wilson [Fri, 1 Aug 2014 02:53:00 +0000 (12:53 +1000)]
core: add a reverse method to Ordering.

This flips the comparison and is designed to be used when sorting etc.

9 years agorustdoc: Add generator meta tag to API docs
Tom Jakubowski [Sun, 3 Aug 2014 01:17:21 +0000 (18:17 -0700)]
rustdoc: Add generator meta tag to API docs

This is consistent with the meta tag in Markdown docs run through
rustdoc.

9 years agoauto merge of #16189 : steveklabnik/rust/gh15494, r=alexcrichton
bors [Sun, 3 Aug 2014 01:21:08 +0000 (01:21 +0000)]
auto merge of #16189 : steveklabnik/rust/gh15494, r=alexcrichton

Fixes #15494.

9 years agoauto merge of #16186 : steveklabnik/rust/guide_cargo_new, r=alexcrichton
bors [Sat, 2 Aug 2014 23:36:09 +0000 (23:36 +0000)]
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.

9 years agoauto merge of #16180 : jbcrail/rust/fix-comments, r=steveklabnik
bors [Sat, 2 Aug 2014 21:51:10 +0000 (21:51 +0000)]
auto merge of #16180 : jbcrail/rust/fix-comments, r=steveklabnik

9 years agoauto merge of #16169 : Gankro/rust/simple-docs, r=cmr
bors [Sat, 2 Aug 2014 20:06:11 +0000 (20:06 +0000)]
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.

9 years agofix underflow in vec swap_remove
Alexis Beingessner [Sat, 2 Aug 2014 18:36:51 +0000 (14:36 -0400)]
fix underflow in vec swap_remove
fixes #16200

9 years agonative: Fix utime() for windows
Alex Crichton [Sat, 2 Aug 2014 17:52:49 +0000 (10:52 -0700)]
native: Fix utime() for windows

Apparently the units are in milliseconds, not in seconds!

9 years agotime::Tm should impl Eq in addition to PartialEq
Daniel Brooks [Sat, 2 Aug 2014 17:25:32 +0000 (10:25 -0700)]
time::Tm should impl Eq in addition to PartialEq

9 years agoauto merge of #16183 : brson/rust/doctitles, r=alexcrichton
bors [Sat, 2 Aug 2014 17:21:09 +0000 (17:21 +0000)]
auto merge of #16183 : brson/rust/doctitles, r=alexcrichton

9 years agoUse globs to ignore target directories.
OGINO Masanori [Sat, 2 Aug 2014 13:22:22 +0000 (22:22 +0900)]
Use globs to ignore target directories.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
9 years agoSort .gitignore.
OGINO Masanori [Sat, 2 Aug 2014 13:21:20 +0000 (22:21 +0900)]
Sort .gitignore.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
9 years agoAdd hide/show detail toggles to rustdoc
Alexis Beingessner [Thu, 31 Jul 2014 01:31:34 +0000 (21:31 -0400)]
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

9 years agoauto merge of #16181 : brson/rust/colon, r=kballard
bors [Sat, 2 Aug 2014 15:36:09 +0000 (15:36 +0000)]
auto merge of #16181 : brson/rust/colon, r=kballard

9 years agoRemove unused tuple struct
Daniel Hofstetter [Sat, 2 Aug 2014 15:19:52 +0000 (17:19 +0200)]
Remove unused tuple struct

9 years agoauto merge of #16177 : nham/rust/collections_15294_eq_ord, r=alexcrichton
bors [Sat, 2 Aug 2014 13:51:09 +0000 (13:51 +0000)]
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

9 years agoauto merge of #16175 : EduardoBautista/rust/fix-guessing-game-appearing-early, r...
bors [Sat, 2 Aug 2014 12:06:09 +0000 (12:06 +0000)]
auto merge of #16175 : EduardoBautista/rust/fix-guessing-game-appearing-early, r=steveklabnik

Solves: https://github.com/rust-lang/rust/issues/16162

9 years agoauto merge of #16165 : tinaun/rust/newcss, r=alexcrichton
bors [Sat, 2 Aug 2014 10:21:11 +0000 (10:21 +0000)]
auto merge of #16165 : tinaun/rust/newcss, r=alexcrichton

remove unneeded `pre.rust a' selector

move transform into `.test-arrow`

fixes #16138

9 years agoauto merge of #16164 : anguslees/rust/rfc3999, r=alexcrichton
bors [Sat, 2 Aug 2014 08:36:09 +0000 (08:36 +0000)]
auto merge of #16164 : anguslees/rust/rfc3999, r=alexcrichton

Fixes #16158

9 years agoauto merge of #16163 : anguslees/rust/strptime-str, r=alexcrichton
bors [Sat, 2 Aug 2014 06:51:12 +0000 (06:51 +0000)]
auto merge of #16163 : anguslees/rust/strptime-str, r=alexcrichton

Also modernise a few constructs in match_strs().

9 years agoRewrite read_u32v_be() and write_u32_be() to make sure that all memory access is...
Palmer Cox [Sat, 2 Aug 2014 05:21:02 +0000 (01:21 -0400)]
Rewrite read_u32v_be() and write_u32_be() to make sure that all memory access is properly aligned

9 years agoauto merge of #16160 : EduardoBautista/rust/use-bang-at-end-of-hello-world, r=alexcri...
bors [Sat, 2 Aug 2014 05:06:11 +0000 (05:06 +0000)]
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".

9 years agoFix manual regarding attribute placement.
Steve Klabnik [Sat, 2 Aug 2014 03:12:14 +0000 (23:12 -0400)]
Fix manual regarding attribute placement.

Fixes #15494.

9 years agoAdd a split_at method to slice::ImmutableVector
nham [Sat, 2 Aug 2014 02:59:54 +0000 (22:59 -0400)]
Add a split_at method to slice::ImmutableVector

This method is similar to the mut_split_at method of slice::MutableVector.

9 years agoAdd note about Cargo.lock
Steve Klabnik [Sat, 2 Aug 2014 02:57:37 +0000 (22:57 -0400)]
Add note about Cargo.lock

9 years agoUse cargo new.
Steve Klabnik [Sat, 2 Aug 2014 02:55:15 +0000 (22:55 -0400)]
Use cargo new.

Now that this feature exists, we should use it.

Fixes #16078

9 years agoauto merge of #16128 : steveklabnik/rust/speed_faq, r=brson
bors [Sat, 2 Aug 2014 02:16:02 +0000 (02:16 +0000)]
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.

9 years agoFix alignment tests for ARM on Linux. #14848
Simon Persson [Sat, 2 Aug 2014 01:38:06 +0000 (01:38 +0000)]
Fix alignment tests for ARM on Linux. #14848

9 years agodoc: Make sure all doc titles say 'Rust'. #12466
Brian Anderson [Fri, 1 Aug 2014 23:31:22 +0000 (16:31 -0700)]
doc: Make sure all doc titles say 'Rust'. #12466

9 years agoauto merge of #16119 : steveklabnik/rust/guide_pointers, r=brson
bors [Sat, 2 Aug 2014 00:31:03 +0000 (00:31 +0000)]
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.