]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #29134 - wthrowe:linker-output-ICE, r=pnkfelix
bors [Sun, 18 Oct 2015 08:20:38 +0000 (08:20 +0000)]
Auto merge of #29134 - wthrowe:linker-output-ICE, r=pnkfelix

The escaped form isn't pretty, but this should be a very rare error.
Having a general binary-escaping string creation function might be a
good idea, though.

Closes #29122

8 years agoDon't ICE if the linker prints something non-UTF-8
William Throwe [Sun, 18 Oct 2015 03:54:48 +0000 (23:54 -0400)]
Don't ICE if the linker prints something non-UTF-8

The escaped form isn't pretty, but this should be a very rare error.
Having a general binary-escaping string creation function might be a
good idea, though.

Closes #29122

8 years agoAuto merge of #29091 - luqmana:29073-overflow-cabi, r=pnkfelix
bors [Sun, 18 Oct 2015 02:07:01 +0000 (02:07 +0000)]
Auto merge of #29091 - luqmana:29073-overflow-cabi, r=pnkfelix

Fixes #29073.

8 years agoAuto merge of #29105 - billpmurphy:master, r=alexcrichton
bors [Sat, 17 Oct 2015 17:53:53 +0000 (17:53 +0000)]
Auto merge of #29105 - billpmurphy:master, r=alexcrichton

Change the spacing/order of lines in the final pointer conversion example to make it more clear.

Very small change, can be rolled up.

8 years agoAuto merge of #29089 - kickinbahk:edit-testing-docs, r=steveklabnik
bors [Sat, 17 Oct 2015 15:10:07 +0000 (15:10 +0000)]
Auto merge of #29089 - kickinbahk:edit-testing-docs, r=steveklabnik

When going through the docs, it is not clear that binary files cannot be tested. Additionally, it is hard to find the proper structure of a Rust crate and it took me several hours of looking through the docs to find the crates and modules section. I think we can link to it from here and it will be beneficial to those who are coming to the language.

8 years agoAuto merge of #28933 - fhahn:issue-28837-partialeq-note, r=alexcrichton
bors [Sat, 17 Oct 2015 13:24:01 +0000 (13:24 +0000)]
Auto merge of #28933 - fhahn:issue-28837-partialeq-note, r=alexcrichton

this PR adds notes for missing `PartialEq` and `PartialOrd`. I've added a test case but it seems like `NOTE` is ignored by the test runner.

#28837

8 years agoAuto merge of #29114 - apasel422:issue-27105, r=alexcrichton
bors [Sat, 17 Oct 2015 11:38:10 +0000 (11:38 +0000)]
Auto merge of #29114 - apasel422:issue-27105, r=alexcrichton

Closes #27105.

8 years agoAuto merge of #29110 - apasel422:shared, r=alexcrichton
bors [Sat, 17 Oct 2015 09:51:30 +0000 (09:51 +0000)]
Auto merge of #29110 - apasel422:shared, r=alexcrichton

Fixes #29037.
Fixes #29106.

r? @pnkfelix
CC @Gankro

8 years agoAuto merge of #29109 - nxnfufunezn:master, r=Manishearth
bors [Sat, 17 Oct 2015 08:04:32 +0000 (08:04 +0000)]
Auto merge of #29109 - nxnfufunezn:master, r=Manishearth

Fixes : #19668

r? @Manishearth

8 years agoAuto merge of #29102 - petrochenkov:spanvis, r=alexcrichton
bors [Sat, 17 Oct 2015 06:16:09 +0000 (06:16 +0000)]
Auto merge of #29102 - petrochenkov:spanvis, r=alexcrichton

Closes https://github.com/rust-lang/rust/issues/28750
`Arm` and `Generics` don't have spans at all, so it's not a visitor's problem, `visit_struct_def` was fixed in https://github.com/rust-lang/rust/pull/28816

8 years agoAuto merge of #29079 - fhahn:remove-unused-files-libcoretest, r=alexcrichton
bors [Sat, 17 Oct 2015 03:19:45 +0000 (03:19 +0000)]
Auto merge of #29079 - fhahn:remove-unused-files-libcoretest, r=alexcrichton

While working on #28711 I found out that

*  src/libcoretest/clone.rs
* src/libcoretest/fmt/float.rs
* src/libcoretest/intrinsics.rs

are not used. I am not sure if removing them is the right way to go. If it makes sense to keep (and fix and enable) them, I would be happy to update the PR.

8 years agoAdd test for #27105
Andrew Paseltiner [Sat, 17 Oct 2015 01:32:06 +0000 (21:32 -0400)]
Add test for #27105

Closes #27105.

8 years agotrans: Use an isize to count the number of registers so we don't underflow for fn...
Luqman Aden [Thu, 15 Oct 2015 21:03:27 +0000 (17:03 -0400)]
trans: Use an isize to count the number of registers so we don't underflow for fn's with > 7 args in debug builds.

8 years agoAuto merge of #28683 - GuillaumeGomez:rustdoc_error, r=alexcrichton
bors [Fri, 16 Oct 2015 23:28:14 +0000 (23:28 +0000)]
Auto merge of #28683 - GuillaumeGomez:rustdoc_error, r=alexcrichton

This PR solves the following issues (or at least help users to understand the problem):

```Rust
#![crate_name = "b"]
#![crate_type = "rlib"]

pub fn his_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_moreis_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_more_() {}
```

```Rust
#![crate_name = "b"]
#![crate_type = "rlib"]

pub struct his_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_moreis_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_more_;
```

For the maximum filename length chosen, @gkoz gave me [this link](http://unix.stackexchange.com/a/32834).

8 years agoAdd `Shared` pointer and have `{Arc, Rc}` use it
Andrew Paseltiner [Fri, 16 Oct 2015 15:54:05 +0000 (11:54 -0400)]
Add `Shared` pointer and have `{Arc, Rc}` use it

This change has two consequences:

1. It makes `Arc<T>` and `Rc<T>` covariant in `T`.

2. It causes the compiler to reject code that was unsound with respect
to dropck. See compile-fail/issue-29106.rs for an example of code that
no longer compiles. Because of this, this is a [breaking-change].

Fixes #29037.
Fixes #29106.

8 years agoImprove error handling by providing Error struct with Path information
Guillaume Gomez [Sat, 26 Sep 2015 21:59:32 +0000 (23:59 +0200)]
Improve error handling by providing Error struct with Path information

8 years agoUpdated librustc_lint/builtin.rs to use span_lint_note
nxnfufunezn [Fri, 16 Oct 2015 20:44:26 +0000 (02:14 +0530)]
Updated librustc_lint/builtin.rs to use span_lint_note

8 years agoAuto merge of #29082 - DenisKolodin:patch-3, r=alexcrichton
bors [Fri, 16 Oct 2015 20:35:51 +0000 (20:35 +0000)]
Auto merge of #29082 - DenisKolodin:patch-3, r=alexcrichton

8 years agoAdd span_lint_note and span_lint_help to the LintContext
nxnfufunezn [Fri, 16 Oct 2015 20:20:33 +0000 (01:50 +0530)]
Add span_lint_note and span_lint_help to the LintContext

8 years agoAdd unused modules to libcoretest
Florian Hahn [Thu, 15 Oct 2015 19:07:20 +0000 (21:07 +0200)]
Add unused modules to libcoretest

8 years agoUpdate the testing doc to be more clear and include dynamic link
kickinbahk [Fri, 16 Oct 2015 18:45:22 +0000 (11:45 -0700)]
Update the testing doc to be more clear and include dynamic link

Fixed some typos and changed the link to the link to crates-and-modules to be dynamic.

8 years agoAuto merge of #29014 - petrochenkov:stability, r=brson
bors [Fri, 16 Oct 2015 17:47:01 +0000 (17:47 +0000)]
Auto merge of #29014 - petrochenkov:stability, r=brson

Stricter checking of stability attributes + enforcement of their invariants at compile time
(+ removed dead file librustc_front/attr.rs)
I intended to enforce use of `reason` for unstable items as well (it normally presents for new items), but it turned out too intrusive, many older unstable items don't have `reason`s.

r? @aturon
I'm studying how stability works and do some refactoring along the way, so it's probably not the last PR.

8 years agoUpdate explanation about offset method
DenisKolodin [Thu, 15 Oct 2015 20:57:23 +0000 (23:57 +0300)]
Update explanation about offset method

8 years agoAuto merge of #29074 - Manishearth:astconv-doc, r=eddyb
bors [Fri, 16 Oct 2015 16:03:57 +0000 (16:03 +0000)]
Auto merge of #29074 - Manishearth:astconv-doc, r=eddyb

Confusion about what this does caused a bug in Servo's lints.

r? @eddyb

8 years agobook: Change raw pointer conversion example
billpmurphy [Fri, 16 Oct 2015 15:42:27 +0000 (11:42 -0400)]
book: Change raw pointer conversion example

Change the spacing/order of lines in the final pointer conversion example to make it more clear.

8 years agoAuto merge of #29020 - goyox86:goyox86/rustfmting-libarena, r=nrc
bors [Fri, 16 Oct 2015 14:20:25 +0000 (14:20 +0000)]
Auto merge of #29020 - goyox86:goyox86/rustfmting-libarena, r=nrc

Hi Rustaceans!

This is the result of running latest rustfmt on libarena!

//cc @nrc

8 years agoProvide span for visit_enum_def
Vadim Petrochenkov [Fri, 16 Oct 2015 14:17:14 +0000 (17:17 +0300)]
Provide span for visit_enum_def

8 years agoAuto merge of #29086 - fhahn:book-update-lint-plugin-example, r=alexcrichton
bors [Fri, 16 Oct 2015 11:33:01 +0000 (11:33 +0000)]
Auto merge of #29086 - fhahn:book-update-lint-plugin-example, r=alexcrichton

8 years agoAuto merge of #28957 - GuillaumeGomez:patch-5, r=Manishearth
bors [Fri, 16 Oct 2015 09:49:50 +0000 (09:49 +0000)]
Auto merge of #28957 - GuillaumeGomez:patch-5, r=Manishearth

cc @nagisa

8 years agoChange error message in rustbook
Guillaume Gomez [Fri, 16 Oct 2015 08:59:04 +0000 (10:59 +0200)]
Change error message in rustbook

8 years agoAuto merge of #29085 - petrochenkov:nonzero, r=alexcrichton
bors [Fri, 16 Oct 2015 08:06:56 +0000 (08:06 +0000)]
Auto merge of #29085 - petrochenkov:nonzero, r=alexcrichton

8 years agoAuto merge of #29081 - rust-lang:arc-example-edit, r=alexcrichton
bors [Fri, 16 Oct 2015 06:24:11 +0000 (06:24 +0000)]
Auto merge of #29081 - rust-lang:arc-example-edit, r=alexcrichton

The text says it's a vector of floats, but the code actually uses a vector of integers.  The type of the Vec doesn't really matter, so I just cut it from the text.

8 years agoAuto merge of #29080 - Havvy:remove_doc_style_changing, r=alexcrichton
bors [Fri, 16 Oct 2015 03:10:30 +0000 (03:10 +0000)]
Auto merge of #29080 - Havvy:remove_doc_style_changing, r=alexcrichton

Fixes issue #29077.

There **are** API changing guidelines in the RFCs, so it might be prudent to put those there. But I'm leaving that up to another person. This PR just removes bad documentation.

8 years agoAdd to Testing docs to make more clear
kickinbahk [Fri, 16 Oct 2015 00:44:21 +0000 (17:44 -0700)]
Add to Testing docs to make more clear

When going through the docs, it is not clear that binary files cannot be tested. Additionally, it is hard to find the proper structure of a Rust crate and it took me several hours of looking through the docs to find the crates and modules section. I think we can link to it from here and it will be beneficial to those who are coming to the language.

8 years agoUpdate lint plugin example in book to work with recent master
Florian Hahn [Thu, 15 Oct 2015 21:53:05 +0000 (23:53 +0200)]
Update lint plugin example in book to work with recent master

8 years agoMake NonZero::new const function
Vadim Petrochenkov [Thu, 15 Oct 2015 21:33:45 +0000 (00:33 +0300)]
Make NonZero::new const function

8 years agoAuto merge of #29031 - cristicbz:mtx_inner, r=alexcrichton
bors [Thu, 15 Oct 2015 21:21:27 +0000 (21:21 +0000)]
Auto merge of #29031 - cristicbz:mtx_inner, r=alexcrichton

The implementation for `into_inner` was a bit more complex than I had hoped for---is there any simpler, less unsafe way of getting around the fact that one can't move out of a `Drop` struct?

See #28968 and rust-lang/rfcs#1269 .

8 years agoFix minor error in Arc docs
Matt Brubeck [Thu, 15 Oct 2015 20:52:51 +0000 (13:52 -0700)]
Fix minor error in Arc docs

The text says it's a vector of floats, but the code actually uses a vector of integers.  The type of the Vec doesn't really matter, so I just cut it from the text.

8 years agoRemove outdated Changing directory.
Ryan Scheel (Havvy) [Thu, 15 Oct 2015 19:35:39 +0000 (19:35 +0000)]
Remove outdated Changing directory.

8 years agostd: add into_inner and get_mut to RwLock
Cristi Cobzarenco [Thu, 15 Oct 2015 16:14:06 +0000 (17:14 +0100)]
std: add into_inner and get_mut to RwLock

8 years agostd: add into_inner and get_mut to mutex
Cristi Cobzarenco [Tue, 13 Oct 2015 20:55:34 +0000 (21:55 +0100)]
std: add into_inner and get_mut to mutex

8 years agoAdd docs for `ast_ty_to_prim_ty`
Manish Goregaokar [Thu, 15 Oct 2015 13:27:24 +0000 (18:57 +0530)]
Add docs for `ast_ty_to_prim_ty`

Confusion about what this does caused a bug in Servo's lints.

8 years agoAuto merge of #29050 - rkruppe:dec2flt-lonely-sign, r=alexcrichton
bors [Thu, 15 Oct 2015 14:43:47 +0000 (14:43 +0000)]
Auto merge of #29050 - rkruppe:dec2flt-lonely-sign, r=alexcrichton

Fixes #29042

8 years agoFixed comment.
Jose Narvaez [Thu, 15 Oct 2015 13:56:03 +0000 (14:56 +0100)]
Fixed comment.

8 years agoAuto merge of #29040 - nrc:save-defid, r=@nikomatsakis
bors [Thu, 15 Oct 2015 12:51:31 +0000 (12:51 +0000)]
Auto merge of #29040 - nrc:save-defid, r=@nikomatsakis

With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.

r? @nikomatsakis

8 years agoAuto merge of #29021 - ogham:master, r=alexcrichton
bors [Thu, 15 Oct 2015 10:58:37 +0000 (10:58 +0000)]
Auto merge of #29021 - ogham:master, r=alexcrichton

This commit adds `#[derive(Clone)]` to `std::fs::Metadata`, making that struct cloneable. Although the exact contents of that struct differ between OSes, they all have it contain only value types, meaning that the data can be re-used without repercussions.

It also adds `#[derive(Clone)]` to every type used by that struct across all OSes, including the various Unix `stat` structs and Windows's `WIN32_FILE_ATTRIBUTE_DATA`.

This stems from my comment here: https://github.com/rust-lang/rfcs/issues/939#issuecomment-140524439

8 years agoAuto merge of #29070 - Manishearth:rollup, r=Manishearth
bors [Thu, 15 Oct 2015 09:04:34 +0000 (09:04 +0000)]
Auto merge of #29070 - Manishearth:rollup, r=Manishearth

- Successful merges: #28906, #29022, #29047, #29058, #29059, #29060, #29062, #29066, #29068
- Failed merges:

8 years agoRollup merge of #29068 - apasel422:tidy, r=alexcrichton
Manish Goregaokar [Thu, 15 Oct 2015 08:11:33 +0000 (13:41 +0530)]
Rollup merge of #29068 - apasel422:tidy, r=alexcrichton

r? @alexcrichton

8 years agoRollup merge of #29066 - dcarral:fix_issue_29063, r=steveklabnik
Manish Goregaokar [Thu, 15 Oct 2015 08:11:33 +0000 (13:41 +0530)]
Rollup merge of #29066 - dcarral:fix_issue_29063, r=steveklabnik

Regarding [#29063 _[Docs] Terminology inconsistency between 'iterator adapters' and 'iterator adaptors'_](https://github.com/rust-lang/rust/issues/29063) :

This PR replaces 'iterator adapters' appearances (in TRPL book) to 'iterator adaptors', thus embracing the terminology used along the API docs and achieving consistency between both sources.

8 years agoRollup merge of #29062 - rgardner:rgardner-fix-book-comp-warning, r=alexcrichton
Manish Goregaokar [Thu, 15 Oct 2015 08:11:33 +0000 (13:41 +0530)]
Rollup merge of #29062 - rgardner:rgardner-fix-book-comp-warning, r=alexcrichton

Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7             for _ in (0..5_000_000) {
```

This commit just removes the parens around the range 0..5_000_000 thereby removing the compilation warning.

8 years agoRollup merge of #29060 - tshepang:consistency, r=nikomatsakis
Manish Goregaokar [Thu, 15 Oct 2015 08:11:33 +0000 (13:41 +0530)]
Rollup merge of #29060 - tshepang:consistency, r=nikomatsakis

8 years agoRollup merge of #29059 - tshepang:typo, r=nikomatsakis
Manish Goregaokar [Thu, 15 Oct 2015 08:11:32 +0000 (13:41 +0530)]
Rollup merge of #29059 - tshepang:typo, r=nikomatsakis

8 years agoRollup merge of #29058 - tshepang:rename, r=steveklabnik
Manish Goregaokar [Thu, 15 Oct 2015 08:11:32 +0000 (13:41 +0530)]
Rollup merge of #29058 - tshepang:rename, r=steveklabnik

Shoud have been part of commit 0b13ee0ced39

8 years agoRollup merge of #29047 - gkoz:doc_typo, r=steveklabnik
Manish Goregaokar [Thu, 15 Oct 2015 08:11:32 +0000 (13:41 +0530)]
Rollup merge of #29047 - gkoz:doc_typo, r=steveklabnik

None

8 years agoRollup merge of #29022 - apasel422:spell, r=steveklabnik
Manish Goregaokar [Thu, 15 Oct 2015 08:11:32 +0000 (13:41 +0530)]
Rollup merge of #29022 - apasel422:spell, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #28906 - tshepang:link, r=nikomatsakis
Manish Goregaokar [Thu, 15 Oct 2015 08:11:31 +0000 (13:41 +0530)]
Rollup merge of #28906 - tshepang:link, r=nikomatsakis

8 years agoAuto merge of #28921 - petrochenkov:intconv, r=alexcrichton
bors [Thu, 15 Oct 2015 07:11:33 +0000 (07:11 +0000)]
Auto merge of #28921 - petrochenkov:intconv, r=alexcrichton

Part of https://github.com/rust-lang/rfcs/pull/1218#issuecomment-146615171

r? @aturon

8 years agoAuto merge of #27017 - luqmana:25594-sysv-abi-ffi, r=bkoropoff
bors [Thu, 15 Oct 2015 05:19:18 +0000 (05:19 +0000)]
Auto merge of #27017 - luqmana:25594-sysv-abi-ffi, r=bkoropoff

Fixes #25594.

8 years agoUpdate the comments for Win64 ABI in tests.
Luqman Aden [Thu, 15 Oct 2015 02:16:13 +0000 (21:16 -0500)]
Update the comments for Win64 ABI in tests.

8 years agorust_trans: struct argument over ffi were passed incorrectly in some situations on...
Luqman Aden [Mon, 13 Jul 2015 17:16:43 +0000 (13:16 -0400)]
rust_trans: struct argument over ffi were passed incorrectly in some situations on x86_64.

8 years agoAuto merge of #28980 - nrc:unsafe-macros, r=@pnkfelix
bors [Thu, 15 Oct 2015 03:26:48 +0000 (03:26 +0000)]
Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelix

This is a [breaking change].

@brson could you do a Crater run with this PR please?

Lets not land till Crater says its OK.

This was discussed at https://internals.rust-lang.org/t/does-anyone-use-the-push-pop-unsafe-macros/2702

8 years agoImplement conversion traits for primitive integer types
Vadim Petrochenkov [Thu, 15 Oct 2015 02:23:44 +0000 (05:23 +0300)]
Implement conversion traits for primitive integer types

8 years agoRemove unnecessary parentheses around range expressions
Andrew Paseltiner [Thu, 15 Oct 2015 01:43:05 +0000 (21:43 -0400)]
Remove unnecessary parentheses around range expressions

8 years agoAuto merge of #29012 - tari:issue-28676, r=luqmana
bors [Thu, 15 Oct 2015 00:14:17 +0000 (00:14 +0000)]
Auto merge of #29012 - tari:issue-28676, r=luqmana

Fixes #28676.

There doesn't seem to be a good way to add a test for this, but I tested the repro in #28676 and confirmed it now yields the correct result.

8 years agoReplace 'adapters' to 'adaptors' in TRPL book
Daniel Carral [Thu, 15 Oct 2015 00:13:20 +0000 (02:13 +0200)]
Replace 'adapters' to 'adaptors' in TRPL book

Regarding #29063: Replace 'iterator adapters' appearances to
'iterator adaptors', thus embracing the terminology used along the
API docs and achieving consistency between both sources.

8 years agorustdoc: Report deprecation reason first
Vadim Petrochenkov [Wed, 14 Oct 2015 22:28:38 +0000 (01:28 +0300)]
rustdoc: Report deprecation reason first

8 years agobook: be consistent with preceding example
Tshepang Lekhonkhobe [Wed, 14 Oct 2015 22:19:47 +0000 (00:19 +0200)]
book: be consistent with preceding example

8 years agobook: fix typo
Tshepang Lekhonkhobe [Wed, 14 Oct 2015 22:16:13 +0000 (00:16 +0200)]
book: fix typo

8 years agoreference: 'struct' is more common that 'structure'
Tshepang Lekhonkhobe [Wed, 14 Oct 2015 22:08:19 +0000 (00:08 +0200)]
reference: 'struct' is more common that 'structure'

Shoud have been part of commit 0b13ee0ced39

8 years agosave-analysis: normalise node ids before emitting.
Nick Cameron [Wed, 14 Oct 2015 04:55:59 +0000 (17:55 +1300)]
save-analysis: normalise node ids before emitting.

With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.

8 years agoreference: add link to the symbols
Tshepang Lekhonkhobe [Thu, 8 Oct 2015 05:41:16 +0000 (07:41 +0200)]
reference: add link to the symbols

8 years agoResolve unused_parens compilation warning
Robert Gardner [Wed, 14 Oct 2015 21:38:56 +0000 (17:38 -0400)]
Resolve unused_parens compilation warning

Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7             for _ in (0..5_000_000) {
```

This commit just removes the parens around the range 0..5_000_000.

8 years agoAdd test case for #28676.
Peter Marheine [Wed, 14 Oct 2015 20:25:38 +0000 (14:25 -0600)]
Add test case for #28676.

8 years agoAuto merge of #29044 - Ms2ger:cleanup-log, r=alexcrichton
bors [Wed, 14 Oct 2015 19:54:47 +0000 (19:54 +0000)]
Auto merge of #29044 - Ms2ger:cleanup-log, r=alexcrichton

8 years agoAuto merge of #29003 - tari:freebsd-current_exe-vec, r=alexcrichton
bors [Wed, 14 Oct 2015 18:03:47 +0000 (18:03 +0000)]
Auto merge of #29003 - tari:freebsd-current_exe-vec, r=alexcrichton

Fixes #28995.

8 years agoReject "+" and "-" when parsing floats.
Robin Kruppe [Wed, 14 Oct 2015 17:27:49 +0000 (19:27 +0200)]
Reject "+" and "-" when parsing floats.

Fixes #29042

8 years agoManual fixups.
Jose Narvaez [Wed, 14 Oct 2015 17:43:36 +0000 (18:43 +0100)]
Manual fixups.

8 years agoAuto merge of #29001 - arielb1:normalized-foreign, r=eddyb
bors [Wed, 14 Oct 2015 16:12:51 +0000 (16:12 +0000)]
Auto merge of #29001 - arielb1:normalized-foreign, r=eddyb

This is needed as item types are allowed to be unnormalized.

Fixes an ICE that occurs when foreign function signatures contained
an associated type.

Fixes #28983

8 years agoFix the link to `Default` trait in the prelude docs
Gleb Kozyrev [Wed, 14 Oct 2015 14:31:27 +0000 (17:31 +0300)]
Fix the link to `Default` trait in the prelude docs

8 years agoAuto merge of #28909 - GuillaumeGomez:patch-3, r=pnkfelix
bors [Wed, 14 Oct 2015 13:04:53 +0000 (13:04 +0000)]
Auto merge of #28909 - GuillaumeGomez:patch-3, r=pnkfelix

r? @Manishearth

8 years agoRemove the unnecessary local variable in set_logger.
Ms2ger [Wed, 14 Oct 2015 12:17:06 +0000 (14:17 +0200)]
Remove the unnecessary local variable in set_logger.

8 years agoUse if-let rather than map() in parse_logging_spec.
Ms2ger [Wed, 14 Oct 2015 12:16:48 +0000 (14:16 +0200)]
Use if-let rather than map() in parse_logging_spec.

8 years agoAuto merge of #28827 - thepowersgang:unsafe-const-fn-2, r=Aatch
bors [Wed, 14 Oct 2015 10:17:30 +0000 (10:17 +0000)]
Auto merge of #28827 - thepowersgang:unsafe-const-fn-2, r=Aatch

This is the original test implementation, which works according to the tests I wrote, but might need a review.

8 years agoAuto merge of #29039 - Manishearth:rollup, r=Manishearth
bors [Wed, 14 Oct 2015 07:24:36 +0000 (07:24 +0000)]
Auto merge of #29039 - Manishearth:rollup, r=Manishearth

- Successful merges: #28991, #29004, #29006, #29013, #29016, #29024, #29027, #29028, #29029, #29032, #29035
- Failed merges:

8 years agofix tidy
Manish Goregaokar [Wed, 14 Oct 2015 07:22:14 +0000 (12:52 +0530)]
fix tidy

8 years agoRollup merge of #29035 - rutsky:patch-6, r=steveklabnik
Manish Goregaokar [Wed, 14 Oct 2015 04:23:41 +0000 (09:53 +0530)]
Rollup merge of #29035 - rutsky:patch-6, r=steveklabnik

r? @steveklabnik

The link is broken here: <https://doc.rust-lang.org/std/io/#types>.

Looks like crate documentation generator uses only first paragraph of the module documentation and
so doesn't resolve the link defined below.

Probably this behaviour of the documentation generator should be considered as a bug and should be reported.

8 years agoRollup merge of #29032 - goyox86:goyox86/rusfmting-librustc_bitflags, r=alexcrichton
Manish Goregaokar [Wed, 14 Oct 2015 04:23:41 +0000 (09:53 +0530)]
Rollup merge of #29032 - goyox86:goyox86/rusfmting-librustc_bitflags, r=alexcrichton

Hi Rustaceans!

This is the result of running latest rustfmt on librustc_bitflags!

//cc @nrc

8 years agoRollup merge of #29029 - steveklabnik:iter_function_docs, r=alexcrichton
Manish Goregaokar [Wed, 14 Oct 2015 04:23:41 +0000 (09:53 +0530)]
Rollup merge of #29029 - steveklabnik:iter_function_docs, r=alexcrichton

Flesh the docs out with examples.

8 years agoRollup merge of #29028 - Seeker14491:patch-1, r=Manishearth
Manish Goregaokar [Wed, 14 Oct 2015 04:23:41 +0000 (09:53 +0530)]
Rollup merge of #29028 - Seeker14491:patch-1, r=Manishearth

Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.

8 years agoRollup merge of #29024 - mseri:patch-1, r=nrc
Manish Goregaokar [Wed, 14 Oct 2015 04:23:40 +0000 (09:53 +0530)]
Rollup merge of #29024 - mseri:patch-1, r=nrc

r? @nrc

8 years agoRollup merge of #29016 - sanxiyn:data-layout, r=alexcrichton
Manish Goregaokar [Wed, 14 Oct 2015 04:23:40 +0000 (09:53 +0530)]
Rollup merge of #29016 - sanxiyn:data-layout, r=alexcrichton

8 years agoRollup merge of #29013 - chrisccerami:fix_broken_lifetime_elision_link, r=alexcrichton
Manish Goregaokar [Wed, 14 Oct 2015 04:23:40 +0000 (09:53 +0530)]
Rollup merge of #29013 - chrisccerami:fix_broken_lifetime_elision_link, r=alexcrichton

This link was added in #28842 but doesn't work at https://doc.rust-lang.org/nightly/book/lifetimes.html. What works in my markdown preview doesn't work live, and vice versa.

8 years agoRollup merge of #29006 - arielb1:callee-outlives-call, r=pnkfelix
Manish Goregaokar [Wed, 14 Oct 2015 04:23:39 +0000 (09:53 +0530)]
Rollup merge of #29006 - arielb1:callee-outlives-call, r=pnkfelix

This rather crucial requirement was not checked. In most cases, that
didn't cause any trouble because the argument types are required to
outlive the call and are subtypes of a subformula of the callee type.

However, binary ops are taken by ref only indirectly, without it being
marked in the argument types, which led to the argument types not being
constrained anywhere causing spurious errors (as these are basically
unconstrainable, I don't think this change can break code). Of course,
the old way was also incorrent with contravariance, but that is still
unsound for other reasons.

This also improves rustc::front to get RUST_LOG to *somewhat* work.

Fixes #28999. That issue is one of the several regression introduced by #28669.

r? @pnkfelix

8 years agoRollup merge of #29004 - frewsxcv:regression-test-22814, r=alexcrichton
Manish Goregaokar [Wed, 14 Oct 2015 04:23:39 +0000 (09:53 +0530)]
Rollup merge of #29004 - frewsxcv:regression-test-22814, r=alexcrichton

Closes #22814

8 years agoRollup merge of #28991 - goyox86:goyox86/rustfmting-liblog-II, r=alexcrichton
Manish Goregaokar [Wed, 14 Oct 2015 04:23:39 +0000 (09:53 +0530)]
Rollup merge of #28991 - goyox86:goyox86/rustfmting-liblog-II, r=alexcrichton

Hi Rustaceans!

This is the second version of running rustfmt on liblog https://github.com/rust-lang/rust/pull/28898. There are only rustfmt suggested changes. Because I think that some patterns here (that I fixed up in the prev PR need to be discussed in detail.

//cc @nrc

8 years agoAuto merge of #28816 - petrochenkov:unistruct, r=nrc
bors [Wed, 14 Oct 2015 04:21:58 +0000 (04:21 +0000)]
Auto merge of #28816 - petrochenkov:unistruct, r=nrc

This patch uses the same data structures for structs and enum variants in AST and HIR. These changes in data structures lead to noticeable simplification in most of code dealing with them.
I didn't touch the top level, i.e. `ItemStruct` is still `ItemStruct` and not `ItemEnum` with one variant, like in the type checker.
As part of this patch, structures and variants get the `kind` field making distinction between "normal" structs, tuple structs and unit structs explicit instead of relying on the number of fields and presence of constructor `NodeId`. In particular, we can now distinguish empty tuple structs from unit structs, which was impossible before! Comprehensive tests for empty structs are added and some improvements to empty struct feature gates are made. Some tests don't pass due to issue https://github.com/rust-lang/rust/issues/28692 , they are still there for completeness, but are commented out.
This patch fixes issue mentioned in https://github.com/rust-lang/rust/issues/16819#issuecomment-139509861, now emptiness of tuple structs is checked after expansion.
It also touches https://github.com/rust-lang/rust/issues/28750 by providing span for visit_struct_def
cc https://github.com/rust-lang/rust/pull/28336

r? @nrc

8 years agoAuto merge of #29026 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 14 Oct 2015 00:06:32 +0000 (00:06 +0000)]
Auto merge of #29026 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28988, #28989, #28990, #28997, #29007, #29015
- Failed merges: #28906

8 years agofix link on std::result::Result
Vladimir Rutsky [Tue, 13 Oct 2015 23:17:31 +0000 (02:17 +0300)]
fix link on std::result::Result

The link is broken here: <https://doc.rust-lang.org/std/io/#types>.

Looks like crate documentation generator uses only first paragraph of the module documentation and
so doesn't resolve the link defined below.

8 years agoRevert "fixups"
Marcello Seri [Tue, 13 Oct 2015 22:21:05 +0000 (23:21 +0100)]
Revert "fixups"

This reverts commit 5b8335ede4214f802eab765ca99b5afa9057973c.

8 years agoRustfmt-ing librustc_bitflags.
Jose Narvaez [Tue, 13 Oct 2015 22:14:32 +0000 (23:14 +0100)]
Rustfmt-ing librustc_bitflags.