]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #16316 : forticulous/rust/char-Fix, r=alexcrichton
bors [Thu, 7 Aug 2014 04:21:04 +0000 (04:21 +0000)]
auto merge of #16316 : forticulous/rust/char-Fix, r=alexcrichton

Signature for `from_digit` in `Char` wasn't using `Self` so there was no way to use this method

10 years agoauto merge of #16306 : pnkfelix/rust/fsk-ast-refactor-PatWild, r=alexcrichton
bors [Thu, 7 Aug 2014 02:26:07 +0000 (02:26 +0000)]
auto merge of #16306 : pnkfelix/rust/fsk-ast-refactor-PatWild, r=alexcrichton

AST refactoring: merge PatWild and PatWildMulti into one variant with a flag

10 years agoChar::from_digit signature fix
fort [Thu, 7 Aug 2014 01:46:54 +0000 (18:46 -0700)]
Char::from_digit signature fix

10 years agoauto merge of #16291 : nham/rust/byte_literals, r=alexcrichton
bors [Wed, 6 Aug 2014 23:41:05 +0000 (23:41 +0000)]
auto merge of #16291 : nham/rust/byte_literals, r=alexcrichton

This replaces many instances chars being casted to u8 with byte literals.

10 years agoauto merge of #16225 : pczarn/rust/iter-refactoring, r=kballard
bors [Wed, 6 Aug 2014 21:56:07 +0000 (21:56 +0000)]
auto merge of #16225 : pczarn/rust/iter-refactoring, r=kballard

Simplifying the code of methods: `nth`, `fold`, `rposition`, and iterators: `Filter`, `FilterMap`, `SkipWhile`.

```
before
test iter::bench_multiple_take      ... bench:        15 ns/iter (+/- 0)
test iter::bench_rposition          ... bench:       349 ns/iter (+/- 94)
test iter::bench_skip_while         ... bench:       158 ns/iter (+/- 6)

after
test iter::bench_multiple_take      ... bench:        15 ns/iter (+/- 0)
test iter::bench_rposition          ... bench:       314 ns/iter (+/- 2)
test iter::bench_skip_while         ... bench:       107 ns/iter (+/- 0)
```
@koalazen has the code for `Skip`.

Once #16011 is fixed, `min_max` could use a for loop.

10 years agoauto merge of #16308 : alexcrichton/rust/rollup, r=alexcrichton
bors [Wed, 6 Aug 2014 19:26:19 +0000 (19:26 +0000)]
auto merge of #16308 : alexcrichton/rust/rollup, r=alexcrichton

10 years agoMerge commit '3b41f3256228ffb01225eab671ef301aa18337d7' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:47 +0000 (11:25 -0700)]
Merge commit '3b41f3256228ffb01225eab671ef301aa18337d7' into rollup

10 years agoMerge commit 'd92eaf0273af8c09112f951b2f483505b2f3e8c9' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:45 +0000 (11:25 -0700)]
Merge commit 'd92eaf0273af8c09112f951b2f483505b2f3e8c9' into rollup

10 years agoMerge commit 'c6c3f47f7c72ddf45ba1bf6bae6bec3699d7212e' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:42 +0000 (11:25 -0700)]
Merge commit 'c6c3f47f7c72ddf45ba1bf6bae6bec3699d7212e' into rollup

10 years agoMerge commit 'cb8bd83888cddc37c912be648ce5a814b08ceb25' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:36 +0000 (11:25 -0700)]
Merge commit 'cb8bd83888cddc37c912be648ce5a814b08ceb25' into rollup

10 years agoMerge commit '74ae05ad90d1e809663702f374bba6e62671692c' into rollup
Alex Crichton [Wed, 6 Aug 2014 18:25:22 +0000 (11:25 -0700)]
Merge commit '74ae05ad90d1e809663702f374bba6e62671692c' into rollup

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

10 years agoauto merge of #15985 : jfager/rust/r6334, r=pnkfelix
bors [Wed, 6 Aug 2014 17:31:19 +0000 (17:31 +0000)]
auto merge of #15985 : jfager/rust/r6334, r=pnkfelix

 Closes #6334

10 years agoUse byte literals in libgetopts
nham [Wed, 6 Aug 2014 17:06:37 +0000 (13:06 -0400)]
Use byte literals in libgetopts

10 years agoRemove cast to char in libserialize::hex
nham [Wed, 6 Aug 2014 16:23:21 +0000 (12:23 -0400)]
Remove cast to char in libserialize::hex

10 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`.

10 years agoAST refactoring: merge PatWild and PatWildMulti into one variant with a flag.
Felix S. Klock II [Wed, 6 Aug 2014 15:04:44 +0000 (17:04 +0200)]
AST refactoring: merge PatWild and PatWildMulti into one variant with a flag.

10 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

10 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

10 years agocore: Refactor iterators
Piotr Czarnecki [Wed, 6 Aug 2014 10:20:37 +0000 (11:20 +0100)]
core: Refactor iterators

Simplifying the code of methods: nth, fold, rposition
and iterators: Filter, FilterMap, SkipWhile
Adding basic benchmarks

10 years agoRustdoc: Add padding on <code>
Simon Sapin [Wed, 6 Aug 2014 10:07:35 +0000 (11:07 +0100)]
Rustdoc: Add padding on <code>

… to separate text from the edge of the newly added background.

10 years agoRustdoc: Highlight <code> elements (from Markdown `backticks`)
Simon Sapin [Wed, 6 Aug 2014 10:03:18 +0000 (11:03 +0100)]
Rustdoc: Highlight <code> elements (from Markdown `backticks`)

10 years agoGtksourceview language spec: add the \0 escape sequence.
Simon Sapin [Wed, 6 Aug 2014 09:18:22 +0000 (10:18 +0100)]
Gtksourceview language spec: add the \0 escape sequence.

10 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]

10 years agoGuide: Fix imports (times_four instead of add_four)
Daniel Hofstetter [Wed, 6 Aug 2014 07:51:02 +0000 (09:51 +0200)]
Guide: Fix imports (times_four instead of add_four)

10 years agoUse byte literals in libcore
nham [Wed, 6 Aug 2014 06:30:17 +0000 (02:30 -0400)]
Use byte literals in libcore

10 years agoUse byte literals in libstd
nham [Wed, 6 Aug 2014 06:02:50 +0000 (02:02 -0400)]
Use byte literals in libstd

10 years agoUse byte literals in libsyntax
nham [Wed, 6 Aug 2014 05:31:48 +0000 (01:31 -0400)]
Use byte literals in libsyntax

10 years agoUse byte literal in libnum
nham [Wed, 6 Aug 2014 05:29:26 +0000 (01:29 -0400)]
Use byte literal in libnum

10 years agoUse byte literals in libterm
nham [Wed, 6 Aug 2014 05:25:48 +0000 (01:25 -0400)]
Use byte literals in libterm

10 years agoUse a byte literal in libregex
nham [Wed, 6 Aug 2014 05:18:19 +0000 (01:18 -0400)]
Use a byte literal in libregex

10 years agoUse byte literals in libdebug
nham [Wed, 6 Aug 2014 05:14:31 +0000 (01:14 -0400)]
Use byte literals in libdebug

10 years agoUse byte literals in libserialize
nham [Wed, 6 Aug 2014 05:07:10 +0000 (01:07 -0400)]
Use byte literals in libserialize

10 years agoUse byte literals in libcollections tests
nham [Wed, 6 Aug 2014 04:57:49 +0000 (00:57 -0400)]
Use byte literals in libcollections tests

10 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

10 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.

10 years agorustdoc: Run all work in a separate task
Alex Crichton [Wed, 6 Aug 2014 02:51:02 +0000 (19:51 -0700)]
rustdoc: Run all work in a separate task

There's a good long comment explaining why. The tl;dr; is that I have no idea
why this is necessary, but it gets --test to work on windows which is something,
right?

cc #13259
cc #16275
cc rust-lang/cargo#302

10 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.

10 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.

10 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

10 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.

10 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 `+=`.

10 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

10 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

10 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!

10 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

10 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.

10 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

10 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.

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

10 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.

10 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.

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

10 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.

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

10 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.

10 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++.

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

10 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.

10 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.

10 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.

10 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.

10 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]

10 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]

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

Fixes #15830.

10 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.

10 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

10 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

10 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

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

10 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.

10 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.

10 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 `+=`.

10 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]

10 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.

10 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.

10 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

10 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

10 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

10 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.

10 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.

10 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.

10 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>
10 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.

10 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.

10 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.

10 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.

10 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.

10 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>
10 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

10 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

10 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

10 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

10 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

10 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.

10 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.

10 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.

10 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.

10 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.

10 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.