]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRemoved some unnecessary RefCells from resolve
Jonathan S [Mon, 29 Sep 2014 23:06:13 +0000 (18:06 -0500)]
Removed some unnecessary RefCells from resolve

9 years agoauto merge of #17629 : alexcrichton/rust/rollup, r=alexcrichton
bors [Mon, 29 Sep 2014 17:18:07 +0000 (17:18 +0000)]
auto merge of #17629 : alexcrichton/rust/rollup, r=alexcrichton

9 years agoTest fixes from the rollup
Alex Crichton [Mon, 29 Sep 2014 15:57:48 +0000 (08:57 -0700)]
Test fixes from the rollup

9 years agorollup merge of #17621 : sfackler/new-snap
Alex Crichton [Mon, 29 Sep 2014 15:17:18 +0000 (08:17 -0700)]
rollup merge of #17621 : sfackler/new-snap

9 years agorollup merge of #17625 : Boddlnagg/lexer-fix
Alex Crichton [Mon, 29 Sep 2014 15:15:03 +0000 (08:15 -0700)]
rollup merge of #17625 : Boddlnagg/lexer-fix

9 years agorollup merge of #17623 : bkoropoff/issue-17607
Alex Crichton [Mon, 29 Sep 2014 15:14:58 +0000 (08:14 -0700)]
rollup merge of #17623 : bkoropoff/issue-17607

9 years agorollup merge of #17619 : wizeman/fix-perm
Alex Crichton [Mon, 29 Sep 2014 15:14:50 +0000 (08:14 -0700)]
rollup merge of #17619 : wizeman/fix-perm

9 years agorollup merge of #17614 : nick29581/slice3
Alex Crichton [Mon, 29 Sep 2014 15:14:39 +0000 (08:14 -0700)]
rollup merge of #17614 : nick29581/slice3

9 years agorollup merge of #17613 : bkoropoff/issue-17593
Alex Crichton [Mon, 29 Sep 2014 15:14:36 +0000 (08:14 -0700)]
rollup merge of #17613 : bkoropoff/issue-17593

9 years agorollup merge of #17602 : Tobba/defailbloat-static
Alex Crichton [Mon, 29 Sep 2014 15:14:32 +0000 (08:14 -0700)]
rollup merge of #17602 : Tobba/defailbloat-static

9 years agorollup merge of #17599 : Gankro/enum-ord
Alex Crichton [Mon, 29 Sep 2014 15:14:29 +0000 (08:14 -0700)]
rollup merge of #17599 : Gankro/enum-ord

9 years agorollup merge of #17598 : bkoropoff/issue-17441
Alex Crichton [Mon, 29 Sep 2014 15:14:27 +0000 (08:14 -0700)]
rollup merge of #17598 : bkoropoff/issue-17441

9 years agorollup merge of #17592 : kmcallister/inline-asm-loc
Alex Crichton [Mon, 29 Sep 2014 15:14:23 +0000 (08:14 -0700)]
rollup merge of #17592 : kmcallister/inline-asm-loc

9 years agorollup merge of #17586 : Sawyer47/test-16465
Alex Crichton [Mon, 29 Sep 2014 15:14:19 +0000 (08:14 -0700)]
rollup merge of #17586 : Sawyer47/test-16465

9 years agorollup merge of #17585 : sfackler/string-slice
Alex Crichton [Mon, 29 Sep 2014 15:14:16 +0000 (08:14 -0700)]
rollup merge of #17585 : sfackler/string-slice

9 years agorollup merge of #17582 : kmcallister/gc-box
Alex Crichton [Mon, 29 Sep 2014 15:14:12 +0000 (08:14 -0700)]
rollup merge of #17582 : kmcallister/gc-box

9 years agorollup merge of #17577 : squeaky-pl/patch-1
Alex Crichton [Mon, 29 Sep 2014 15:12:54 +0000 (08:12 -0700)]
rollup merge of #17577 : squeaky-pl/patch-1

9 years agorollup merge of #17576 : kmcallister/hide-quotes
Alex Crichton [Mon, 29 Sep 2014 15:12:51 +0000 (08:12 -0700)]
rollup merge of #17576 : kmcallister/hide-quotes

9 years agorollup merge of #17573 : iliekturtles/17570-windows-installer-path
Alex Crichton [Mon, 29 Sep 2014 15:12:48 +0000 (08:12 -0700)]
rollup merge of #17573 : iliekturtles/17570-windows-installer-path

9 years agorollup merge of #17565 : akavel/patch-1
Alex Crichton [Mon, 29 Sep 2014 15:12:45 +0000 (08:12 -0700)]
rollup merge of #17565 : akavel/patch-1

9 years agorollup merge of #17564 : japaric/fix-slicemut-docs
Alex Crichton [Mon, 29 Sep 2014 15:12:42 +0000 (08:12 -0700)]
rollup merge of #17564 : japaric/fix-slicemut-docs

9 years agorollup merge of #17557 : sfackler/fuse-example
Alex Crichton [Mon, 29 Sep 2014 15:12:37 +0000 (08:12 -0700)]
rollup merge of #17557 : sfackler/fuse-example

9 years agorollup merge of #17544 : eklitzke/master
Alex Crichton [Mon, 29 Sep 2014 15:12:32 +0000 (08:12 -0700)]
rollup merge of #17544 : eklitzke/master

9 years agorollup merge of #17548 : cgaebel/master
Alex Crichton [Mon, 29 Sep 2014 15:12:14 +0000 (08:12 -0700)]
rollup merge of #17548 : cgaebel/master

9 years agorollup merge of #17542 : brson/devchannel
Alex Crichton [Mon, 29 Sep 2014 15:12:09 +0000 (08:12 -0700)]
rollup merge of #17542 : brson/devchannel

9 years agorollup merge of #17531 : tomjakubowski/rustdoc-where-clauses
Alex Crichton [Mon, 29 Sep 2014 15:10:47 +0000 (08:10 -0700)]
rollup merge of #17531 : tomjakubowski/rustdoc-where-clauses

9 years agorollup merge of #17519 : pcwalton/unboxed-closure-move-syntax
Alex Crichton [Mon, 29 Sep 2014 15:10:44 +0000 (08:10 -0700)]
rollup merge of #17519 : pcwalton/unboxed-closure-move-syntax

9 years agorollup merge of #17510 : MatejLach/find_fix
Alex Crichton [Mon, 29 Sep 2014 15:10:32 +0000 (08:10 -0700)]
rollup merge of #17510 : MatejLach/find_fix

9 years agorustdoc: Render where clauses as appropriate
Tom Jakubowski [Thu, 25 Sep 2014 09:01:42 +0000 (02:01 -0700)]
rustdoc: Render where clauses as appropriate

Fix #16546

9 years agorustc: Fix permission denied error in 'ar' when lto is enabled
Ricardo M. Correia [Sat, 27 Sep 2014 03:08:41 +0000 (05:08 +0200)]
rustc: Fix permission denied error in 'ar' when lto is enabled

The reason that 'ar' can fail with permission denied is that when
link-time optimizations are enabled, rustc copies libraries into a
temporary directory, preserving file permissions, and subsequently
modifies them using 'ar'.

The modification can fail because some package managers may install
libraries in system directories as read-only files, which means the
temporary file also becomes read-only when it is copied.

I have fixed this by giving the temporary file's owner read+write
permissions after the copy.

I have also added a regression test for this issue.

9 years agoauto merge of #17538 : brson/rust/winmk, r=alexcrichton
bors [Mon, 29 Sep 2014 12:43:13 +0000 (12:43 +0000)]
auto merge of #17538 : brson/rust/winmk, r=alexcrichton

9 years agoUpdate ANTLR float suffix grammar
Patrick Reisert [Mon, 29 Sep 2014 10:52:35 +0000 (12:52 +0200)]
Update ANTLR float suffix grammar

- Removes f128 from the grammar, which is no longer support in rustc
- The fragment modifier is added so it won't parse float suffix as a separate token

9 years agoauto merge of #17409 : farcaller/rust/patch-1, r=huonw
bors [Mon, 29 Sep 2014 10:08:04 +0000 (10:08 +0000)]
auto merge of #17409 : farcaller/rust/patch-1, r=huonw

Parser.parse_method now has a second argument, I assume ast::Inherited is the correct visibility in this case.

9 years agoFixed quote_method!() implementation
Vladimir Pouzanov [Sat, 20 Sep 2014 16:02:48 +0000 (17:02 +0100)]
Fixed quote_method!() implementation

Parser.parse_method now has a second argument, I assume ast::Inherited is the correct visibility in this case.

9 years agoauto merge of #17535 : Manishearth/rust/patch-2, r=steveklabnik
bors [Mon, 29 Sep 2014 07:43:07 +0000 (07:43 +0000)]
auto merge of #17535 : Manishearth/rust/patch-2, r=steveklabnik

It's a rather useful syntax, and non-obvious.

A friend of mine is learning Rust and was trying to find a way to easily do such an initialization — he couldn't find it in the guide and was pretty surprised when I showed him. Looks like something that should be mentioned.

r? @steveklabnik

9 years agoauto merge of #17321 : apoelstra/rust/error-on-unknown-impl, r=alexcrichton
bors [Mon, 29 Sep 2014 05:13:08 +0000 (05:13 +0000)]
auto merge of #17321 : apoelstra/rust/error-on-unknown-impl, r=alexcrichton

Followup to RFC 57.

Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060

9 years agoUse the same JSON schema for encoding enums in PrettyEncoder as in Encoder
Brian Koropoff [Mon, 29 Sep 2014 03:24:35 +0000 (20:24 -0700)]
Use the same JSON schema for encoding enums in PrettyEncoder as in Encoder

Closes issue #17607

9 years agoRegister new snapshots
Steven Fackler [Mon, 29 Sep 2014 02:28:48 +0000 (19:28 -0700)]
Register new snapshots

9 years agoauto merge of #17533 : michaelwoerister/rust/function-call-locs, r=luqmana
bors [Mon, 29 Sep 2014 01:03:06 +0000 (01:03 +0000)]
auto merge of #17533 : michaelwoerister/rust/function-call-locs, r=luqmana

This PR makes rustc emit debug locations for *all* call and invoke statements in LLVM IR, if they are contained within a function that debuginfo is enabled for. This is important because LLVM does not handle the case where a function body containing debuginfo is inlined into another function with debuginfo, but the inlined call statement does not have a debug location. In this case, LLVM will not know where (in terms of source code coordinates) the function was inlined to and we end up with some statements still linked to the source locations in there original, non-inlined function without any indication that they are indeed an inline-copy. Later, when generating DWARF from the IR, LLVM will interpret this as corrupt IR and abort.

Unfortunately, the undesirable case described above can still occur when using LTO. If there is a crate compiled without debuginfo calling into a crate compiled with debuginfo, we again end up with the conditions triggering the error. This is why some LTO tests still fail with the dreaded assertion, if the standard library was built with debuginfo enabled. That is, `RUSTFLAGS_STAGE2=-g make rustc-stage2` will succeed but `RUSTFLAGS_STAGE2=-g make check` will still fail after this PR has been merged. I will open a separate issue for this problem.

9 years agoAdd regression test for issue #17441
Brian Koropoff [Sat, 27 Sep 2014 19:22:32 +0000 (12:22 -0700)]
Add regression test for issue #17441

9 years agoReject casts to unsized types and suggest use of reference or box
Brian Koropoff [Sat, 27 Sep 2014 19:17:12 +0000 (12:17 -0700)]
Reject casts to unsized types and suggest use of reference or box

This prevents ICEs or less helpful diagnostics if typeck proceeds
further.  Closes issue #17441

9 years agoTest for `..` in range patterns
Nick Cameron [Wed, 24 Sep 2014 05:15:16 +0000 (17:15 +1200)]
Test for `..` in range patterns

9 years agoCorrectly populate trait impl map when checking for impl overlaps
Brian Koropoff [Sun, 28 Sep 2014 21:17:22 +0000 (14:17 -0700)]
Correctly populate trait impl map when checking for impl overlaps

Also fix an existing compile-fail test which was intended to cover
this case.

This closes issue #17593

9 years agoCleanup error messages for anonymous impl for types not declared in the current module
Andrew Poelstra [Tue, 16 Sep 2014 22:39:18 +0000 (17:39 -0500)]
Cleanup error messages for anonymous impl for types not declared in the current module

Followup to RFC 57.

Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060

9 years agoKeep ExpnId abstract by providing conversions
Keegan McAllister [Sun, 28 Sep 2014 16:25:48 +0000 (09:25 -0700)]
Keep ExpnId abstract by providing conversions

9 years agoauto merge of #17532 : ahmedcharles/rust/typo, r=alexcrichton
bors [Sun, 28 Sep 2014 11:38:01 +0000 (11:38 +0000)]
auto merge of #17532 : ahmedcharles/rust/typo, r=alexcrichton

9 years agoauto merge of #17527 : sfackler/rust/cfg-syntax, r=alexcrichton
bors [Sun, 28 Sep 2014 08:57:57 +0000 (08:57 +0000)]
auto merge of #17527 : sfackler/rust/cfg-syntax, r=alexcrichton

We'll need a snapshot before we can convert the codebase over and turn on the deprecation warnings.

cc #17490

This is sitting on top of #17506

9 years agoConvert cfg syntax to new system
Steven Fackler [Thu, 25 Sep 2014 03:22:57 +0000 (20:22 -0700)]
Convert cfg syntax to new system

This removes the ability to use `foo(bar)` style cfgs. Switch them to
`foo_bar` or `foo="bar"` instead.

[breaking-change]

9 years agoauto merge of #17529 : nodakai/rust/rustdoc-div-in-h1, r=alexcrichton
bors [Sun, 28 Sep 2014 05:58:04 +0000 (05:58 +0000)]
auto merge of #17529 : nodakai/rust/rustdoc-div-in-h1, r=alexcrichton

W3C HTML5 spec states that H1 must enclose "phrasing content" which
doesn't include DIV.  But SPAN is OK.
http://www.w3.org/TR/html5/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements

9 years agoDefailbloat fail!(&'static str)
Tobba [Sun, 28 Sep 2014 00:00:13 +0000 (02:00 +0200)]
Defailbloat fail!(&'static str)

9 years agoauto merge of #17523 : TeXitoi/rust/relicense-shootout-fasta-redux, r=brson
bors [Sat, 27 Sep 2014 23:12:54 +0000 (23:12 +0000)]
auto merge of #17523 : TeXitoi/rust/relicense-shootout-fasta-redux, r=brson

Everyone agreed.

Fix #17078

#14248 seems completed, as every src/test/bench/shootout-*.rs are relicensed after acceptation of this PR except:
- shootout-ackermann.rs: obsolete shootout bench
- shootout-fibo.rs:  obsolete shootout bench
- shootout-k-nucleotide-pipes.rs: slower that shootout-k-nucleotide-pipes.rs (and not so interesting as a benchmark)
- shootout-pfib.rs: does not seems related to the shootout

@brson OK?

9 years agomake EnumSet derive Ord and PartialOrd
Alexis Beingessner [Sat, 27 Sep 2014 20:47:53 +0000 (16:47 -0400)]
make EnumSet derive Ord and PartialOrd

9 years agoauto merge of #17517 : pczarn/rust/hashmap-lifetimes, r=alexcrichton
bors [Sat, 27 Sep 2014 18:57:46 +0000 (18:57 +0000)]
auto merge of #17517 : pczarn/rust/hashmap-lifetimes, r=alexcrichton

Fixes #17500

9 years agoTranslate inline assembly errors back to source locations
Keegan McAllister [Sat, 27 Sep 2014 08:33:36 +0000 (01:33 -0700)]
Translate inline assembly errors back to source locations

Fixes #17552.

9 years agoauto merge of #17334 : Gankro/rust/btree-vec, r=huonw
bors [Sat, 27 Sep 2014 16:17:50 +0000 (16:17 +0000)]
auto merge of #17334 : Gankro/rust/btree-vec, r=huonw

Replaces BTree with BTreeMap and BTreeSet, which are completely new implementations.
BTreeMap's internal Node representation is particularly inefficient at the moment to
make this first implementation easy to reason about and fairly safe. Both collections
are also currently missing some of the tooling specific to sorted collections, which
is planned as future work pending reform of these APIs. General implementation issues
are discussed with TODOs internally

[breaking-change]

Still waiting on compilation/test/bench stuff locally, but the edit-distance on any errors should be very small at this point. This is ready to be reviewed.

9 years agocomplete btree rewrite
Alexis Beingessner [Tue, 16 Sep 2014 14:49:26 +0000 (10:49 -0400)]
complete btree rewrite

Replaces BTree with BTreeMap and BTreeSet, which are completely new implementations.
BTreeMap's internal Node representation is particularly inefficient at the moment to
make this first implementation easy to reason about and fairly safe. Both collections
are also currently missing some of the tooling specific to sorted collections, which
is planned as future work pending reform of these APIs. General implementation issues
are discussed with TODOs internally

Perf results on x86_64 Linux:

test treemap::bench::find_rand_100                         ... bench:        76 ns/iter (+/- 4)
test treemap::bench::find_rand_10_000                      ... bench:       163 ns/iter (+/- 6)
test treemap::bench::find_seq_100                          ... bench:        77 ns/iter (+/- 3)
test treemap::bench::find_seq_10_000                       ... bench:       115 ns/iter (+/- 1)
test treemap::bench::insert_rand_100                       ... bench:       111 ns/iter (+/- 1)
test treemap::bench::insert_rand_10_000                    ... bench:       996 ns/iter (+/- 18)
test treemap::bench::insert_seq_100                        ... bench:       486 ns/iter (+/- 20)
test treemap::bench::insert_seq_10_000                     ... bench:       800 ns/iter (+/- 15)

test btree::map::bench::find_rand_100                      ... bench:        74 ns/iter (+/- 4)
test btree::map::bench::find_rand_10_000                   ... bench:       153 ns/iter (+/- 5)
test btree::map::bench::find_seq_100                       ... bench:        82 ns/iter (+/- 1)
test btree::map::bench::find_seq_10_000                    ... bench:       108 ns/iter (+/- 0)
test btree::map::bench::insert_rand_100                    ... bench:       220 ns/iter (+/- 1)
test btree::map::bench::insert_rand_10_000                 ... bench:       620 ns/iter (+/- 16)
test btree::map::bench::insert_seq_100                     ... bench:       411 ns/iter (+/- 12)
test btree::map::bench::insert_seq_10_000                  ... bench:       534 ns/iter (+/- 14)

BTreeMap still has a lot of room for optimization, but it's already beating out TreeMap on most access patterns.

[breaking-change]

9 years agoauto merge of #17511 : MatejLach/rust/iter_guide_typo, r=alexcrichton
bors [Sat, 27 Sep 2014 13:52:54 +0000 (13:52 +0000)]
auto merge of #17511 : MatejLach/rust/iter_guide_typo, r=alexcrichton

The sentence "The new iterator `filter()` produces returns only the elements that that closure returned `true` for:"  can be structured as:

"The new iterator `filter()` produces only the elements that that closure returned `true` for:"

or as:

"The new iterator `filter()` returns only the elements that that closure returned `true` for:"

however, not both.

I went with "produces", since it then talks about returning true and having "return" so close together doesn't sound nice.
r @steveklabnik ?

9 years agoauto merge of #17515 : mbrubeck/rust/patch-1, r=alexcrichton
bors [Sat, 27 Sep 2014 10:07:54 +0000 (10:07 +0000)]
auto merge of #17515 : mbrubeck/rust/patch-1, r=alexcrichton

r? @steveklabnik

9 years agoauto merge of #17512 : nodakai/rust/fix-ptr-guide, r=alexcrichton
bors [Sat, 27 Sep 2014 07:43:24 +0000 (07:43 +0000)]
auto merge of #17512 : nodakai/rust/fix-ptr-guide, r=alexcrichton

Fix rust-lang/rust#17255

This is such a trivial change.  Devs: perhaps you might want to omit to run `make check` on Travis.

9 years agoAdd test for #16465
Piotr Jawniak [Sat, 27 Sep 2014 06:14:12 +0000 (08:14 +0200)]
Add test for #16465

Closes #16465

9 years agoImplement Slice for String and str
Steven Fackler [Sat, 27 Sep 2014 04:46:22 +0000 (21:46 -0700)]
Implement Slice for String and str

Closes #17502

9 years agoauto merge of #17469 : sfackler/rust/into-result, r=aturon
bors [Sat, 27 Sep 2014 04:02:58 +0000 (04:02 +0000)]
auto merge of #17469 : sfackler/rust/into-result, r=aturon

This is the inverse of `Result::ok` and helps to bridge `Option` and
`Result` based APIs.

9 years agoRename raw::Box to raw::GcBox
Keegan McAllister [Sat, 27 Sep 2014 02:54:27 +0000 (19:54 -0700)]
Rename raw::Box to raw::GcBox

Fixes #17470.

9 years agoauto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichton
bors [Sat, 27 Sep 2014 01:37:53 +0000 (01:37 +0000)]
auto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichton

cc #17490

Reopening of #16230

9 years agoCorrect stability marker in string.rs
Squeaky [Sat, 27 Sep 2014 00:37:28 +0000 (02:37 +0200)]
Correct stability marker in string.rs

9 years agoHide the quote_*! macros when the feature gate is off
Keegan McAllister [Sat, 27 Sep 2014 00:14:23 +0000 (17:14 -0700)]
Hide the quote_*! macros when the feature gate is off

This makes it easier to experiment with improved quasiquoting as an ordinary
plugin library.

The list of quote macros in feature_gate.rs was already out of sync;
this commit also prevents that problem in the future.

9 years agodist: Make Windows installer modify system %PATH%
Mike Boutin [Fri, 26 Sep 2014 21:58:01 +0000 (17:58 -0400)]
dist: Make Windows installer modify system %PATH%

Modify the system %PATH% environment variable instead of the current
user's %PATH% environment. The current user will be an admin user
that may not be the same user who originally started the installer.
Closes #17570.

9 years agoauto merge of #17464 : pcwalton/rust/inherent-methods-on-equal-footing, r=nikomatsakis
bors [Fri, 26 Sep 2014 21:47:47 +0000 (21:47 +0000)]
auto merge of #17464 : pcwalton/rust/inherent-methods-on-equal-footing, r=nikomatsakis

over inherent methods accessible via more autoderefs.

This simplifies the trait matching algorithm. It breaks code like:

    impl Foo {
        fn foo(self) {
            // before this change, this will be called
        }
    }

    impl<'a,'b,'c> Trait for &'a &'b &'c Foo {
        fn foo(self) {
            // after this change, this will be called
        }
    }

    fn main() {
        let x = &(&(&Foo));
        x.foo();
    }

To explicitly indicate that you wish to call the inherent method, perform
explicit dereferences. For example:

    fn main() {
        let x = &(&(&Foo));
        (***x).foo();
    }

Part of #17282.

[breaking-change]

r? @nikomatsakis

9 years agolibrustc: Give trait methods accessible via fewer autoderefs priority
Patrick Walton [Tue, 23 Sep 2014 00:38:49 +0000 (17:38 -0700)]
librustc: Give trait methods accessible via fewer autoderefs priority
over inherent methods accessible via more autoderefs.

This simplifies the trait matching algorithm. It breaks code like:

    impl Foo {
        fn foo(self) {
            // before this change, this will be called
        }
    }

    impl<'a,'b,'c> Trait for &'a &'b &'c Foo {
        fn foo(self) {
            // after this change, this will be called
        }
    }

    fn main() {
        let x = &(&(&Foo));
        x.foo();
    }

To explicitly indicate that you wish to call the inherent method, perform
explicit dereferences. For example:

    fn main() {
        let x = &(&(&Foo));
        (***x).foo();
    }

Part of #17282.

[breaking-change]

9 years agotiny linguistic correction in docs: s/its'/its/
Mateusz Czapliński [Fri, 26 Sep 2014 17:51:33 +0000 (19:51 +0200)]
tiny linguistic correction in docs: s/its'/its/

See e.g.: http://dictionary.reference.com/browse/its

9 years agoFix `SliceMut` documentation
Jorge Aparicio [Fri, 26 Sep 2014 16:53:47 +0000 (11:53 -0500)]
Fix `SliceMut` documentation

The syntax sugar is `[mut from..to]` not `[from..to]`

9 years agoAdd Option::{ok_or, ok_or_else}
Steven Fackler [Tue, 23 Sep 2014 06:18:30 +0000 (23:18 -0700)]
Add Option::{ok_or, ok_or_else}

These are the inverses of `Result::ok` and help to bridge `Option` and
`Result` based APIs.

9 years agolibrustc: Eliminate the `ref` syntax for unboxed closure capture clauses
Patrick Walton [Wed, 24 Sep 2014 17:58:53 +0000 (10:58 -0700)]
librustc: Eliminate the `ref` syntax for unboxed closure capture clauses
in favor of `move`.

This breaks code that used `move` as an identifier, because it is now a
keyword. Change such identifiers to not use the keyword `move`.
Additionally, this breaks code that was counting on by-value or
by-reference capture semantics for unboxed closures (behind the feature
gate). Change `ref |:|` to `|:|` and `|:|` to `move |:|`.

Part of RFC #63; part of issue #12831.

[breaking-change]

9 years agoauto merge of #17494 : aturon/rust/stabilize-mutable-slices, r=alexcrichton
bors [Fri, 26 Sep 2014 11:44:01 +0000 (11:44 +0000)]
auto merge of #17494 : aturon/rust/stabilize-mutable-slices, r=alexcrichton

This commit is another in the series of vector slice API stabilization. The focus here is the *mutable* slice API.

Largely, this API inherits the stability attributes [previously assigned](rust-lang#16332) to the analogous methods on immutable slides. It also adds comments to a few `unstable` attributes that were previously missing them.

In addition, the commit adds several `_mut` variants of APIs that were missing:

- `init_mut`
- `head_mut`
- `tail_mut`
- `splitn_mut`
- `rsplitn_mut`

Some of the unsafe APIs -- `unsafe_set`, `init_elem`, and `copy_memory` -- were deprecated in favor of working through `as_mut_ptr`, to simplify the API surface.

Due to deprecations, this is a:

[breaking-change]

9 years agoFix Iterator::fuse example
Steven Fackler [Fri, 26 Sep 2014 06:02:28 +0000 (23:02 -0700)]
Fix Iterator::fuse example

The for loop would *always* exaust the iterator previously, which seems
like behavior that was not intended. It's still kind of a weird
function.

9 years agoauto merge of #17549 : brson/rust/morewinfail, r=alexcrichton
bors [Fri, 26 Sep 2014 05:57:49 +0000 (05:57 +0000)]
auto merge of #17549 : brson/rust/morewinfail, r=alexcrichton

32-bit builds pass the full 'make check' on the bots after this.

9 years agoIgnore two I/O tests that are failing on the win32 bot
Brian Anderson [Thu, 25 Sep 2014 20:11:57 +0000 (13:11 -0700)]
Ignore two I/O tests that are failing on the win32 bot

9 years agoauto merge of #17504 : danburkert/rust/tuple-serialization, r=alexcrichton
bors [Fri, 26 Sep 2014 03:32:46 +0000 (03:32 +0000)]
auto merge of #17504 : danburkert/rust/tuple-serialization, r=alexcrichton

The tuple serialization logic should be using the tuple-specific emit function.  This fixes part of #17158.  The JSON encoder already proxies to `emit_seq_elt` when `emit_tuple_arg` is called, so this should have an effect.

9 years agoAdded bitflag toggling.
Clark Gaebel [Fri, 26 Sep 2014 01:08:49 +0000 (18:08 -0700)]
Added bitflag toggling.

9 years agoAdd tests for new _mut variants
Aaron Turon [Tue, 23 Sep 2014 23:23:27 +0000 (16:23 -0700)]
Add tests for new _mut variants

9 years agoFallout from deprecation
Aaron Turon [Tue, 23 Sep 2014 22:33:35 +0000 (15:33 -0700)]
Fallout from deprecation

9 years agoStabilize mutable slice API
Aaron Turon [Mon, 22 Sep 2014 23:23:00 +0000 (16:23 -0700)]
Stabilize mutable slice API

This commit is another in the series of vector slice API
stabilization. The focus here is the *mutable* slice API.

Largely, this API inherits the stability attributes [previously
assigned](https://github.com/rust-lang/rust/pull/16332) to the analogous
methods on immutable slides. It also adds comments to a few `unstable`
attributes that were previously missing them.

In addition, the commit adds several `_mut` variants of APIs that were
missing:

- `init_mut`
- `head_mut`
- `tail_mut`
- `splitn_mut`
- `rsplitn_mut`

Some of the unsafe APIs -- `unsafe_set`, `init_elem`, and `copy_memory`
-- were deprecated in favor of working through `as_mut_ptr`, to simplify
the API surface.

Due to deprecations, this is a:

[breaking-change]

9 years agoauto merge of #17495 : alexcrichton/rust/snapshots, r=pcwalton
bors [Fri, 26 Sep 2014 00:27:45 +0000 (00:27 +0000)]
auto merge of #17495 : alexcrichton/rust/snapshots, r=pcwalton

cc @nick29581

9 years agofix a misspelling in the configure script
Evan Klitzke [Thu, 25 Sep 2014 23:40:10 +0000 (16:40 -0700)]
fix a misspelling in the configure script

9 years agoUse 'dev' for the release channel and version suffix when building from source
Brian Anderson [Thu, 25 Sep 2014 22:28:00 +0000 (15:28 -0700)]
Use 'dev' for the release channel and version suffix when building from source

This is more consistent with how the other channels work.

9 years agoconfigure: Fix the compatibility code for --enable-nightly
Brian Anderson [Thu, 25 Sep 2014 20:34:16 +0000 (13:34 -0700)]
configure: Fix the compatibility code for --enable-nightly

When --enable-nightly is not specified this expression is malformed
because $CFG_ENABLE_NIGHTLY is undefined.

9 years agoauto merge of #17466 : nikomatsakis/rust/oibt, r=pcwalton
bors [Thu, 25 Sep 2014 19:02:44 +0000 (19:02 +0000)]
auto merge of #17466 : nikomatsakis/rust/oibt, r=pcwalton

Moves the vast majority of builtin bound checking out of type contents and into the trait system.

This is a preliminary step for a lot of follow-on work:

- opt-in builtin types, obviously
- generalized where clauses, because TypeContents has this notion that a type parameter has a single set of builtin kinds, but with where clauses it depends on context
- generalized coherence, because this adds support for recursive trait selection

Unfortunately I wasn't able to completely remove Type Contents from the front-end checking in this PR. It's still used by EUV to decide what gets moved and what doesn't.

r? @pcwalton

9 years agoMention array sugar in guide
Manish Goregaokar [Thu, 25 Sep 2014 18:30:04 +0000 (00:00 +0530)]
Mention array sugar in guide

9 years agoFix various places that were affected by adding core as dep of libc
Niko Matsakis [Thu, 25 Sep 2014 17:59:24 +0000 (13:59 -0400)]
Fix various places that were affected by adding core as dep of libc

9 years agoauto merge of #17482 : hoeppnertill/rust/master, r=alexcrichton
bors [Thu, 25 Sep 2014 17:17:43 +0000 (17:17 +0000)]
auto merge of #17482 : hoeppnertill/rust/master, r=alexcrichton

Intended to prevent each user to write his own partial_min/max, possibly differing in slight details. @sfackler encouraged to PR this on IRC.

(Let's hope this works... First PR.)

9 years agoauto merge of #17455 : steveklabnik/rust/document_default, r=alexcrichton
bors [Thu, 25 Sep 2014 15:32:49 +0000 (15:32 +0000)]
auto merge of #17455 : steveklabnik/rust/document_default, r=alexcrichton

Given that the `Default` module is now stable, it might as well get good docs.

9 years agoCorrect tense
Matej Lach [Thu, 25 Sep 2014 15:13:20 +0000 (16:13 +0100)]
Correct tense

9 years agoauto merge of #17498 : coyotebush/rust/iter-doc, r=huonw
bors [Thu, 25 Sep 2014 13:47:46 +0000 (13:47 +0000)]
auto merge of #17498 : coyotebush/rust/iter-doc, r=huonw

OrdIterator: the doc says that values must implement `PartialOrd`, while the implementation is only for `Ord` values. It looks like this initially got out of sync in 4e1c215. Removed the doc sentence entirely since it seems redundant.

MultiplicativeIterator: Fixed weird sentence.

9 years agodebuginfo: Make sure that all calls to drop glue are associated with debug locations.
Michael Woerister [Wed, 24 Sep 2014 06:49:38 +0000 (08:49 +0200)]
debuginfo: Make sure that all calls to drop glue are associated with debug locations.

This commit makes rustc emit debug locations for all call
and invoke statements in LLVM IR, if they are contained
within a function that debuginfo is enabled for. This is
important because LLVM does not handle the case where a
function body containing debuginfo is inlined into another
function with debuginfo, but the inlined call statement
does not have a debug location. In this case, LLVM will
not know where (in terms of source code coordinates) the
function was inlined to and we end up with some statements
still linked to the source locations in there original,
non-inlined function without any indication that they are
indeed an inline-copy. Later, when generating DWARF from
the IR, LLVM will interpret this as corrupt IR and abort.

Unfortunately, the undesirable case described above can
still occur when using LTO. If there is a crate compiled
without debuginfo calling into a crate compiled with
debuginfo, we again end up with the conditions triggering
the error. This is why some LTO tests still fail with the
dreaded assertion, if the standard library was built with
debuginfo enabled.
That is, `RUSTFLAGS_STAGE2=-g make rustc-stage2` will
succeed but `RUSTFLAGS_STAGE2=-g make check` will still
fail after this commit has been merged. This is a problem
that has to be dealt with separately.

Fixes #17201
Fixes #15816
Fixes #15156

9 years agoAdd partial_min/max to libcore/cmp
Till Hoeppner [Tue, 23 Sep 2014 18:01:59 +0000 (20:01 +0200)]
Add partial_min/max to libcore/cmp

Add partial_min/max to libcore/cmp

Match against None and mark as experimental

Shortened documentation.

Removed whitespace

9 years agoauto merge of #17497 : nodakai/rust/libnative-misc-fixes, r=alexcrichton
bors [Thu, 25 Sep 2014 12:02:52 +0000 (12:02 +0000)]
auto merge of #17497 : nodakai/rust/libnative-misc-fixes, r=alexcrichton

libnative/io: datasync() wrongly called fsync().
liblibc and libnative: send() should use const buffers.

9 years agoFix typo, structs => fields.
Ahmed Charles [Thu, 25 Sep 2014 11:51:18 +0000 (04:51 -0700)]
Fix typo, structs => fields.

9 years agoRemove as much of TypeContents as I can -- unfortunately, it is still
Niko Matsakis [Tue, 23 Sep 2014 00:54:02 +0000 (20:54 -0400)]
Remove as much of TypeContents as I can -- unfortunately, it is still
used by EUV to compute whether a given type moves-by-default.

9 years agoMove checking of whether fields are Sized or not into wf / trait code.
Niko Matsakis [Tue, 23 Sep 2014 00:12:15 +0000 (20:12 -0400)]
Move checking of whether fields are Sized or not into wf / trait code.

9 years agoRemove the last redundant check from kindck, and then remove the pass as well.
Niko Matsakis [Mon, 22 Sep 2014 19:08:23 +0000 (15:08 -0400)]
Remove the last redundant check from kindck, and then remove the pass as well.