]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #28029 - tshepang:unusual, r=steveklabnik
Manish Goregaokar [Thu, 27 Aug 2015 22:08:37 +0000 (03:38 +0530)]
Rollup merge of #28029 - tshepang:unusual, r=steveklabnik

8 years agoRollup merge of #28022 - steveklabnik:gh27936, r=alexcrichton
Manish Goregaokar [Thu, 27 Aug 2015 22:08:37 +0000 (03:38 +0530)]
Rollup merge of #28022 - steveklabnik:gh27936, r=alexcrichton

Fixes #27936

8 years agoRollup merge of #28013 - artemshitov:rustbook-scrolling, r=steveklabnik
Manish Goregaokar [Thu, 27 Aug 2015 22:08:36 +0000 (03:38 +0530)]
Rollup merge of #28013 - artemshitov:rustbook-scrolling, r=steveklabnik

As of now, when you open a page in the Rust book and other books made with `rustbook`, you cannot scroll with your keyboard, whether using spacebar or arrow keys, unless you explicitly focus on the content div by clicking.

This PR fixes the issue by removing the bound on the content div size and by sticking the TOC with `position: fixed` rather than restricting the content to the window height.

r? @steveklabnik

8 years agoRollup merge of #28010 - GuillaumeGomez:patch-2, r=Manishearth
Manish Goregaokar [Thu, 27 Aug 2015 22:08:36 +0000 (03:38 +0530)]
Rollup merge of #28010 - GuillaumeGomez:patch-2, r=Manishearth

r? @Manishearth

8 years agoAuto merge of #27999 - dotdash:lt, r=eddyb
bors [Thu, 27 Aug 2015 20:09:15 +0000 (20:09 +0000)]
Auto merge of #27999 - dotdash:lt, r=eddyb

The major change here is in the tiny commit at the end and makes it so that we no longer emit lifetime intrinsics for allocas for function arguments. They are live for the whole function anyway, so the intrinsics add no value. This makes the resulting IR more clear, and reduces the peak memory usage and LLVM times by about 1-4%, depending on the crate.

The remaining changes are just preparatory cleanups and fixes for missing lifetime intrinsics.

8 years agoAuto merge of #28031 - durka:patch-6, r=alexcrichton
bors [Thu, 27 Aug 2015 18:30:47 +0000 (18:30 +0000)]
Auto merge of #28031 - durka:patch-6, r=alexcrichton

It was pointing at the issue for `placement_new_protocol`.

8 years agoAdd Windows-specific comments to testing guide
Steve Klabnik [Wed, 26 Aug 2015 18:02:38 +0000 (14:02 -0400)]
Add Windows-specific comments to testing guide

Fixes #27936

8 years agoComment out unused error codes in librustc_typeck/diagnostics.rs
Guillaume Gomez [Thu, 27 Aug 2015 13:44:08 +0000 (15:44 +0200)]
Comment out unused error codes in librustc_typeck/diagnostics.rs

8 years agoAuto merge of #28030 - tshepang:improve-example, r=alexcrichton
bors [Thu, 27 Aug 2015 16:51:57 +0000 (16:51 +0000)]
Auto merge of #28030 - tshepang:improve-example, r=alexcrichton

8 years agoAuto merge of #28016 - ranma42:mini-rem-in-core, r=alexcrichton
bors [Thu, 27 Aug 2015 15:13:30 +0000 (15:13 +0000)]
Auto merge of #28016 - ranma42:mini-rem-in-core, r=alexcrichton

The implementation of the remainder operation belongs to
librustc_trans, but it is also stubbed out in libcore in order to
expose it as a trait on primitive types. Instead of exposing some
implementation details (like the upcast to `f64` in MSVC), use a
minimal implementation just like that of the `Div` trait.

8 years agoAuto merge of #28028 - tshepang:add-size_hint-example, r=alexcrichton
bors [Thu, 27 Aug 2015 10:29:26 +0000 (10:29 +0000)]
Auto merge of #28028 - tshepang:add-size_hint-example, r=alexcrichton

8 years agoAuto merge of #28027 - tshepang:improve-sentence, r=alexcrichton
bors [Thu, 27 Aug 2015 08:51:15 +0000 (08:51 +0000)]
Auto merge of #28027 - tshepang:improve-sentence, r=alexcrichton

8 years agoRestore removed code and mark it for usage in stage0
Andrea Canciani [Thu, 27 Aug 2015 08:06:54 +0000 (10:06 +0200)]
Restore removed code and mark it for usage in stage0

The old code is temporarily needed in order to keep the MSVC build
working. It should be possible to remove this code after the bootstrap
compiler is updated to contain the MSVC workaround from #27875.

8 years agoAuto merge of #27975 - sfackler:iter-order-methods, r=aturon
bors [Thu, 27 Aug 2015 07:13:02 +0000 (07:13 +0000)]
Auto merge of #27975 - sfackler:iter-order-methods, r=aturon

This does cause some breakage due to deficiencies in resolve -
`path::Components` is both an `Iterator` and implements `Eq`, `Ord`,
etc. If one calls e.g. `partial_cmp` on a `Components` and passes a
`&Components` intending to target the `PartialOrd` impl, the compiler
will select the `partial_cmp` from `Iterator` and then error out. I
doubt anyone will run into breakage from `Components` specifically, but
we should see if there are third party types that will run into issues.

`iter::order::equals` wasn't moved to `Iterator` since it's exactly the
same as `iter::order::eq` but with an `Eq` instead of `PartialEq` bound,
which doensn't seem very useful.

I also updated `le`, `gt`, etc to use `partial_cmp` which lets us drop
the extra `PartialEq` bound.

cc #27737

r? @alexcrichton

8 years agoMake iter::order functions into methods on Iterator
Steven Fackler [Mon, 24 Aug 2015 04:59:07 +0000 (21:59 -0700)]
Make iter::order functions into methods on Iterator

This does cause some breakage due to deficiencies in resolve -
`path::Components` is both an `Iterator` and implements `Eq`, `Ord`,
etc. If one calls e.g. `partial_cmp` on a `Components` and passes a
`&Components` intending to target the `PartialOrd` impl, the compiler
will select the `partial_cmp` from `Iterator` and then error out. I
doubt anyone will run into breakage from `Components` specifically, but
we should see if there are third party types that will run into issues.

`iter::order::equals` wasn't moved to `Iterator` since it's exactly the
same as `iter::order::eq` but with an `Eq` instead of `PartialEq` bound,
which doensn't seem very useful.

I also updated `le`, `gt`, etc to use `partial_cmp` which lets us drop
the extra `PartialEq` bound.

cc #27737

8 years agoAuto merge of #28023 - jmesmon:llvm-path-native-only, r=alexcrichton
bors [Thu, 27 Aug 2015 05:35:02 +0000 (05:35 +0000)]
Auto merge of #28023 - jmesmon:llvm-path-native-only, r=alexcrichton

This fixes the case where we try to re-build & re-install rust to the
same prefix (without uninstalling) while using an llvm-root that is the
same as the prefix.

Without this, builds like that fail with:
'error: multiple dylib candidates for `std` found'

See https://github.com/jmesmon/meta-rust/issues/6 for some details.

May also be related to #20342.

8 years agoAuto merge of #28020 - dotdash:ref_fat_ptr_be_gone, r=eddyb
bors [Thu, 27 Aug 2015 03:57:21 +0000 (03:57 +0000)]
Auto merge of #28020 - dotdash:ref_fat_ptr_be_gone, r=eddyb

r? @eddyb -- we talked about this on IRC a while back but I only now managed to get the change done.

8 years agoAuto merge of #28001 - arielb1:dtor-fixes, r=pnkfelix
bors [Thu, 27 Aug 2015 02:19:09 +0000 (02:19 +0000)]
Auto merge of #28001 - arielb1:dtor-fixes, r=pnkfelix

r? @pnkfelix

8 years agoAuto merge of #27808 - SimonSapin:utf16decoder, r=alexcrichton
bors [Thu, 27 Aug 2015 00:41:13 +0000 (00:41 +0000)]
Auto merge of #27808 - SimonSapin:utf16decoder, r=alexcrichton

* Rename `Utf16Items` to `Utf16Decoder`. "Items" is meaningless.
* Generalize it to any `u16` iterator, not just `[u16].iter()`
* Make it yield `Result` instead of a custom `Utf16Item` enum that was isomorphic to `Result`. This enable using the `FromIterator for Result` impl.
* Replace `Utf16Item::to_char_lossy` with a `Utf16Decoder::lossy` iterator adaptor.

This is a [breaking change], but only for users of the unstable `rustc_unicode` crate.

I’d like this functionality to be stabilized and re-exported in `std` eventually, as the "low-level equivalent" of `String::from_utf16` and `String::from_utf16_lossy` like #27784 is the low-level equivalent of #27714.

CC @aturon, @alexcrichton

8 years agofix unstable issue ref for Unsize
Alex Burka [Wed, 26 Aug 2015 23:07:44 +0000 (19:07 -0400)]
fix unstable issue ref for Unsize

It was pointing at the issue for `placement_new_protocol`.

8 years agoAuto merge of #28003 - nkondratyev:patch-1, r=steveklabnik
bors [Wed, 26 Aug 2015 23:03:24 +0000 (23:03 +0000)]
Auto merge of #28003 - nkondratyev:patch-1, r=steveklabnik

8 years agodoc: add Iterator::size_hint example
Tshepang Lekhonkhobe [Wed, 26 Aug 2015 20:45:32 +0000 (22:45 +0200)]
doc: add Iterator::size_hint example

8 years agodoc: I had to read this twice before understanding it
Tshepang Lekhonkhobe [Wed, 26 Aug 2015 20:40:56 +0000 (22:40 +0200)]
doc: I had to read this twice before understanding it

8 years agodoc: improve as_path example
Tshepang Lekhonkhobe [Wed, 26 Aug 2015 21:40:36 +0000 (23:40 +0200)]
doc: improve as_path example

8 years agoAuto merge of #28021 - steveklabnik:gh27958, r=alexcrichton
bors [Wed, 26 Aug 2015 21:25:13 +0000 (21:25 +0000)]
Auto merge of #28021 - steveklabnik:gh27958, r=alexcrichton

Fixes #27958

8 years agopath: the if-else block looked unusual
Tshepang Lekhonkhobe [Wed, 26 Aug 2015 21:15:51 +0000 (23:15 +0200)]
path: the if-else block looked unusual

8 years agoAuto merge of #27992 - wthrowe:dead-main-2, r=alexcrichton
bors [Wed, 26 Aug 2015 18:29:02 +0000 (18:29 +0000)]
Auto merge of #27992 - wthrowe:dead-main-2, r=alexcrichton

* Suppresses warnings that main is unused when testing (#12327)
* Makes `--test` work with explicit `#[start]` (#11766)
* Fixes some cases where the normal main would not be disabled by `--test`, resulting in compilation failures.

8 years agoAny docs: as_ref doesn't exist anymore
Steve Klabnik [Wed, 26 Aug 2015 17:59:39 +0000 (13:59 -0400)]
Any docs: as_ref doesn't exist anymore

Fixes #27958

8 years agomk: tell rustc that we're only looking for native libs in the LLVM_LIBDIR
Cody P Schafer [Wed, 26 Aug 2015 15:21:36 +0000 (11:21 -0400)]
mk: tell rustc that we're only looking for native libs in the LLVM_LIBDIR

This fixes the case where we try to re-build & re-install rust to the
same prefix (without uninstalling) while using an llvm-root that is the
same as the prefix.

Without this, builds like that fail with:
'error: multiple dylib candidates for `std` found'

See https://github.com/jmesmon/meta-rust/issues/6 for some details.

May also be related to #20342.

8 years agoAvoid an extra alloca/memcpy when auto-ref'ing fat pointers
Björn Steinbrink [Wed, 26 Aug 2015 17:41:27 +0000 (19:41 +0200)]
Avoid an extra alloca/memcpy when auto-ref'ing fat pointers

auto_ref() handles fat pointers just fine and unlike ref_fat_ptr() does so
without creating an unnecessary copy of the pointer.

8 years agoAuto merge of #27998 - birkenfeld:patch-1, r=alexcrichton
bors [Wed, 26 Aug 2015 15:50:52 +0000 (15:50 +0000)]
Auto merge of #27998 - birkenfeld:patch-1, r=alexcrichton

These have been removed and should not be documented here.

Should the replacement crates on crates.io be linked to, or is that not wanted in the core docs?

8 years agoRemove redundant overflowing rule
Artem Shitov [Wed, 26 Aug 2015 13:28:31 +0000 (16:28 +0300)]
Remove redundant overflowing rule

8 years agoFix keyboard scrolling in rustbook
Artem Shitov [Wed, 26 Aug 2015 13:20:57 +0000 (16:20 +0300)]
Fix keyboard scrolling in rustbook

8 years agoAdd E0370 error explanation
Guillaume Gomez [Wed, 26 Aug 2015 12:43:28 +0000 (14:43 +0200)]
Add E0370 error explanation

8 years agoRemove unnecessary empty lines
Guillaume Gomez [Wed, 26 Aug 2015 12:28:42 +0000 (14:28 +0200)]
Remove unnecessary empty lines

8 years agoRemove unnecessary whitespace
Guillaume Gomez [Wed, 26 Aug 2015 12:23:51 +0000 (14:23 +0200)]
Remove unnecessary whitespace

8 years agoAdd missing ';' in E0132
Guillaume Gomez [Wed, 26 Aug 2015 12:21:46 +0000 (14:21 +0200)]
Add missing ';' in E0132

8 years agoAdd erroneous code example for E0131
Guillaume Gomez [Wed, 26 Aug 2015 12:21:03 +0000 (14:21 +0200)]
Add erroneous code example for E0131

8 years agoFix typo in E0087
Guillaume Gomez [Wed, 26 Aug 2015 12:16:12 +0000 (14:16 +0200)]
Fix typo in E0087

8 years agoImprove E0025 error explanation
Guillaume Gomez [Wed, 26 Aug 2015 11:38:27 +0000 (13:38 +0200)]
Improve E0025 error explanation

8 years agoImprove E0063 error explanation
Guillaume Gomez [Wed, 26 Aug 2015 11:30:34 +0000 (13:30 +0200)]
Improve E0063 error explanation

8 years agoImprove E0062 error explanation
Guillaume Gomez [Wed, 26 Aug 2015 11:22:55 +0000 (13:22 +0200)]
Improve E0062 error explanation

8 years agoImprove E0046
Guillaume Gomez [Wed, 26 Aug 2015 11:13:18 +0000 (13:13 +0200)]
Improve E0046

8 years agoAuto merge of #27991 - bluss:chain-rev, r=alexcrichton
bors [Wed, 26 Aug 2015 00:27:00 +0000 (00:27 +0000)]
Auto merge of #27991 - bluss:chain-rev, r=alexcrichton

Correct iterator adaptor Chain

The iterator protocol specifies that the iteration ends with the return
value `None` from `.next()` (or `.next_back()`) and it is unspecified
what further calls return. The chain adaptor must account for this in
its DoubleEndedIterator implementation.

It uses three states:

- Both `a` and `b` are valid
- Only the Front iterator (`a`) is valid
- Only the Back iterator (`b`) is valid

The fourth state (neither iterator is valid) only occurs after Chain has
returned None once, so we don't need to store this state.

Fixes #26316

8 years agoFix docs typo
Nikolay Kondratyev [Wed, 26 Aug 2015 00:06:00 +0000 (05:06 +0500)]
Fix docs typo

8 years agoAuto merge of #28000 - mbrubeck:reference, r=steveklabnik
bors [Tue, 25 Aug 2015 18:58:07 +0000 (18:58 +0000)]
Auto merge of #28000 - mbrubeck:reference, r=steveklabnik

See #19466 for background.  r? @steveklabnik

8 years agomove destructors_for_type into AdtDef
Ariel Ben-Yehuda [Tue, 25 Aug 2015 18:52:15 +0000 (21:52 +0300)]
move destructors_for_type into AdtDef

8 years agohandle dtors having generics in an order different from their ADT
Ariel Ben-Yehuda [Tue, 25 Aug 2015 17:50:30 +0000 (20:50 +0300)]
handle dtors having generics in an order different from their ADT

Fixes #27997.

8 years agoCorrect iterator adaptor Chain
Ulrik Sverdrup [Tue, 25 Aug 2015 01:56:35 +0000 (03:56 +0200)]
Correct iterator adaptor Chain

The iterator protocol specifies that the iteration ends with the return
value `None` from `.next()` (or `.next_back()`) and it is unspecified
what further calls return. The chain adaptor must account for this in
its DoubleEndedIterator implementation.

It uses three states:

- Both `a` and `b` are valid
- Only the Front iterator (`a`) is valid
- Only the Back iterator (`b`) is valid

The fourth state (neither iterator is valid) only occurs after Chain has
returned None once, so we don't need to store this state.

Fixes #26316

8 years agoDocument the recursion_limit crate attribute
Matt Brubeck [Tue, 25 Aug 2015 17:02:58 +0000 (10:02 -0700)]
Document the recursion_limit crate attribute

8 years agoOmit lifetime intrinsics for function arguments and similar top-level items
Björn Steinbrink [Tue, 25 Aug 2015 16:33:55 +0000 (18:33 +0200)]
Omit lifetime intrinsics for function arguments and similar top-level items

Function arguments are live for the whole function scope, so adding
lifetime intrinsics around them adds no value. The same is true for drop
hint allocas and everything else that goes directly through
lvalue_scratch_datum. So the easiest fix is to emit lifetime intrinsics
only for lvalue datums that are created in to_lvalue_datum_in_scope().

The reduces peak memory usage and LLVM times by about 1-4%, depending on
the crate.

8 years agoPrefer alloc_ty() instead of alloca() where possible
Björn Steinbrink [Tue, 25 Aug 2015 16:29:24 +0000 (18:29 +0200)]
Prefer alloc_ty() instead of alloca() where possible

8 years agoAdd missing lifetime intrinsics in a few places
Björn Steinbrink [Tue, 25 Aug 2015 16:27:44 +0000 (18:27 +0200)]
Add missing lifetime intrinsics in a few places

8 years agoSeparate lifetime starts from alloca()
Björn Steinbrink [Tue, 25 Aug 2015 16:24:16 +0000 (18:24 +0200)]
Separate lifetime starts from alloca()

Combining them seemed like a good idea at the time, but turns out that
handling lifetimes separately makes it somewhat easier to handle cases
where we don't want the intrinsics, and let's you see more easily where
the start/end pairs are.

8 years agoTurn some alloca_no_lifetime() calls into plain alloca() calls
Björn Steinbrink [Tue, 25 Aug 2015 16:11:15 +0000 (18:11 +0200)]
Turn some alloca_no_lifetime() calls into plain alloca() calls

The issues that the comments referred to were fixed before the PR even
landed but we never got around to remove the hack of skipping the
lifetime start.

8 years agoRemove unnecessary temporaries from compare_values()
Björn Steinbrink [Tue, 25 Aug 2015 11:49:02 +0000 (13:49 +0200)]
Remove unnecessary temporaries from compare_values()

8 years agoAuto merge of #27995 - nagisa:windows-error-message, r=alexcrichton
bors [Tue, 25 Aug 2015 16:22:17 +0000 (16:22 +0000)]
Auto merge of #27995 - nagisa:windows-error-message, r=alexcrichton

According to https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx:

> If the function succeeds, the return value is the number of TCHARs stored in the output buffer,
> excluding the terminating null character.

_**Completely untested**_… since I have no Windows machine or anything of a sort to test this on.

r? @aturon

8 years agocollections doc: remove mention of BitVec, BitSet, VecMap
Georg Brandl [Tue, 25 Aug 2015 16:20:34 +0000 (18:20 +0200)]
collections doc: remove mention of BitVec, BitSet, VecMap

These have been removed and should not be documented here.

8 years agouse the parameter environment when checking dtors
Ariel Ben-Yehuda [Tue, 25 Aug 2015 15:49:32 +0000 (18:49 +0300)]
use the parameter environment when checking dtors

This makes it more uniform. No functional changes.

8 years agoDo not recalculate string length in error_string
Simonas Kazlauskas [Tue, 25 Aug 2015 15:26:29 +0000 (18:26 +0300)]
Do not recalculate string length in error_string

According to https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx:

> If the function succeeds, the return value is the number of TCHARs stored in the output buffer,
> excluding the terminating null character.

8 years agoAuto merge of #27994 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 25 Aug 2015 14:16:22 +0000 (14:16 +0000)]
Auto merge of #27994 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27905, #27968, #27978, #27982, #27988
- Failed merges:

8 years agoRollup merge of #27988 - nagisa:diags-e0139, r=brson
Steve Klabnik [Tue, 25 Aug 2015 13:43:07 +0000 (09:43 -0400)]
Rollup merge of #27988 - nagisa:diags-e0139, r=brson

Fixes #27946

8 years agoRollup merge of #27982 - frewsxcv:patch-25, r=steveklabnik
Steve Klabnik [Tue, 25 Aug 2015 13:43:07 +0000 (09:43 -0400)]
Rollup merge of #27982 - frewsxcv:patch-25, r=steveklabnik

8 years agoRollup merge of #27978 - mgrabovsky:doc-fix, r=steveklabnik
Steve Klabnik [Tue, 25 Aug 2015 13:43:07 +0000 (09:43 -0400)]
Rollup merge of #27978 - mgrabovsky:doc-fix, r=steveklabnik

8 years agoRollup merge of #27968 - adamcrume:master, r=steveklabnik
Steve Klabnik [Tue, 25 Aug 2015 13:43:07 +0000 (09:43 -0400)]
Rollup merge of #27968 - adamcrume:master, r=steveklabnik

8 years agoRollup merge of #27905 - tshepang:E0133, r=brson
Steve Klabnik [Tue, 25 Aug 2015 13:43:06 +0000 (09:43 -0400)]
Rollup merge of #27905 - tshepang:E0133, r=brson

8 years agoAuto merge of #27986 - chris-morgan:reduce-string-extend-str-implementation, r=bluss
bors [Tue, 25 Aug 2015 12:31:11 +0000 (12:31 +0000)]
Auto merge of #27986 - chris-morgan:reduce-string-extend-str-implementation, r=bluss

Reserving lower_bound bytes was just silly. It’d be perfectly reasonable
to have empty strings in the iterator, which could cause superfluous
reallocation of the string, or to have more than one byte per string,
which could cause additional reallocation (in practice it’ll balance
out). The added complexity of this logic is simply pointless, adding
a little bloat with no demonstrable advantage and slight disadvantage.

8 years agoAuto merge of #27981 - dotdash:gepi, r=brson
bors [Tue, 25 Aug 2015 10:46:06 +0000 (10:46 +0000)]
Auto merge of #27981 - dotdash:gepi, r=brson

8 years agoAuto merge of #27974 - Diggsey:issue-27952, r=alexcrichton
bors [Tue, 25 Aug 2015 09:04:30 +0000 (09:04 +0000)]
Auto merge of #27974 - Diggsey:issue-27952, r=alexcrichton

Fixes #27952

8 years agoAuto merge of #27971 - tbu-:pr_cloexec, r=alexcrichton
bors [Tue, 25 Aug 2015 07:23:18 +0000 (07:23 +0000)]
Auto merge of #27971 - tbu-:pr_cloexec, r=alexcrichton

On Linux the flag is just ignored if it is not supported:
https://lwn.net/Articles/588444/

Still needs the values of O_CLOEXEC on the BSDs.

Touches #24237.

8 years agobook: Mention that --ignored is a test binary argument
Adam Crume [Tue, 25 Aug 2015 04:53:02 +0000 (21:53 -0700)]
book: Mention that --ignored is a test binary argument

8 years agobook: Fix spacing in testing section
Adam Crume [Tue, 25 Aug 2015 04:52:33 +0000 (21:52 -0700)]
book: Fix spacing in testing section

8 years agoAuto merge of #27966 - GuillaumeGomez:iterator, r=alexcrichton
bors [Tue, 25 Aug 2015 04:48:19 +0000 (04:48 +0000)]
Auto merge of #27966 - GuillaumeGomez:iterator, r=alexcrichton

Part of #22709.
cc @Veedrac

r? @bluss

I don't have added tests yet, I'll see how to do it tomorrow.

8 years agoAuto merge of #27957 - overminder:aug23-i686-android, r=alexcrichton
bors [Tue, 25 Aug 2015 03:04:30 +0000 (03:04 +0000)]
Auto merge of #27957 - overminder:aug23-i686-android, r=alexcrichton

- All the libstd tests are passing in the optimized build against
  a Zenfone2 and the x86 Android emulator.

I haven't tested the other libraries though.

8 years agoAuto merge of #27945 - Eljay:upgrade-hoedown, r=alexcrichton
bors [Tue, 25 Aug 2015 01:10:55 +0000 (01:10 +0000)]
Auto merge of #27945 - Eljay:upgrade-hoedown, r=alexcrichton

Some hoedown FFI changes:
- `HOEDOWN_EXT_NO_INTRA_EMPHASIS` constant changed.
- Updated/tidied up all callback function signatures.
- All opaque data access has an additional layer of indirection for some reason (`hoedown_renderer_data`).

This also fixes #27862.

8 years agoRemove #[start] as well as #[main] in --test
William Throwe [Mon, 24 Aug 2015 18:33:22 +0000 (14:33 -0400)]
Remove #[start] as well as #[main] in --test

Fixes #11766.

8 years agoMove main removal to its own pass in --test mode
William Throwe [Mon, 24 Aug 2015 15:34:04 +0000 (11:34 -0400)]
Move main removal to its own pass in --test mode

This handles the case where the #[main] function is buried deeper in
the ast than we search for #[test] functions.  I'm not sure why one
would want to do that, but since it works in standard compilation it
should also work for tests.

8 years agoMark main-like functions allow(dead_code) in tests
William Throwe [Mon, 24 Aug 2015 01:46:10 +0000 (21:46 -0400)]
Mark main-like functions allow(dead_code) in tests

Fixes #12327.

8 years agoMove entry point identification logic to libsyntax
William Throwe [Sun, 23 Aug 2015 18:12:39 +0000 (14:12 -0400)]
Move entry point identification logic to libsyntax

Identifying entry points will be useful in --test mode, which is
handled in libsyntax.

8 years agoFix E0139 code
Simonas Kazlauskas [Mon, 24 Aug 2015 22:44:18 +0000 (01:44 +0300)]
Fix E0139 code

Fixes #27946

8 years agoAuto merge of #27943 - arielb1:fast-region, r=nikomatsakis
bors [Mon, 24 Aug 2015 22:13:45 +0000 (22:13 +0000)]
Auto merge of #27943 - arielb1:fast-region, r=nikomatsakis

This increases regionck performance greatly - type-checking on
librustc decreased from 9.1s to 8.1s. Because of Amdahl's law,
total performance is improved only by about 1.5% (LLVM wizards,
this is your opportunity to shine!).

before:
576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k
after:
566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k

I am somewhat worried really need to find out why we have this Red Queen's
Race going on here. Originally I suspected it may be a problem from RFC1214's
warnings, but it seems to be an effect from other changes.

However, the increase seems to be mostly in LLVM's time, so I guess
it's the LLVM wizards' problem.

r? @nikomatsakis

8 years agoSimplify `String`’s `Extend<&str>` implementation
Chris Morgan [Mon, 24 Aug 2015 21:47:42 +0000 (07:47 +1000)]
Simplify `String`’s `Extend<&str>` implementation

Reserving lower_bound bytes was just silly. It’d be perfectly reasonable
to have empty strings in the iterator, which could cause superfluous
reallocation of the string, or to have more than one byte per string,
which could cause additional reallocation (in practice it’ll balance
out). The added complexity of this logic is simply pointless, adding
a little bloat with no demonstrable advantage and slight disadvantage.

8 years agoUse StructGEP instead of GEPi where appropriate
Björn Steinbrink [Mon, 24 Aug 2015 20:51:57 +0000 (22:51 +0200)]
Use StructGEP instead of GEPi where appropriate

StructGEP seems clearer and probably does an even better job of the
micro-optimization that we have in GEPi.

8 years agoUse get_dataptr() and get_meta() where appropriate
Björn Steinbrink [Mon, 24 Aug 2015 20:05:20 +0000 (22:05 +0200)]
Use get_dataptr() and get_meta() where appropriate

8 years agoRename get_len() to get_meta()
Björn Steinbrink [Mon, 24 Aug 2015 19:50:50 +0000 (21:50 +0200)]
Rename get_len() to get_meta()

The functions is useful for all kinds of fat pointers, but get_len()
just feels so wrong for trait object fat pointers. Let's use get_meta()
because that's rather neutral.

8 years agoUse correct indefinite article in reference.md
Corey Farwell [Mon, 24 Aug 2015 21:26:26 +0000 (17:26 -0400)]
Use correct indefinite article in reference.md

8 years agoAdd test for LookupHost iterator Send/Sync traits
Guillaume Gomez [Mon, 24 Aug 2015 21:01:31 +0000 (23:01 +0200)]
Add test for LookupHost iterator Send/Sync traits

8 years agofix other test
Ariel Ben-Yehuda [Mon, 24 Aug 2015 20:41:02 +0000 (23:41 +0300)]
fix other test

8 years agoAuto merge of #27239 - apasel422:issue-19102, r=huonw
bors [Mon, 24 Aug 2015 18:43:41 +0000 (18:43 +0000)]
Auto merge of #27239 - apasel422:issue-19102, r=huonw

closes #19102

8 years agoaddress nits
Ariel Ben-Yehuda [Mon, 24 Aug 2015 18:30:39 +0000 (21:30 +0300)]
address nits

8 years agoUpdate hoedown to latest version (3.0.4).
Eljay [Sat, 22 Aug 2015 20:07:36 +0000 (21:07 +0100)]
Update hoedown to latest version (3.0.4).

8 years agoClarify a sentence in the Book
Matěj Grabovský [Mon, 24 Aug 2015 18:14:39 +0000 (20:14 +0200)]
Clarify a sentence in the Book

8 years agoAtomically open files with O_CLOEXEC where possible
Tobias Bucher [Sun, 23 Aug 2015 18:10:22 +0000 (20:10 +0200)]
Atomically open files with O_CLOEXEC where possible

On Linux the flag is just ignored if it is not supported:
https://lwn.net/Articles/588444/

Touches #24237.

8 years agofix test
Ariel Ben-Yehuda [Sat, 22 Aug 2015 19:51:29 +0000 (22:51 +0300)]
fix test

8 years agostore the CodeExtent directly in FreeRegion
Ariel Ben-Yehuda [Sat, 22 Aug 2015 14:39:21 +0000 (17:39 +0300)]
store the CodeExtent directly in FreeRegion

this makes the code cleaner

8 years agoUse a Vec instead of an HashMap for the scope hierarchy
Ariel Ben-Yehuda [Wed, 19 Aug 2015 22:46:28 +0000 (01:46 +0300)]
Use a Vec instead of an HashMap for the scope hierarchy

This increases regionck performance greatly - type-checking on
librustc decreased from 9.1s to 8.1s. Because of Amdahl's law,
total performance is improved only by about 1.5% (LLVM wizards,
this is your opportunity to shine!).

before:
576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k
after:
566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k

I am somewhat worried really need to find out why we have this Red Queen's
Race going on here. Originally I suspected it may be a problem from RFC1214's
warnings, but it seems to be an effect from other changes.

However, the increase seems to be mostly in LLVM's time, so I guess
it's the LLVM wizards' problem.

8 years agoUse a u32 instead of a usize in CodeExtent
Ariel Ben-Yehuda [Wed, 19 Aug 2015 12:10:18 +0000 (15:10 +0300)]
Use a u32 instead of a usize in CodeExtent

This reduces the size of CodeExtent to 12 bytes (was 24). We should have
a warning for this kind of problem.

8 years agosplit ReInfer into ReVar and ReSkolemized
Ariel Ben-Yehuda [Tue, 18 Aug 2015 20:21:29 +0000 (23:21 +0300)]
split ReInfer into ReVar and ReSkolemized

this should reduce the size of ty::Region to 24 bytes (from 32),
and they are treated differently in most cases anyway.

8 years agoAuto merge of #27976 - sfackler:addrparseerror-error, r=alexcrichton
bors [Mon, 24 Aug 2015 16:00:42 +0000 (16:00 +0000)]
Auto merge of #27976 - sfackler:addrparseerror-error, r=alexcrichton

Closes #27973

8 years agoAdd stability markers for new impls
Steven Fackler [Mon, 24 Aug 2015 15:59:45 +0000 (08:59 -0700)]
Add stability markers for new impls