]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #15862 : jakub-/rust/issue-15774, r=alexcrichton
bors [Thu, 24 Jul 2014 05:01:22 +0000 (05:01 +0000)]
auto merge of #15862 : jakub-/rust/issue-15774, r=alexcrichton

Fixed #15774.

10 years agoauto merge of #15781 : alexcrichton/rust/issue-15758, r=bblum
bors [Thu, 24 Jul 2014 02:16:13 +0000 (02:16 +0000)]
auto merge of #15781 : alexcrichton/rust/issue-15758, r=bblum

Semaphores are not currently designed to handle this case correctly, leading to
very strange behavior. Semaphores as written are intended to count *resources*
and it's not possible to have a negative number of resources.

This alters the behavior and documentation to note that the task will be failed
if the initial count is 0.

Closes #15758

10 years agoauto merge of #15407 : sneves/rust/master, r=aturon
bors [Thu, 24 Jul 2014 00:26:14 +0000 (00:26 +0000)]
auto merge of #15407 : sneves/rust/master, r=aturon

At the moment, writing generic functions for integer types that involve shifting is rather verbose. For example, a function at shifts an integer left by 1 currently requires

    use std::num::One;
    fn f<T: Int>(x : T) -> T {
        x << One::one()
    }

If the shift amount is not 1, it's even worse:

    use std::num::FromPrimitive;
    fn f<T: Int + FromPrimitive>(x: T) -> T {
        x << FromPrimitive::from_int(2).unwrap()
    }

This patch allows the much simpler implementation

    fn f<T: Int>(x: T) -> T {
        x << 2
    }

It accomplishes this by changing the built-in integer types (and the `Int` trait) to implement `Shl<uint, T>` instead of `Shl<T, T>` as it currently is defined. Note that the internal implementations of `shl` already cast the right-hand side to `uint`. `BigInt` also implements `Shl<uint, BigInt>`, so this increases consistency.

All of the above applies similarly to right shifts, i.e., `Shr<uint, T>`.

10 years agoauto merge of #15611 : brson/rust/pushpop, r=alexcrichton
bors [Wed, 23 Jul 2014 21:41:14 +0000 (21:41 +0000)]
auto merge of #15611 : brson/rust/pushpop, r=alexcrichton

This fixes naming conventions for `push`/`pop` from either end of a structure by partially implementing @erickt's suggestion from https://github.com/rust-lang/rust/issues/10852#issuecomment-30823343, namely:

* push/pop from the 'back' are called `push` and `pop`.
* push/pop from the 'front' are called `push_front` and `pop_front`.
* `push`/`pop` are declared on the `MutableSeq` trait.
* Implement `MutableSeq` for `Vec`, `DList`, and `RingBuf`.
* Add `MutableSeq` to the prelude.

I did not make any further refactorings because there is some more extensive thought that needs to be put into the collections traits. This is an easy first step that should close https://github.com/rust-lang/rust/issues/10852.

I left the `push_back` and `pop_back` methods on `DList` and `RingBuf` deprecated. Because `MutableSeq` is in the prelude it shouldn't break many, but it is a breaking change.

10 years agoJust land already
Brian Anderson [Mon, 21 Jul 2014 00:57:29 +0000 (17:57 -0700)]
Just land already

10 years agoRemove stray llvmdeps.rs
Brian Anderson [Mon, 14 Jul 2014 22:03:15 +0000 (15:03 -0700)]
Remove stray llvmdeps.rs

10 years agocollections: Tweak docs for push
Brian Anderson [Mon, 14 Jul 2014 21:51:54 +0000 (14:51 -0700)]
collections: Tweak docs for push

10 years agoRemove kludgy imports from vec! macro
Brian Anderson [Mon, 14 Jul 2014 21:45:10 +0000 (14:45 -0700)]
Remove kludgy imports from vec! macro

10 years agocollections: Deprecate shift/unshift
Brian Anderson [Mon, 14 Jul 2014 20:54:10 +0000 (13:54 -0700)]
collections: Deprecate shift/unshift

Use insert/remove instead.

10 years agocollections: Make push_back/pop_back default methods
Brian Anderson [Sat, 12 Jul 2014 01:08:46 +0000 (18:08 -0700)]
collections: Make push_back/pop_back default methods

10 years agovim: Add MutableSeq
Brian Anderson [Sat, 12 Jul 2014 01:00:43 +0000 (18:00 -0700)]
vim: Add MutableSeq

10 years agocollections: Move push/pop docs to MutableSeq
Brian Anderson [Fri, 11 Jul 2014 19:01:06 +0000 (12:01 -0700)]
collections: Move push/pop docs to MutableSeq

10 years agoConvert some push_back users to push
Brian Anderson [Fri, 11 Jul 2014 18:29:38 +0000 (11:29 -0700)]
Convert some push_back users to push

10 years agocollections: Deprecate push_back/pop_back
Brian Anderson [Fri, 11 Jul 2014 17:19:27 +0000 (10:19 -0700)]
collections: Deprecate push_back/pop_back

10 years agocollections: Move push/pop to MutableSeq
Brian Anderson [Fri, 11 Jul 2014 17:12:38 +0000 (10:12 -0700)]
collections: Move push/pop to MutableSeq

Implement for Vec, DList, RingBuf. Add MutableSeq to the prelude.

Since the collections traits are in the prelude most consumers of
these methods will continue to work without change.

[breaking-change]

10 years agoParser: Global single-segment paths should be represented as PatEnum
Jakub Wieczorek [Mon, 21 Jul 2014 16:47:24 +0000 (18:47 +0200)]
Parser: Global single-segment paths should be represented as PatEnum

Fixed #15774.

10 years agoauto merge of #15928 : brson/rust/dist, r=alexcrichton,alexcrichton
bors [Wed, 23 Jul 2014 19:56:15 +0000 (19:56 +0000)]
auto merge of #15928 : brson/rust/dist, r=alexcrichton,alexcrichton

The first commit reverts a similar fix that only solves the `make install` case. This adds the `--enable-dist-host-only` flag to configure to preserve the old behavior, which the nightly bots rely on. The bots will need to be updated soon after this lands (or they will ~double in size).

Closes https://github.com/rust-lang/rust/issues/15711

10 years agomk: Have the various flavors of 'dist' install all targets by default
Brian Anderson [Wed, 23 Jul 2014 19:04:13 +0000 (12:04 -0700)]
mk: Have the various flavors of 'dist' install all targets by default

Closes #15711

10 years agoconfigure: Add --enable-dist-host-only flag
Brian Anderson [Wed, 23 Jul 2014 00:20:15 +0000 (17:20 -0700)]
configure: Add --enable-dist-host-only flag

This preserves the current behavior of `make dist` where we only
distribute bins for the host architecture. The bots need this.

10 years agoauto merge of #15902 : nham/rust/hash_triemap, r=alexcrichton
bors [Wed, 23 Jul 2014 18:11:15 +0000 (18:11 +0000)]
auto merge of #15902 : nham/rust/hash_triemap, r=alexcrichton

cc #15294

10 years agoauto merge of #15749 : vhbit/rust/treemap-doc-fixes, r=alexcrichton
bors [Wed, 23 Jul 2014 14:06:08 +0000 (14:06 +0000)]
auto merge of #15749 : vhbit/rust/treemap-doc-fixes, r=alexcrichton

1. Removed obsolete comment regarding recursive/iteration implementations of tree_find_with/tree_find_mut_with
2. Replaced easy breakable find_with example with simpler one (which only removes redundant allocation during search)

10 years agoauto merge of #15910 : sfackler/rust/nogc, r=cmr
bors [Wed, 23 Jul 2014 10:06:09 +0000 (10:06 +0000)]
auto merge of #15910 : sfackler/rust/nogc, r=cmr

10 years agoauto merge of #15900 : tbu-/rust/pr_numcleanup, r=kballard
bors [Wed, 23 Jul 2014 08:16:10 +0000 (08:16 +0000)]
auto merge of #15900 : tbu-/rust/pr_numcleanup, r=kballard

This removes the special casing for `float`s where it was not necessary, as
`-0.0 == 0.0`.

10 years agoTreeMap examples fixes
Valerii Hiora [Thu, 17 Jul 2014 19:06:13 +0000 (22:06 +0300)]
TreeMap examples fixes

1. Removed obsolete comment regarding recursive/iteration implementations of tree_find_with/tree_find_mut_with
2. Replaced easy breakable find_with example with simpler one (which only removes redundant allocation during search)

10 years agoauto merge of #15899 : aochagavia/rust/guide, r=kballard
bors [Wed, 23 Jul 2014 06:31:11 +0000 (06:31 +0000)]
auto merge of #15899 : aochagavia/rust/guide, r=kballard

The removed code caused confusion because it is not clear that the type of `y` is actually `()`

10 years agoRemove ancient GC cfg flags
Steven Fackler [Wed, 23 Jul 2014 06:19:08 +0000 (23:19 -0700)]
Remove ancient GC cfg flags

10 years agoauto merge of #15897 : Gankro/rust/it-docs, r=kballard
bors [Wed, 23 Jul 2014 04:46:09 +0000 (04:46 +0000)]
auto merge of #15897 : Gankro/rust/it-docs, r=kballard

I found these things to be ambiguous, or at least worth stating explicitly to reduce the amount a user/developer needs to think about the API.

10 years agoRevert "Made 'make install' include libs for additional targets"
Brian Anderson [Wed, 23 Jul 2014 00:17:57 +0000 (17:17 -0700)]
Revert "Made 'make install' include libs for additional targets"

This reverts commit 87334fb05ff2a665419241d877c13d6c4770a3f4.

Conflicts:
mk/install.mk

10 years agoauto merge of #15272 : jakub-/rust/issue-13041, r=pcwalton
bors [Tue, 22 Jul 2014 23:11:12 +0000 (23:11 +0000)]
auto merge of #15272 : jakub-/rust/issue-13041, r=pcwalton

Fixes #13041.

10 years agoAdd Drop support for enums
Jakub Wieczorek [Sat, 14 Jun 2014 13:55:55 +0000 (15:55 +0200)]
Add Drop support for enums

Fixes #13041.

10 years agoauto merge of #15894 : treeman/rust/vec-doc, r=alexcrichton
bors [Tue, 22 Jul 2014 21:26:14 +0000 (21:26 +0000)]
auto merge of #15894 : treeman/rust/vec-doc, r=alexcrichton

Fill in examples for missing methods. Opt for `vec![]` instead of `vec!()`.

10 years agoImplement PartialEq, Eq for TrieMap, TrieSet
nham [Tue, 22 Jul 2014 21:04:16 +0000 (17:04 -0400)]
Implement PartialEq, Eq for TrieMap, TrieSet

10 years agoDerive Hash for TrieMap and TrieSet
nham [Tue, 22 Jul 2014 20:36:09 +0000 (16:36 -0400)]
Derive Hash for TrieMap and TrieSet

10 years agoauto merge of #15869 : alexcrichton/rust/issue-15828, r=kballard
bors [Tue, 22 Jul 2014 19:41:13 +0000 (19:41 +0000)]
auto merge of #15869 : alexcrichton/rust/issue-15828, r=kballard

Closes #15828

10 years agoClean up some trait impls in core::num.
Tobias Bucher [Sun, 13 Jul 2014 14:55:55 +0000 (16:55 +0200)]
Clean up some trait impls in core::num.

This removes the special casing for `float`s where it was not necessary, as
`-0.0 == 0.0`.

10 years agoRemove misleading code example from The Guide
Adolfo Ochagavía [Tue, 22 Jul 2014 18:12:09 +0000 (20:12 +0200)]
Remove misleading code example from The Guide

The removed code caused confusion because it is not clear that the type of `y` is actually `()`

10 years agoclarifying iterator trait documentation
Alexis Beingessner [Tue, 22 Jul 2014 04:32:49 +0000 (00:32 -0400)]
clarifying iterator trait documentation

10 years agoauto merge of #15863 : dotdash/rust/lifetimes3, r=alexcrichton
bors [Tue, 22 Jul 2014 17:56:15 +0000 (17:56 +0000)]
auto merge of #15863 : dotdash/rust/lifetimes3, r=alexcrichton

Lifetime intrinsics help to reduce stack usage, because LLVM can apply
stack coloring to reuse the stack slots of dead allocas for new ones.

For example these functions now both use the same amount of stack, while
previous `bar()` used five times as much as `foo()`:

````rust
fn foo() {
  println("{}", 5);
}

fn bar() {
  println("{}", 5);
  println("{}", 5);
  println("{}", 5);
  println("{}", 5);
  println("{}", 5);
}
````

On top of that, LLVM can also optimize out certain operations when it
knows that memory is dead after a certain point. For example, it can
sometimes remove the zeroing used to cancel the drop glue. This is
possible when the glue drop itself was already removed because the
zeroing dominated the drop glue call. For example in:

````rust
pub fn bar(x: (Box<int>, int)) -> (Box<int>, int) {
    x
}
````

With optimizations, this currently results in:

````llvm
define void @_ZN3bar20h330fa42547df8179niaE({ i64*, i64 }* noalias nocapture nonnull sret, { i64*, i64 }* noalias nocapture nonnull) unnamed_addr #0 {
"_ZN29_$LP$Box$LT$int$GT$$C$int$RP$39glue_drop.$x22glue_drop$x22$LP$1347$RP$17h88cf42702e5a322aE.exit":
  %2 = bitcast { i64*, i64 }* %1 to i8*
  %3 = bitcast { i64*, i64 }* %0 to i8*
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 8, i1 false)
  tail call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 16, i32 8, i1 false)
  ret void
}
````

But with lifetime intrinsics we get:

````llvm
define void @_ZN3bar20h330fa42547df8179niaE({ i64*, i64 }* noalias nocapture nonnull sret, { i64*, i64 }* noalias nocapture nonnull) unnamed_addr #0 {
"_ZN29_$LP$Box$LT$int$GT$$C$int$RP$39glue_drop.$x22glue_drop$x22$LP$1347$RP$17h88cf42702e5a322aE.exit":
  %2 = bitcast { i64*, i64 }* %1 to i8*
  %3 = bitcast { i64*, i64 }* %0 to i8*
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 8, i1 false)
  tail call void @llvm.lifetime.end(i64 16, i8* %2)
  ret void
}
````

Fixes #15665

10 years agoauto merge of #15857 : treeman/rust/doc-dijkstra-example, r=alexcrichton
bors [Tue, 22 Jul 2014 16:11:14 +0000 (16:11 +0000)]
auto merge of #15857 : treeman/rust/doc-dijkstra-example, r=alexcrichton

I wanted to have a slightly larger example compared to the method examples, but I'm unsure how it worked out.

Feedback would nice.

10 years agoMain example for priority queue using dijkstra's algorithm.
Jonas Hietala [Mon, 21 Jul 2014 13:20:57 +0000 (15:20 +0200)]
Main example for priority queue using dijkstra's algorithm.

10 years agoauto merge of #15888 : mprobinson/rust/rustdoc-fixes, r=cmr
bors [Tue, 22 Jul 2014 14:16:14 +0000 (14:16 +0000)]
auto merge of #15888 : mprobinson/rust/rustdoc-fixes, r=cmr

Allow "rustdoc --passes list" to work without specifying input files,
as shown in the examples section of the man page.

10 years agoauto merge of #15884 : steveklabnik/rust/guide_fix_headings, r=huonw
bors [Tue, 22 Jul 2014 12:31:13 +0000 (12:31 +0000)]
auto merge of #15884 : steveklabnik/rust/guide_fix_headings, r=huonw

I screwed this up a while back, and now that I have no outstanding PRs, it's a good time to fix this.

10 years agodoc: Normalize example style
Jonas Hietala [Tue, 22 Jul 2014 12:02:55 +0000 (14:02 +0200)]
doc: Normalize example style

Remove unnecessary `use std::vec::Vec`. Use ``` code blocks
with rust as default instead of spelling it out.

10 years agodoc: Vec::from_raw_parts.
Jonas Hietala [Tue, 22 Jul 2014 11:40:38 +0000 (13:40 +0200)]
doc: Vec::from_raw_parts.

Also more explicit raw pointer handling in unsafe examples.

10 years agoauto merge of #15876 : brson/rust/failfat, r=pcwalton
bors [Tue, 22 Jul 2014 10:46:16 +0000 (10:46 +0000)]
auto merge of #15876 : brson/rust/failfat, r=pcwalton

Adds a new runtime unwinding function that encapsulates the printing of the words "explicit failure" when `fail!()` is called w/o arguments.

The before/after optimized assembly:

```
        leaq    "str\"str\"(1412)"(%rip), %rax
        movq    %rax, 24(%rsp)
        movq    $16, 32(%rsp)
        leaq    "str\"str\"(1413)"(%rip), %rax
        movq    %rax, 8(%rsp)
        movq    $19, 16(%rsp)
        leaq    24(%rsp), %rdi
        leaq    8(%rsp), %rsi
        movl    $11, %edx
        callq   _ZN6unwind12begin_unwind21h15836560661922107792E
```

```
        leaq    "str\"str\"(1369)"(%rip), %rax
        movq    %rax, 8(%rsp)
        movq    $19, 16(%rsp)
        leaq    8(%rsp), %rdi
        movl    $11, %esi
        callq   _ZN6unwind31begin_unwind_no_time_to_explain20hd1c720cdde6a116480dE@PLT
```

Before/after filesizes:

rwxrwxr-x 1 brian brian 21479503 Jul 20 22:09 stage2-old/lib/librustc-4e7c5e5c.so
rwxrwxr-x 1 brian brian 21475415 Jul 20 22:30 x86_64-unknown-linux-gnu/stage2/lib/librustc-4e7c5e5c.so

This is the lowest-hanging fruit in the fail-bloat wars. Further fixes are going to require harder tradeoffs.

r? @pcwalton

10 years agodoc: Fill vec documentation with examples.
Jonas Hietala [Tue, 22 Jul 2014 09:07:49 +0000 (11:07 +0200)]
doc: Fill vec documentation with examples.

Add more useful functions to main example.

10 years agoauto merge of #15871 : dotdash/rust/unnamed_fmtstr, r=pcwalton
bors [Tue, 22 Jul 2014 09:01:17 +0000 (09:01 +0000)]
auto merge of #15871 : dotdash/rust/unnamed_fmtstr, r=pcwalton

10 years agodoc: Use vec![] instead of vec!() in Vec.
Jonas Hietala [Tue, 22 Jul 2014 08:33:26 +0000 (10:33 +0200)]
doc: Use vec![] instead of vec!() in Vec.

10 years agoEmit LLVM lifetime intrinsics to improve stack usage and codegen in general
Björn Steinbrink [Thu, 1 May 2014 17:32:07 +0000 (19:32 +0200)]
Emit LLVM lifetime intrinsics to improve stack usage and codegen in general

Lifetime intrinsics help to reduce stack usage, because LLVM can apply
stack coloring to reuse the stack slots of dead allocas for new ones.

For example these functions now both use the same amount of stack, while
previous `bar()` used five times as much as `foo()`:

````rust
fn foo() {
  println("{}", 5);
}

fn bar() {
  println("{}", 5);
  println("{}", 5);
  println("{}", 5);
  println("{}", 5);
  println("{}", 5);
}
````

On top of that, LLVM can also optimize out certain operations when it
knows that memory is dead after a certain point. For example, it can
sometimes remove the zeroing used to cancel the drop glue. This is
possible when the glue drop itself was already removed because the
zeroing dominated the drop glue call. For example in:

````rust
pub fn bar(x: (Box<int>, int)) -> (Box<int>, int) {
    x
}
````

With optimizations, this currently results in:

````llvm
define void @_ZN3bar20h330fa42547df8179niaE({ i64*, i64 }* noalias nocapture nonnull sret, { i64*, i64 }* noalias nocapture nonnull) unnamed_addr #0 {
"_ZN29_$LP$Box$LT$int$GT$$C$int$RP$39glue_drop.$x22glue_drop$x22$LP$1347$RP$17h88cf42702e5a322aE.exit":
  %2 = bitcast { i64*, i64 }* %1 to i8*
  %3 = bitcast { i64*, i64 }* %0 to i8*
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 8, i1 false)
  tail call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 16, i32 8, i1 false)
  ret void
}
````

But with lifetime intrinsics we get:

````llvm
define void @_ZN3bar20h330fa42547df8179niaE({ i64*, i64 }* noalias nocapture nonnull sret, { i64*, i64 }* noalias nocapture nonnull) unnamed_addr #0 {
"_ZN29_$LP$Box$LT$int$GT$$C$int$RP$39glue_drop.$x22glue_drop$x22$LP$1347$RP$17h88cf42702e5a322aE.exit":
  %2 = bitcast { i64*, i64 }* %1 to i8*
  %3 = bitcast { i64*, i64 }* %0 to i8*
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 16, i32 8, i1 false)
  tail call void @llvm.lifetime.end(i64 16, i8* %2)
  ret void
}
````

Fixes #15665

10 years agoauto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichton
bors [Tue, 22 Jul 2014 07:16:17 +0000 (07:16 +0000)]
auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichton

10 years agoFix pretty test
Corey Richardson [Tue, 22 Jul 2014 05:53:36 +0000 (22:53 -0700)]
Fix pretty test

10 years agoauto merge of #15870 : jakub-/rust/issue-15793, r=alexcrichton
bors [Tue, 22 Jul 2014 05:21:19 +0000 (05:21 +0000)]
auto merge of #15870 : jakub-/rust/issue-15793, r=alexcrichton

Fixes #15793.

10 years agoDon't run lexer tests by default
Corey Richardson [Tue, 22 Jul 2014 02:26:20 +0000 (19:26 -0700)]
Don't run lexer tests by default

10 years agoauto merge of #15834 : Kimundi/rust/moved_syntax_env, r=cmr
bors [Tue, 22 Jul 2014 02:06:21 +0000 (02:06 +0000)]
auto merge of #15834 : Kimundi/rust/moved_syntax_env, r=cmr

- Made custom syntax extensions capable of expanding custom macros by moving `SyntaxEnv` into `ExtCtx`
- Added convenience method on `ExtCtx` for getting a macro expander.
- Made a few things private to force only a single way to use them (through `ExtCtx`)
- Removed some ancient commented-out code

Closes #14946

10 years agoAdd a ton of ignore-lexer-test
Corey Richardson [Mon, 21 Jul 2014 22:57:14 +0000 (15:57 -0700)]
Add a ton of ignore-lexer-test

10 years agoShuffle around check-lexer conditions
Corey Richardson [Mon, 21 Jul 2014 20:04:35 +0000 (13:04 -0700)]
Shuffle around check-lexer conditions

10 years agoBreak apart long lines in verify.rs
Corey Richardson [Mon, 21 Jul 2014 19:59:25 +0000 (12:59 -0700)]
Break apart long lines in verify.rs

10 years agolexer tests: makefile/configure
Corey Richardson [Tue, 15 Jul 2014 07:18:17 +0000 (00:18 -0700)]
lexer tests: makefile/configure

10 years agoauto merge of #15217 : steveklabnik/rust/range, r=huonw
bors [Tue, 22 Jul 2014 00:26:21 +0000 (00:26 +0000)]
auto merge of #15217 : steveklabnik/rust/range, r=huonw

Inspired by http://www.reddit.com/r/rust/comments/298js2/what_is_the_rationale_behind_the_second_parameter/

10 years agoGuide: fix headings
Steve Klabnik [Mon, 21 Jul 2014 23:39:16 +0000 (19:39 -0400)]
Guide: fix headings

10 years agoClarify range's exclusivity.
Steve Klabnik [Fri, 27 Jun 2014 16:29:41 +0000 (12:29 -0400)]
Clarify range's exclusivity.

Inspired by http://www.reddit.com/r/rust/comments/298js2/what_is_the_rationale_behind_the_second_parameter/

10 years agoRefactoring: Only use `MacroExpander` for expanding outside of
Marvin Löbel [Sun, 20 Jul 2014 14:25:35 +0000 (16:25 +0200)]
Refactoring: Only use `MacroExpander` for expanding outside of
`syntax::ext::expand`

10 years agoFix rustdoc --passes list
Mike Robinson [Mon, 21 Jul 2014 22:37:04 +0000 (23:37 +0100)]
Fix rustdoc --passes list

Allow "rustdoc --passes list" to work without specifying input files,
as shown in the examples section of the man page.

10 years agoMoved `syntax::ext::base::SyntaxEnv` into `syntax::ext::base::ExtCtx`
Marvin Löbel [Sat, 19 Jul 2014 19:34:24 +0000 (21:34 +0200)]
Moved `syntax::ext::base::SyntaxEnv` into `syntax::ext::base::ExtCtx`

10 years agoUpdate LLVM to address an issue with range metadata in hoisted loads
Jakub Wieczorek [Mon, 21 Jul 2014 19:32:03 +0000 (21:32 +0200)]
Update LLVM to address an issue with range metadata in hoisted loads

Fixes #15793.

10 years agoUse fewer instructions for `fail!`
Brian Anderson [Mon, 21 Jul 2014 20:48:19 +0000 (13:48 -0700)]
Use fewer instructions for `fail!`

Adds a special-case fail function, rustrt::unwind::begin_unwind_no_time_to_explain,
that encapsulates the printing of the words "explicit failure".

The before/after optimized assembly:

```
        leaq    "str\"str\"(1369)"(%rip), %rax
        movq    %rax, 8(%rsp)
        movq    $19, 16(%rsp)
        leaq    8(%rsp), %rdi
        movl    $11, %esi
        callq   _ZN6unwind31begin_unwind_no_time_to_explain20hd1c720cdde6a116480dE@PLT
```

```
        leaq    "str\"str\"(1412)"(%rip), %rax
        movq    %rax, 24(%rsp)
        movq    $16, 32(%rsp)
        leaq    "str\"str\"(1413)"(%rip), %rax
        movq    %rax, 8(%rsp)
        movq    $19, 16(%rsp)
        leaq    24(%rsp), %rdi
        leaq    8(%rsp), %rsi
        movl    $11, %edx
        callq   _ZN6unwind12begin_unwind21h15836560661922107792E
```

Before/after filesizes:

rwxrwxr-x 1 brian brian 21479503 Jul 20 22:09 stage2-old/lib/librustc-4e7c5e5c.so
rwxrwxr-x 1 brian brian 21475415 Jul 20 22:30 x86_64-unknown-linux-gnu/stage2/lib/librustc-4e7c5e5c.so

10 years agoauto merge of #15700 : jakub-/rust/match-fail-removal, r=pcwalton
bors [Mon, 21 Jul 2014 20:41:18 +0000 (20:41 +0000)]
auto merge of #15700 : jakub-/rust/match-fail-removal, r=pcwalton

It's an artifact of the old refutable version of `match` and is no longer necessary.

10 years agoAllow merging of statics generated by format!()
Björn Steinbrink [Mon, 21 Jul 2014 18:57:37 +0000 (20:57 +0200)]
Allow merging of statics generated by format!()

10 years agoauto merge of #15864 : alexcrichton/rust/rollup, r=alexcrichton
bors [Mon, 21 Jul 2014 18:46:46 +0000 (18:46 +0000)]
auto merge of #15864 : alexcrichton/rust/rollup, r=alexcrichton

10 years agorustc: Append platform exe suffix to output files
Alex Crichton [Sun, 20 Jul 2014 19:08:09 +0000 (12:08 -0700)]
rustc: Append platform exe suffix to output files

Closes #15828

10 years agoignore-lexer-test to broken files and remove some tray hyphens
Corey Richardson [Tue, 15 Jul 2014 03:46:04 +0000 (20:46 -0700)]
ignore-lexer-test to broken files and remove some tray hyphens

I blame @ChrisMorgan for the hyphens.

10 years agoByte/raw binary literal fixes
Corey Richardson [Tue, 15 Jul 2014 03:45:39 +0000 (20:45 -0700)]
Byte/raw binary literal fixes

10 years agoRefine the tooling, handle comments
Corey Richardson [Tue, 15 Jul 2014 00:27:28 +0000 (17:27 -0700)]
Refine the tooling, handle comments

10 years agoFirst pass at line comment correctness
Corey Richardson [Mon, 14 Jul 2014 21:13:38 +0000 (14:13 -0700)]
First pass at line comment correctness

10 years agoAdd raw string literal ambiguity document
Corey Richardson [Mon, 14 Jul 2014 08:56:52 +0000 (01:56 -0700)]
Add raw string literal ambiguity document

10 years agoLexer; subtly wrong; no makefile
Corey Richardson [Mon, 14 Jul 2014 08:52:18 +0000 (01:52 -0700)]
Lexer; subtly wrong; no makefile

10 years agoTest fixes from the rollup
Alex Crichton [Mon, 21 Jul 2014 17:18:17 +0000 (10:18 -0700)]
Test fixes from the rollup

Closes #15690 (Guide: improve error handling)
Closes #15729 (Guide: guessing game)
Closes #15751 (repair macro docs)
Closes #15766 (rustc: Print a smaller hash on -v)
Closes #15815 (Add unit test for rlibc)
Closes #15820 (Minor refactoring and features in rustc driver for embedders)
Closes #15822 (rustdoc: Add an --extern flag analagous to rustc's)
Closes #15824 (Document Deque trait and bitv.)
Closes #15832 (syntax: Join consecutive string literals in format strings together)
Closes #15837 (Update LLVM to include NullCheckElimination pass)
Closes #15841 (Rename to_str to to_string)
Closes #15847 (Purge #[!resolve_unexported] from the compiler)
Closes #15848 (privacy: Add publically-reexported foreign item to exported item set)
Closes #15849 (fix string in from_utf8_lossy_100_multibyte benchmark)
Closes #15850 (Get rid of few warnings in tests)
Closes #15852 (Clarify the std::vec::Vec::with_capacity docs)

10 years agoClarify the std::vec::Vec docs regarding capacity
P1start [Mon, 21 Jul 2014 08:33:20 +0000 (20:33 +1200)]
Clarify the std::vec::Vec docs regarding capacity

10 years agoGet rid of few warnings in tests
Piotr Jawniak [Sun, 20 Jul 2014 15:20:37 +0000 (17:20 +0200)]
Get rid of few warnings in tests

10 years agofix string in from_utf8_lossy_100_multibyte benchmark
Ted Horst [Mon, 21 Jul 2014 05:43:08 +0000 (00:43 -0500)]
fix string in from_utf8_lossy_100_multibyte benchmark

10 years agoprivacy: Add publically-reexported foreign item to exported item set
Kiet Tran [Mon, 21 Jul 2014 05:11:43 +0000 (22:11 -0700)]
privacy: Add publically-reexported foreign item to exported item set

Close #15740

10 years agoDon't create reexport module if there are none
Steven Fackler [Mon, 21 Jul 2014 05:34:09 +0000 (22:34 -0700)]
Don't create reexport module if there are none

10 years agoPurge !resolve_unexported
Steven Fackler [Mon, 21 Jul 2014 05:11:43 +0000 (22:11 -0700)]
Purge !resolve_unexported

10 years agoRestructure test harness
Steven Fackler [Mon, 21 Jul 2014 05:10:11 +0000 (22:10 -0700)]
Restructure test harness

We now build up a set of modules that reexport everything the test
framework needs, instead of turning off privacy.

10 years agoRemove useless RefCells
Steven Fackler [Mon, 21 Jul 2014 01:05:59 +0000 (18:05 -0700)]
Remove useless RefCells

10 years agoRename to_str to to_string
Steven Fackler [Mon, 21 Jul 2014 00:12:40 +0000 (17:12 -0700)]
Rename to_str to to_string

Closes #15796.

[breaking-change]

10 years agoUpdate LLVM to include NullCheckElimination pass
Björn Steinbrink [Sun, 20 Jul 2014 20:19:17 +0000 (22:19 +0200)]
Update LLVM to include NullCheckElimination pass

Fixes #11751

10 years agosyntax: Join consecutive string literals in format strings together
root [Sun, 20 Jul 2014 14:31:43 +0000 (16:31 +0200)]
syntax: Join consecutive string literals in format strings together

Emit a single rt::Piece per consecutive string literals. String literals
are split on {{ or }} escapes.

Saves a small amount of static storage and emitted code size.

10 years agoSimplify and cleanup bitv examples.
Jonas Hietala [Sun, 20 Jul 2014 15:09:53 +0000 (17:09 +0200)]
Simplify and cleanup bitv examples.

10 years agoDescribe BitPositions and TwoBitPositions.
Jonas Hietala [Sun, 20 Jul 2014 13:15:48 +0000 (15:15 +0200)]
Describe BitPositions and TwoBitPositions.

10 years agoPolish bitv docs.
Jonas Hietala [Sun, 20 Jul 2014 12:59:13 +0000 (14:59 +0200)]
Polish bitv docs.

10 years agoEnclose None as `None`.
Jonas Hietala [Sun, 20 Jul 2014 12:47:13 +0000 (14:47 +0200)]
Enclose None as `None`.

10 years agoMain bitv example: prime sieve.
Jonas Hietala [Sun, 20 Jul 2014 12:45:33 +0000 (14:45 +0200)]
Main bitv example: prime sieve.

10 years agoMove intersection above difference and symmetric_differance.
Jonas Hietala [Sun, 20 Jul 2014 12:33:27 +0000 (14:33 +0200)]
Move intersection above difference and symmetric_differance.

So all comes in the order union, intersection, difference and
symmetric_difference.

10 years agoDocument BitvSet.
Jonas Hietala [Sun, 20 Jul 2014 12:32:18 +0000 (14:32 +0200)]
Document BitvSet.

10 years agoDocument Bitv.
Jonas Hietala [Sun, 20 Jul 2014 12:28:40 +0000 (14:28 +0200)]
Document Bitv.

10 years agoGroup union, intersect and difference in Bitv.
Jonas Hietala [Sun, 20 Jul 2014 12:21:47 +0000 (14:21 +0200)]
Group union, intersect and difference in Bitv.

10 years agoPlace union as the first function, for consistency.
Jonas Hietala [Sun, 20 Jul 2014 12:18:04 +0000 (14:18 +0200)]
Place union as the first function, for consistency.

10 years agoMove in-place functions below their iterator variants.
Jonas Hietala [Sun, 20 Jul 2014 12:16:47 +0000 (14:16 +0200)]
Move in-place functions below their iterator variants.

10 years agoDocument Deque.
Jonas Hietala [Sun, 20 Jul 2014 12:12:26 +0000 (14:12 +0200)]
Document Deque.