]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorollup merge of #18413 : bkoropoff/issue-18412
Alex Crichton [Thu, 30 Oct 2014 15:57:40 +0000 (08:57 -0700)]
rollup merge of #18413 : bkoropoff/issue-18412

9 years agorollup merge of #18411 : richo/tm-null-check
Alex Crichton [Thu, 30 Oct 2014 15:57:39 +0000 (08:57 -0700)]
rollup merge of #18411 : richo/tm-null-check

9 years agorollup merge of #18409 : gamazeps/issue15273
Alex Crichton [Thu, 30 Oct 2014 15:57:36 +0000 (08:57 -0700)]
rollup merge of #18409 : gamazeps/issue15273

9 years agorollup merge of #18408 : thestinger/unsafe
Alex Crichton [Thu, 30 Oct 2014 15:57:34 +0000 (08:57 -0700)]
rollup merge of #18408 : thestinger/unsafe

9 years agorollup merge of #18407 : thestinger/arena
Alex Crichton [Thu, 30 Oct 2014 15:57:30 +0000 (08:57 -0700)]
rollup merge of #18407 : thestinger/arena

9 years agorollup merge of #18397 : aochagavia/ascii
Alex Crichton [Thu, 30 Oct 2014 15:57:17 +0000 (08:57 -0700)]
rollup merge of #18397 : aochagavia/ascii

9 years agorollup merge of #18395 : cakebaker/fix_use_of_sqrt
Alex Crichton [Thu, 30 Oct 2014 15:55:48 +0000 (08:55 -0700)]
rollup merge of #18395 : cakebaker/fix_use_of_sqrt

9 years agorollup merge of #18393 : aochagavia/prelude
Alex Crichton [Thu, 30 Oct 2014 15:55:46 +0000 (08:55 -0700)]
rollup merge of #18393 : aochagavia/prelude

9 years agorollup merge of #18392 : cakebaker/remove_double_negation
Alex Crichton [Thu, 30 Oct 2014 15:55:45 +0000 (08:55 -0700)]
rollup merge of #18392 : cakebaker/remove_double_negation

9 years agorollup merge of #18383 : bkoropoff/issue-17361
Alex Crichton [Thu, 30 Oct 2014 15:55:40 +0000 (08:55 -0700)]
rollup merge of #18383 : bkoropoff/issue-17361

9 years agorollup merge of #18381 : pelmers/patch-1
Alex Crichton [Thu, 30 Oct 2014 15:55:39 +0000 (08:55 -0700)]
rollup merge of #18381 : pelmers/patch-1

9 years agoauto merge of #18374 : steveklabnik/rust/gh18197, r=sfackler
bors [Thu, 30 Oct 2014 13:57:07 +0000 (13:57 +0000)]
auto merge of #18374 : steveklabnik/rust/gh18197, r=sfackler

Fixes #18197

9 years agoauto merge of #18367 : pcwalton/rust/inline-atomic-constructors, r=thestinger
bors [Thu, 30 Oct 2014 11:12:04 +0000 (11:12 +0000)]
auto merge of #18367 : pcwalton/rust/inline-atomic-constructors, r=thestinger

Servo really wants this.

r? @brson

9 years agoauto merge of #18279 : bgamari/rust/check-static-recursion, r=alexcrichton
bors [Thu, 30 Oct 2014 09:12:05 +0000 (09:12 +0000)]
auto merge of #18279 : bgamari/rust/check-static-recursion, r=alexcrichton

I just found this patch which at some point solved a problem I encountered. Unfortunately I apparently dropped it before I managed to write a test case. I'll try to dig up the code that triggered the issue.

9 years agoauto merge of #17704 : nick29581/rust/object-safety, r=nikomatsakis
bors [Thu, 30 Oct 2014 06:32:11 +0000 (06:32 +0000)]
auto merge of #17704 : nick29581/rust/object-safety, r=nikomatsakis

r? @nikomatsakis

9 years agoauto merge of #18448 : brson/rust/clean-llvm, r=alexcrichton
bors [Thu, 30 Oct 2014 04:32:08 +0000 (04:32 +0000)]
auto merge of #18448 : brson/rust/clean-llvm, r=alexcrichton

When building for multiple targets, the initial 'make' invocation
always fails. The missing build stamp causes clean-llvm to be
invoked, but clean-llvm cleans *all* llvm builds. So what happens
is that 1) all llvm's are cleaned (a no-op), 2) llvm-${target1}
builds, 3) all llvm's are cleaned (deleting llvm-${target1}),
4) llvm-${target2} is built, 5) the remaining build for ${target1}
fails because llvm does not exist.

This makes the clean operation only clean the correct llvm build.
Should greatly reduce bot failures.

9 years agocheck_static_recursion: Handle foreign items
Ben Gamari [Fri, 24 Oct 2014 14:32:43 +0000 (10:32 -0400)]
check_static_recursion: Handle foreign items

9 years agoTry and fix Windows terminal
Nick Cameron [Wed, 22 Oct 2014 04:42:13 +0000 (17:42 +1300)]
Try and fix Windows terminal

9 years agoRebasing fixes
Nick Cameron [Wed, 22 Oct 2014 03:53:03 +0000 (16:53 +1300)]
Rebasing fixes

9 years agomk: Clean just one llvm build at a time. Closes #17852
Brian Anderson [Thu, 30 Oct 2014 02:54:52 +0000 (19:54 -0700)]
mk: Clean just one llvm build at a time. Closes #17852

When building for multiple targets, the initial 'make' invocation
always fails. The missing build stamp causes clean-llvm to be
invoked, but clean-llvm cleans *all* llvm builds. So what happens
is that 1) all llvm's are cleaned (a no-op), 2) llvm-${target1}
builds, 3) all llvm's are cleaned (deleting llvm-${target1}),
4) llvm-${target2} is built, 5) the remaining build for ${target1}
fails because llvm does not exist.

This makes the clean operation only clean the correct llvm build.
Should greatly reduce bot failures.

9 years agoChanges for Windows terminal
Nick Cameron [Mon, 20 Oct 2014 21:59:00 +0000 (10:59 +1300)]
Changes for Windows terminal

9 years agoChange extensions traits to blanket impls
Nick Cameron [Thu, 16 Oct 2014 00:49:00 +0000 (13:49 +1300)]
Change extensions traits to blanket impls

9 years agochanges to tests
Nick Cameron [Wed, 1 Oct 2014 06:31:21 +0000 (19:31 +1300)]
changes to tests

9 years agochanges to libs
Nick Cameron [Wed, 1 Oct 2014 06:01:08 +0000 (19:01 +1300)]
changes to libs

9 years agoEnforce object safety
Nick Cameron [Wed, 1 Oct 2014 03:43:39 +0000 (16:43 +1300)]
Enforce object safety

closes #17670

[breaking-change]

Traits must be object-safe if they are to be used in trait objects. This might require splitting a trait into object-safe and non-object-safe parts.

Some standard library traits in std::io have been split - Reader has new traits BytesReader (for the bytes method) and AsRefReader (for by_ref), Writer has new trait AsRefWriter (for by_ref). All these new traits have blanket impls, so any type which implements Reader or Writer (respectively) will have an implmentation of the new traits. To fix your code, you just need to `use` the new trait.

9 years agoauto merge of #18359 : 1-more/rust/feature, r=alexcrichton
bors [Thu, 30 Oct 2014 00:27:02 +0000 (00:27 +0000)]
auto merge of #18359 : 1-more/rust/feature, r=alexcrichton

9 years agoauto merge of #18357 : TeXitoi/rust/simplify-reverse-complement, r=alexcrichton
bors [Wed, 29 Oct 2014 22:17:00 +0000 (22:17 +0000)]
auto merge of #18357 : TeXitoi/rust/simplify-reverse-complement, r=alexcrichton

Simpler, safer and shorter, in the same spirit of the current version, and the
same performances.

@mahkoh please review, I think I didn't change any performances related thing.

9 years agorustc: fail if LLVM is passed an invalid triple
Richo Healey [Wed, 29 Oct 2014 01:58:46 +0000 (18:58 -0700)]
rustc: fail if LLVM is passed an invalid triple

This changes create_target_machine to correctly return a Result (Since
the underlying LLVM function can fail and return NULL)

9 years agoauto merge of #17894 : steveklabnik/rust/fail_to_panic, r=aturon
bors [Wed, 29 Oct 2014 20:16:57 +0000 (20:16 +0000)]
auto merge of #17894 : steveklabnik/rust/fail_to_panic, r=aturon

This in-progress PR implements https://github.com/rust-lang/rust/issues/17489.

I made the code changes in this commit, next is to go through alllllllll the documentation and fix various things.

- Rename column headings as appropriate, `# Panics` for panic conditions and `# Errors` for `Result`s.
- clean up usage of words like 'fail' in error messages

Anything else to add to the list, @aturon ? I think I should leave the actual functions with names like `slice_or_fail` alone, since you'll get to those in your conventions work?

I'm submitting just the code bits now so that we can see it separately, and I also don't want to have to keep re-building rust over and over again if I don't have to :wink:

Listing all the bits so I can remember as I go:

- [x] compiler-rt
- [x] compiletest
- [x] doc
- [x] driver
- [x] etc
- [x] grammar
- [x] jemalloc
- [x] liballoc
- [x] libarena
- [x] libbacktrace
- [x] libcollections
- [x] libcore
- [x] libcoretest
- [x] libdebug
- [x] libflate
- [x] libfmt_macros
- [x] libfourcc
- [x] libgetopts
- [x] libglob
- [x] libgraphviz
- [x] libgreen
- [x] libhexfloat
- [x] liblibc
- [x] liblog
- [x] libnative
- [x] libnum
- [x] librand
- [x] librbml
- [x] libregex
- [x] libregex_macros
- [x] librlibc
- [x] librustc
- [x] librustc_back
- [x] librustc_llvm
- [x] librustdoc
- [x] librustrt
- [x] libsemver
- [x] libserialize
- [x] libstd
- [x] libsync
- [x] libsyntax
- [x] libterm
- [x] libtest
- [x] libtime
- [x] libunicode
- [x] liburl
- [x] libuuid
- [x] llvm
- [x] rt
- [x] test

9 years agoUpdate infrastructure for fail -> panic
Steve Klabnik [Tue, 28 Oct 2014 18:07:33 +0000 (14:07 -0400)]
Update infrastructure for fail -> panic

This includes updating the language items and marking what needs to
change after a snapshot.

If you do not use the standard library, the language items you need to
implement have changed. For example:

```rust
 #[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} }
```

is now

```rust
 #[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
```

Related, lesser-implemented language items `fail` and
`fail_bounds_check` have become `panic` and `panic_bounds_check`, as
well. These are implemented by `libcore`, so it is unlikely (though
possible!) that these two renamings will affect you.

[breaking-change]

Fix test suite

9 years agoauto merge of #18282 : pczarn/rust/regex-parse, r=burntsushi
bors [Wed, 29 Oct 2014 18:17:00 +0000 (18:17 +0000)]
auto merge of #18282 : pczarn/rust/regex-parse, r=burntsushi

Fixes #18034

3 bugs fixed.

9 years agoRename fail! to panic!
Steve Klabnik [Thu, 9 Oct 2014 19:17:22 +0000 (15:17 -0400)]
Rename fail! to panic!

https://github.com/rust-lang/rfcs/pull/221

The current terminology of "task failure" often causes problems when
writing or speaking about code. You often want to talk about the
possibility of an operation that returns a Result "failing", but cannot
because of the ambiguity with task failure. Instead, you have to speak
of "the failing case" or "when the operation does not succeed" or other
circumlocutions.

Likewise, we use a "Failure" header in rustdoc to describe when
operations may fail the task, but it would often be helpful to separate
out a section describing the "Err-producing" case.

We have been steadily moving away from task failure and toward Result as
an error-handling mechanism, so we should optimize our terminology
accordingly: Result-producing functions should be easy to describe.

To update your code, rename any call to `fail!` to `panic!` instead.
Assuming you have not created your own macro named `panic!`, this
will work on UNIX based systems:

    grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g'

You can of course also do this by hand.

[breaking-change]

9 years agoauto merge of #18375 : steveklabnik/rust/gh17969, r=alexcrichton
bors [Wed, 29 Oct 2014 15:17:01 +0000 (15:17 +0000)]
auto merge of #18375 : steveklabnik/rust/gh17969, r=alexcrichton

Fixes #17969

9 years agoauto merge of #18365 : bjz/rust/token, r=alexcrichton
bors [Wed, 29 Oct 2014 10:22:01 +0000 (10:22 +0000)]
auto merge of #18365 : bjz/rust/token, r=alexcrichton

[breaking-change]

(for syntax-extensions)

- Token variant identifiers have been converted to PascalCase for consistency with Rust coding standards
- Some free-functions in `syntax::token` have been converted to methods on `syntax::token::Token`:
    - `can_begin_expr`         -> `Token::can_begin_expr`
    - `close_delimiter_for`    -> `Token::get_close_delimiter`
    - `is_lit`                 -> `Token::is_lit`
    - `is_ident`               -> `Token::is_ident`
    - `is_path`                -> `Token::is_path`
    - `is_plain_ident`         -> `Token::is_plain_ident`
    - `is_lifetime`            -> `Token::is_lifetime`
    - `is_mutability`          -> `Token::is_mutability`
    - `to_binop`               -> `Token::to_binop`
    - `is_keyword`             -> `Token::is_keyword`
    - `is_any_keyword`         -> `Token:is_any_keyword`
    - `is_strict_keyword`      -> `Token::is_strict_keyword`
    - `is_reserved_keyword`    -> `Token::is_reserved_keyword`
    - `mtwt_token_eq`          -> `Token::mtwt_eq`
- `token::Ident` now takes an enum instead of a boolean for clarity
- `token::{to_string, binop_to_string}` were moved to `pprust::{token_to_string, binop_to_string}`

9 years agoauto merge of #18340 : chastell/rust/guide_closures_fixes, r=steveklabnik
bors [Wed, 29 Oct 2014 06:36:57 +0000 (06:36 +0000)]
auto merge of #18340 : chastell/rust/guide_closures_fixes, r=steveklabnik

Some minor wording fixes to the Closures chapter; my brain tripped a few times when reading it, so I tried to come up with something a bit smoother. I’m not a native speaker, so please do review this critically.

9 years agoAdd regression test for issue #18412
Brian Koropoff [Wed, 29 Oct 2014 03:09:49 +0000 (20:09 -0700)]
Add regression test for issue #18412

9 years agoFix ICE assigning methods to local variables
Brian Koropoff [Wed, 29 Oct 2014 02:59:20 +0000 (19:59 -0700)]
Fix ICE assigning methods to local variables

This just adds some missing match cases in ty and trans

Closes #18412

9 years agoauto merge of #18410 : thestinger/rust/revert-parallel, r=alexcrichton
bors [Wed, 29 Oct 2014 02:26:59 +0000 (02:26 +0000)]
auto merge of #18410 : thestinger/rust/revert-parallel, r=alexcrichton

This reverts commit c245c5bbad10923b47c9f66d5f0da2913ef11a38.

Parallel code generation generates invalid code for librand, which is
caught by recent versions of binutils.

9 years agoRevert "enable parallel codegen by default"
Daniel Micay [Wed, 29 Oct 2014 00:09:24 +0000 (20:09 -0400)]
Revert "enable parallel codegen by default"

This reverts commit c245c5bbad10923b47c9f66d5f0da2913ef11a38.

Parallel code generation generates invalid code for librand, which is
caught by recent versions of binutils.

9 years agoDiagnostic: resolve bare fn in expected closure
gamazeps [Tue, 28 Oct 2014 23:59:36 +0000 (00:59 +0100)]
Diagnostic: resolve bare fn in expected closure

Closes #15273 (I did not find how to get the identifier in the message
:/)

Also creates the span_help! macro associated with #18126

9 years agoreference: document unwinding unsafety issues
Daniel Micay [Tue, 28 Oct 2014 22:46:27 +0000 (18:46 -0400)]
reference: document unwinding unsafety issues

9 years agoreference: slices are now regular types
Daniel Micay [Tue, 28 Oct 2014 22:36:43 +0000 (18:36 -0400)]
reference: slices are now regular types

9 years agoreference: note the existence of UnsafeCell
Daniel Micay [Tue, 28 Oct 2014 22:31:09 +0000 (18:31 -0400)]
reference: note the existence of UnsafeCell

9 years agoauto merge of #17603 : jakub-/rust/ty_bot, r=nikomatsakis
bors [Tue, 28 Oct 2014 22:11:56 +0000 (22:11 +0000)]
auto merge of #17603 : jakub-/rust/ty_bot, r=nikomatsakis

We now instead use a fresh variable for expressions that diverge.

Closes #14973.
Closes #13847.

[Work in progress]

cc @nikomatsakis

9 years agorephrase some comments according to remarks in the PR
Guillaume Pinot [Mon, 27 Oct 2014 16:24:10 +0000 (17:24 +0100)]
rephrase some comments according to remarks in the PR

9 years agoauto merge of #18291 : japaric/rust/dstify, r=aturon
bors [Tue, 28 Oct 2014 19:56:56 +0000 (19:56 +0000)]
auto merge of #18291 : japaric/rust/dstify, r=aturon

This PR changes the signature of several methods from `foo(self, ...)` to `foo(&self, ...)`/`foo(&mut self, ...)`, but there is no breakage of the usage of these methods due to the autoref nature of `method.call()`s. This PR also removes the lifetime parameter from some traits (`Trait<'a>` -> `Trait`). These changes break any use of the extension traits for generic programming, but those traits are not meant to be used for generic programming in the first place. In the whole rust distribution there was only one misuse of a extension trait as a bound, which got corrected (the bound was unnecessary and got removed) as part of this PR.

I've kept the commits as small and self-contained as possible for reviewing sake, but I can squash them when the review is over.

See this [table] to get an idea of what's left to be done. I've already DSTified [`Show`][show] and I'm working on `Hash`, but bootstrapping those changes seem to require a more recent snapshot (#18259 does the trick)

r? @aturon
cc #16918

[show]: https://github.com/japaric/rust/commits/show
[table]: https://docs.google.com/spreadsheets/d/1MZ_iSNuzsoqeS-mtLXnj9m0hBYaH5jI8k9G_Ud8FT5g/edit?usp=sharing

9 years agoFix example for BufferedReader
Steve Klabnik [Mon, 27 Oct 2014 18:34:47 +0000 (14:34 -0400)]
Fix example for BufferedReader

Fixes #18197

9 years agoupdate keyword list
Steve Klabnik [Mon, 27 Oct 2014 18:49:22 +0000 (14:49 -0400)]
update keyword list

Fixes #17969

9 years agoauto merge of #17851 : brson/rust/rustup, r=alexcrichton
bors [Tue, 28 Oct 2014 17:47:01 +0000 (17:47 +0000)]
auto merge of #17851 : brson/rust/rustup, r=alexcrichton

Just to have it somewhere to point to. Updating it will not
automatically update the one on static.rust-lang.org.

9 years agoAddress review comments
Jakub Bukaj [Tue, 28 Oct 2014 17:32:05 +0000 (18:32 +0100)]
Address review comments

9 years agoLong lines
Brian Anderson [Tue, 28 Oct 2014 17:24:03 +0000 (10:24 -0700)]
Long lines

9 years agoUpdate tests with the new error messages
Jakub Bukaj [Fri, 24 Oct 2014 19:17:50 +0000 (21:17 +0200)]
Update tests with the new error messages

9 years agoRemove ty_bot from the type system
Jakub Bukaj [Fri, 24 Oct 2014 19:14:37 +0000 (21:14 +0200)]
Remove ty_bot from the type system

We now instead use a fresh variable for expressions that diverge.

9 years agoRemove unnecessary clone in ascii.rs
Adolfo Ochagavía [Tue, 28 Oct 2014 15:32:24 +0000 (16:32 +0100)]
Remove unnecessary clone in ascii.rs

9 years agoGuide: Fix use of sqrt() in example
Daniel Hofstetter [Tue, 28 Oct 2014 15:09:14 +0000 (16:09 +0100)]
Guide: Fix use of sqrt() in example

9 years agoAdd ptr::RawMutPtr to prelude
Adolfo Ochagavía [Tue, 28 Oct 2014 14:53:09 +0000 (15:53 +0100)]
Add ptr::RawMutPtr to prelude

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

9 years agoFix the output of negative duration
Vladimir Smola [Mon, 27 Oct 2014 02:28:24 +0000 (09:28 +0700)]
Fix the output of negative duration

Technically speaking, negative duration is not valid ISO 8601, but we need to
print it anyway. If `d` is a positive duration with the output `xxxxxxx`, then
the expected output of negative `-d` value is `-xxxxxxx`. I.e. the idea is to
print negative durations as positive with a leading minus sign.

Closes #18181.

9 years agoauto merge of #18273 : gamazeps/rust/issue18218, r=steveklabnik
bors [Tue, 28 Oct 2014 14:36:54 +0000 (14:36 +0000)]
auto merge of #18273 : gamazeps/rust/issue18218, r=steveklabnik

Closes #18218

9 years agoRemove double negation from sqrt's doc comment
Daniel Hofstetter [Tue, 28 Oct 2014 14:07:22 +0000 (15:07 +0100)]
Remove double negation from sqrt's doc comment

9 years agoauto merge of #18386 : nikomatsakis/rust/issue-18208, r=pnkfelix
bors [Tue, 28 Oct 2014 12:26:50 +0000 (12:26 +0000)]
auto merge of #18386 : nikomatsakis/rust/issue-18208, r=pnkfelix

Avoid O(n^2) performance by reconsidering the full set of obligations only when we are about to report an error (#18208). I found it is still important to consider the full set in order to make tests like `let x: Vec<_> = obligations.iter().collect()` work.

I think we lack the infrastructure to write a regression test for this, but when I did manual testing I found a massive reduction in type-checking time for extreme examples like those found in #18208 vs stage0.

f? @dotdash

9 years agoAvoid O(n^2) performance by reconsidering the full set of obligations only when we...
Niko Matsakis [Tue, 28 Oct 2014 11:13:15 +0000 (07:13 -0400)]
Avoid O(n^2) performance by reconsidering the full set of obligations only when we are about to report an error (#18208). I found it is still important to consider the full set in order to make tests like `let x: Vec<_> = obligations.iter().collect()` work.

9 years agoauto merge of #18254 : areski/rust/pr-fix-vec-doc-example, r=alexcrichton
bors [Tue, 28 Oct 2014 10:11:51 +0000 (10:11 +0000)]
auto merge of #18254 : areski/rust/pr-fix-vec-doc-example, r=alexcrichton

- shrink_to_fit example is now more clear by asserting the capacity value
- annotation [0, mid) changed for [0, mid]

9 years agoauto merge of #18127 : alexcrichton/rust/deriving-arc, r=aturon
bors [Tue, 28 Oct 2014 08:01:52 +0000 (08:01 +0000)]
auto merge of #18127 : alexcrichton/rust/deriving-arc, r=aturon

This adds impls of Eq/Ord/PartialEq/PartialOrd/Show/Default to Arc<T>, and it
also removes the `Send + Sync` bound on the `Clone` impl of Arc to make it more
deriving-friendly. The `Send + Sync` requirement is still enforce on
construction, of course!

9 years agoAdd regression test for issue #17361
Brian Koropoff [Tue, 28 Oct 2014 07:03:02 +0000 (00:03 -0700)]
Add regression test for issue #17361

9 years agoRespect mut in &mut str in astconv
Brian Koropoff [Tue, 28 Oct 2014 07:01:23 +0000 (00:01 -0700)]
Respect mut in &mut str in astconv

Closes #17361

9 years agoauto merge of #18192 : jmesmon/rust/platform-generic, r=alexcrichton
bors [Tue, 28 Oct 2014 05:46:53 +0000 (05:46 +0000)]
auto merge of #18192 : jmesmon/rust/platform-generic, r=alexcrichton

The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).

9 years agoalloc: Make deriving more friendly with Arc
Alex Crichton [Fri, 17 Oct 2014 18:00:02 +0000 (11:00 -0700)]
alloc: Make deriving more friendly with Arc

This adds impls of Eq/Ord/PartialEq/PartialOrd/Show/Default to Arc<T>, and it
also removes the `Send + Sync` bound on the `Clone` impl of Arc to make it more
deriving-friendly. The `Send + Sync` requirement is still enforce on
construction, of course!

9 years agoMove token-to-string functions into print::pprust
Brendan Zabarauskas [Tue, 28 Oct 2014 00:05:28 +0000 (11:05 +1100)]
Move token-to-string functions into print::pprust

9 years agoUse an enum rather than a bool in token::Ident
Brendan Zabarauskas [Mon, 27 Oct 2014 15:01:44 +0000 (02:01 +1100)]
Use an enum rather than a bool in token::Ident

9 years agoConvert some token functions into methods
Brendan Zabarauskas [Mon, 27 Oct 2014 12:33:30 +0000 (23:33 +1100)]
Convert some token  functions into methods

9 years agoUse PascalCase for token variants
Brendan Zabarauskas [Mon, 27 Oct 2014 08:22:52 +0000 (19:22 +1100)]
Use PascalCase for token variants

9 years agoauto merge of #18144 : bkoropoff/rust/mighty-monomorphizin-unboxed-closures, r=nikoma...
bors [Tue, 28 Oct 2014 03:26:52 +0000 (03:26 +0000)]
auto merge of #18144 : bkoropoff/rust/mighty-monomorphizin-unboxed-closures, r=nikomatsakis

This allows unboxed closures that reference free type/region parameters to be monomorphized correctly in trans.

It was necessary to make `ty_unboxed_closure` carry around a `Substs` to accomplish this.  Plumbing this through typeck revealed several areas where type/region parameters in unboxed closure types are possibly not being handled correctly.  Since my goal was just to fix trans, I decided to leave FIXME comments on areas that still need attention and seek feedback on the best way to clean them up, possibly as a follow-up PR.

Closes #16791

9 years agoSmall grammar fix in rustdoc.md
Peter Elmers [Tue, 28 Oct 2014 01:58:05 +0000 (20:58 -0500)]
Small grammar fix in rustdoc.md

Happened to be reading through

9 years agoAdd regression test for issue #16791
Brian Koropoff [Sat, 18 Oct 2014 19:26:54 +0000 (12:26 -0700)]
Add regression test for issue #16791

9 years agoFix monomorphization of unboxed closures
Brian Koropoff [Sat, 18 Oct 2014 17:46:57 +0000 (10:46 -0700)]
Fix monomorphization of unboxed closures

This adds a `Substs` field to `ty_unboxed_closure` and plumbs basic
handling of it throughout the compiler. trans now correctly
monomorphizes captured free variables and llvm function defs.  This
fixes uses of unboxed closures which reference a free type or region
parameter from their environment in either their signature or free
variables.  Closes #16791

9 years agoDSTify [T]/str extension traits
Jorge Aparicio [Thu, 23 Oct 2014 15:43:18 +0000 (10:43 -0500)]
DSTify [T]/str extension traits

This PR changes the signature of several methods from `foo(self, ...)` to
`foo(&self, ...)`/`foo(&mut self, ...)`, but there is no breakage of the usage
of these methods due to the autoref nature of `method.call()`s. This PR also
removes the lifetime parameter from some traits (`Trait<'a>` -> `Trait`). These
changes break any use of the extension traits for generic programming, but
those traits are not meant to be used for generic programming in the first
place. In the whole rust distribution there was only one misuse of a extension
trait as a bound, which got corrected (the bound was unnecessary and got
removed) as part of this PR.

[breaking-change]

9 years agoauto merge of #18368 : alexcrichton/rust/rollup, r=alexcrichton
bors [Mon, 27 Oct 2014 23:02:55 +0000 (23:02 +0000)]
auto merge of #18368 : alexcrichton/rust/rollup, r=alexcrichton

9 years agorollup merge of #18259 : alexcrichton/snapshots
Alex Crichton [Mon, 27 Oct 2014 20:32:31 +0000 (13:32 -0700)]
rollup merge of #18259 : alexcrichton/snapshots

9 years agoTest fixes and rebase conflicts from rollup
Alex Crichton [Mon, 27 Oct 2014 16:11:07 +0000 (09:11 -0700)]
Test fixes and rebase conflicts from rollup

9 years agorollup merge of #18334 : csherratt/arc-encodable
Alex Crichton [Mon, 27 Oct 2014 16:09:50 +0000 (09:09 -0700)]
rollup merge of #18334 : csherratt/arc-encodable

9 years agorollup merge of #18366 : aochagavia/ascii
Alex Crichton [Mon, 27 Oct 2014 16:08:20 +0000 (09:08 -0700)]
rollup merge of #18366 : aochagavia/ascii

9 years agorollup merge of #18364 : cakebaker/missing_a
Alex Crichton [Mon, 27 Oct 2014 16:08:17 +0000 (09:08 -0700)]
rollup merge of #18364 : cakebaker/missing_a

9 years agorollup merge of #18362 : kevinmehall/pprint-struct-pat-shorthand
Alex Crichton [Mon, 27 Oct 2014 16:08:15 +0000 (09:08 -0700)]
rollup merge of #18362 : kevinmehall/pprint-struct-pat-shorthand

9 years agorollup merge of #18356 : jakub-/const-pattern-suptype
Alex Crichton [Mon, 27 Oct 2014 16:08:10 +0000 (09:08 -0700)]
rollup merge of #18356 : jakub-/const-pattern-suptype

9 years agorollup merge of #18347 : cakebaker/ffi
Alex Crichton [Mon, 27 Oct 2014 16:08:09 +0000 (09:08 -0700)]
rollup merge of #18347 : cakebaker/ffi

9 years agorollup merge of #18346 : aochagavia/closure-fields
Alex Crichton [Mon, 27 Oct 2014 16:08:06 +0000 (09:08 -0700)]
rollup merge of #18346 : aochagavia/closure-fields

9 years agorollup merge of #18344 : aochagavia/show-arc
Alex Crichton [Mon, 27 Oct 2014 16:08:04 +0000 (09:08 -0700)]
rollup merge of #18344 : aochagavia/show-arc

9 years agorollup merge of #18337 : bkoropoff/unboxed-imm-upvar-fixes
Alex Crichton [Mon, 27 Oct 2014 16:07:56 +0000 (09:07 -0700)]
rollup merge of #18337 : bkoropoff/unboxed-imm-upvar-fixes

9 years agorollup merge of #18332 : jbcrail/fix-comments
Alex Crichton [Mon, 27 Oct 2014 16:07:53 +0000 (09:07 -0700)]
rollup merge of #18332 : jbcrail/fix-comments

9 years agorollup merge of #18329 : sfackler/memwriter-clear
Alex Crichton [Mon, 27 Oct 2014 16:07:49 +0000 (09:07 -0700)]
rollup merge of #18329 : sfackler/memwriter-clear

9 years agorollup merge of #18327 : vadimcn/17982
Alex Crichton [Mon, 27 Oct 2014 16:07:47 +0000 (09:07 -0700)]
rollup merge of #18327 : vadimcn/17982

9 years agorollup merge of #18326 : sfackler/cfg-final
Alex Crichton [Mon, 27 Oct 2014 16:07:44 +0000 (09:07 -0700)]
rollup merge of #18326 : sfackler/cfg-final

9 years agorollup merge of #18324 : jakub-/eneedstest
Alex Crichton [Mon, 27 Oct 2014 16:07:42 +0000 (09:07 -0700)]
rollup merge of #18324 : jakub-/eneedstest

9 years agorollup merge of #18321 : chastell/guide_refresh_testing_output
Alex Crichton [Mon, 27 Oct 2014 16:07:40 +0000 (09:07 -0700)]
rollup merge of #18321 : chastell/guide_refresh_testing_output

9 years agorollup merge of #18320 : chastell/guide_simplify_formatting
Alex Crichton [Mon, 27 Oct 2014 16:07:38 +0000 (09:07 -0700)]
rollup merge of #18320 : chastell/guide_simplify_formatting

9 years agorollup merge of #18316 : thestinger/raw
Alex Crichton [Mon, 27 Oct 2014 16:07:29 +0000 (09:07 -0700)]
rollup merge of #18316 : thestinger/raw

9 years agorollup merge of #18315 : arielb1/constexpr-addr
Alex Crichton [Mon, 27 Oct 2014 16:07:27 +0000 (09:07 -0700)]
rollup merge of #18315 : arielb1/constexpr-addr

9 years agorollup merge of #18309 : cakebaker/fix_off_by_one
Alex Crichton [Mon, 27 Oct 2014 16:07:25 +0000 (09:07 -0700)]
rollup merge of #18309 : cakebaker/fix_off_by_one

9 years agoAdd @thestinger comment explaining that shrink_to_fit might drop down as close as...
areski [Mon, 27 Oct 2014 21:32:53 +0000 (22:32 +0100)]
Add @thestinger comment explaining that shrink_to_fit might drop down as close as possible but not to the minimun

9 years agoUntabify rustup.sh
Brian Anderson [Mon, 27 Oct 2014 20:55:35 +0000 (13:55 -0700)]
Untabify rustup.sh