]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #26914 - alexcrichton:deprecate-easy, r=aturon
bors [Tue, 28 Jul 2015 01:12:39 +0000 (01:12 +0000)]
Auto merge of #26914 - alexcrichton:deprecate-easy, r=aturon

Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are:

* box_heap
* cmp_partial
* fs_time
* hash_default
* int_slice
* iter_min_max
* iter_reset_fuse
* iter_to_vec
* map_in_place
* move_from
* owned_ascii_ext
* page_size
* read_and_zero
* scan_state
* slice_chars
* slice_position_elem
* subslice_offset

8 years agostd: Deprecate a number of unstable features
Alex Crichton [Wed, 8 Jul 2015 15:33:13 +0000 (08:33 -0700)]
std: Deprecate a number of unstable features

Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are:

* cmp_partial
* fs_time
* hash_default
* int_slice
* iter_min_max
* iter_reset_fuse
* iter_to_vec
* map_in_place
* move_from
* owned_ascii_ext
* page_size
* read_and_zero
* scan_state
* slice_chars
* slice_position_elem
* subslice_offset

8 years agoAuto merge of #27250 - alexcrichton:ucrt, r=brson
bors [Mon, 27 Jul 2015 23:38:04 +0000 (23:38 +0000)]
Auto merge of #27250 - alexcrichton:ucrt, r=brson

Visual Studio 2015, recently released, includes the Universal CRT, a different
flavor than was provided before. The binaries and header files for this library
are included in new locations not previously known about by gcc-rs, and this
commit adds support for the necessary probing to find these.

Unfortunately there are no prior examples of this probing to be found in
frameworks like CMake or clang, so this is done is a bit of a sketchy method
today. It assumes that the installation is in a relatively standard format and
then blindly looks for the location of the UCRT. I'd love to switch this over to
using registry keys for probing, but I was currently unable to find such keys.

This should enable the compiler to work outside VS 2015 dev tools prompts.

8 years agoAuto merge of #26216 - azerupi:doc-experiments, r=steveklabnik
bors [Mon, 27 Jul 2015 21:20:11 +0000 (21:20 +0000)]
Auto merge of #26216 - azerupi:doc-experiments, r=steveklabnik

So I have tried to improve the rustbook engine:

- The sidebar now looks a lot more like gitbook (I thinks it cleaner)
- Added the Open Sans font, in my opinion more readable for prolonged periods of time
- Changed the style for code blocks a little

I encountered 1 problem. In `build.rs` I added this google font url (I commented out the non-relevant parts for clarity)

```rust
let rustdoc_args: &[String] = &[
    //"".to_string(),
    //preprocessed_path.display().to_string(),
    //format!("-o{}", out_path.display()),
    //format!("--html-before-content={}", prelude.display()),
    //format!("--html-after-content={}", postlude.display()),
    //format!("--markdown-playground-url=http://play.rust-lang.org"),
    //format!("--markdown-css={}", item.path_to_root.join("rust-book.css").display()),
    format!("--markdown-css=http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"),
    //"--markdown-no-toc".to_string(),
];
```
As you can see, I had to escape `=` with `=` because the string would get truncated if I didn't. Is that normal behaviour? Is that for security measures? If it is, isn't it a little weak if you can circumvent it by escaped characters? I don't know the reason behind, but I thought it was at least worth mentioning :)

Take your time for this PR, I still want to add multiple improvements:

- Like gitbook, possibility to change font by user
- Put `css` and `js` in their respective files (not hardcoded in rust)
- button to hide sidebar
- ...

So I'm not in a hurry to get this merged ;) But if you think it's good enough to be merged, go ahead. I will make another PR when I have other improvements.

In the image below is a screen of the improvements

![rustbook](https://cloud.githubusercontent.com/assets/7647338/8105345/bf545c74-1038-11e5-962e-b04ebfaf8257.png)

8 years agoAuto merge of #27230 - GuillaumeGomez:patch-1, r=brson
bors [Mon, 27 Jul 2015 19:44:22 +0000 (19:44 +0000)]
Auto merge of #27230 - GuillaumeGomez:patch-1, r=brson

Part of #24407.
cc @Manishearth

8 years agoFix the relative path issue by including the files using include_bytes!
Mathieu David [Mon, 27 Jul 2015 18:46:01 +0000 (20:46 +0200)]
Fix the relative path issue by including the files using include_bytes!

8 years agoAuto merge of #27304 - alexcrichton:revert-picky-dllimport, r=brson
bors [Mon, 27 Jul 2015 18:09:22 +0000 (18:09 +0000)]
Auto merge of #27304 - alexcrichton:revert-picky-dllimport, r=brson

This reverts commit a0efd3a3d99a98e3399a4f07abe6a67cf0660335.

This commit caused a lot of unintended breakage for many Cargo builds. The problem is that Cargo compiles build scripts with `-C prefer-dynamic`, so the standard library is always dynamically linked and hence any imports need to be marked with `dllimport`. Dependencies of build scripts, however, were compiled as rlibs and did not have their imports tagged with `dllimport`, so build scripts would fail to link.

While known that this situation would break, it was unknown that it was a common scenario in the wild. As a result I'm just reverting these heuristics for now.

8 years agoAuto merge of #27284 - lastorset:default-methods, r=Gankro
bors [Mon, 27 Jul 2015 16:34:40 +0000 (16:34 +0000)]
Auto merge of #27284 - lastorset:default-methods, r=Gankro

Instead of bar/baz, use valid/invalid as default methods. This
illustrates why you might want default methods, and shows that you can
call other trait methods from a default method.

r? @steveklabnik

8 years agoAuto merge of #27317 - midinastasurazz:patch-1, r=Gankro
bors [Mon, 27 Jul 2015 14:59:27 +0000 (14:59 +0000)]
Auto merge of #27317 - midinastasurazz:patch-1, r=Gankro

r? @steveklabnik

8 years agoAuto merge of #27278 - thepowersgang:result-expect-issue, r=alexcrichton
bors [Mon, 27 Jul 2015 13:24:34 +0000 (13:24 +0000)]
Auto merge of #27278 - thepowersgang:result-expect-issue, r=alexcrichton

8 years agoAuto merge of #27315 - eefriedman:improper-ctypes-void-ret, r=alexcrichton
bors [Mon, 27 Jul 2015 11:49:45 +0000 (11:49 +0000)]
Auto merge of #27315 - eefriedman:improper-ctypes-void-ret, r=alexcrichton

Fixes issue #27302.

8 years agoAuto merge of #27310 - akiss77:fix-aarch64-getrandom, r=alexcrichton
bors [Mon, 27 Jul 2015 09:34:05 +0000 (09:34 +0000)]
Auto merge of #27310 - akiss77:fix-aarch64-getrandom, r=alexcrichton

8 years agoAuto merge of #27308 - sstewartgallus:standardize-nonzero-check, r=alexcrichton
bors [Mon, 27 Jul 2015 05:55:25 +0000 (05:55 +0000)]
Auto merge of #27308 - sstewartgallus:standardize-nonzero-check, r=alexcrichton

It's odd that "! -z" was used instead of "-n" in some places.  Is perhaps, "! -z" more portable or something?

8 years agoFix typo: yur -> your
midinastasurazz [Mon, 27 Jul 2015 05:20:54 +0000 (07:20 +0200)]
Fix typo: yur -> your

8 years agoAuto merge of #26876 - liigo:patch-3, r=Gankro
bors [Mon, 27 Jul 2015 04:20:27 +0000 (04:20 +0000)]
Auto merge of #26876 - liigo:patch-3, r=Gankro

8 years agoAuto merge of #27274 - tshepang:not-needed-word, r=steveklabnik
bors [Mon, 27 Jul 2015 02:45:35 +0000 (02:45 +0000)]
Auto merge of #27274 - tshepang:not-needed-word, r=steveklabnik

Also, join the 2 sentences to improve flow

8 years agoIn improper-ctypes lint, handle functions which explicitly return `()`.
Eli Friedman [Mon, 27 Jul 2015 00:51:03 +0000 (17:51 -0700)]
In improper-ctypes lint, handle functions which explicitly return `()`.

Fixes issue #27302.

8 years agoAuto merge of #27311 - kballard:thread-mod-desc-remove-scoped, r=huonw
bors [Mon, 27 Jul 2015 01:10:32 +0000 (01:10 +0000)]
Auto merge of #27311 - kballard:thread-mod-desc-remove-scoped, r=huonw

It's deprecated and unsafe, so we shouldn't be encouraging people to use
it. Move it to `std::thread::scoped` instead, since it's still useful
information to anyone who is using the API.

8 years agoAuto merge of #27294 - eddyb:deep-unsize-hinting, r=nrc
bors [Sun, 26 Jul 2015 23:35:38 +0000 (23:35 +0000)]
Auto merge of #27294 - eddyb:deep-unsize-hinting, r=nrc

`Rc::new(RefCell::new(x)): Rc<RefCell<Trait>>` should not mean `RefCell::new(x): RefCell<Trait>`.
The latter is impossible, as an rvalue can't have an unsized type.
We were already handling unsized argument hints, but not when dealing with unsized structures.

8 years agoRemove the module-level documentation for thread::scoped
Kevin Ballard [Sun, 26 Jul 2015 22:26:47 +0000 (15:26 -0700)]
Remove the module-level documentation for thread::scoped

It's deprecated and unsafe, so we shouldn't be encouraging people to use
it. Move it to `std::thread::scoped` instead, since it's still useful
information to anyone who is using the API.

8 years agoAuto merge of #27267 - tamird:fix-ios-improper-ctypes, r=alexcrichton
bors [Sun, 26 Jul 2015 22:00:53 +0000 (22:00 +0000)]
Auto merge of #27267 - tamird:fix-ios-improper-ctypes, r=alexcrichton

Fixes #27263.

8 years agoFix getrandom syscall number for aarch64-unknown-linux-gnu
Akos Kiss [Sun, 26 Jul 2015 10:19:35 +0000 (10:19 +0000)]
Fix getrandom syscall number for aarch64-unknown-linux-gnu

8 years agotypeck: handle unsized structs in type hints by recursing into their last field.
Eduard Burtescu [Sun, 26 Jul 2015 00:55:35 +0000 (03:55 +0300)]
typeck: handle unsized structs in type hints by recursing into their last field.

8 years agoStandardize on non-zero checks for configure
Steven Stewart-Gallus [Sun, 26 Jul 2015 21:18:30 +0000 (14:18 -0700)]
Standardize on non-zero checks for configure

8 years agoAuto merge of #27012 - pornel:master, r=Gankro
bors [Sun, 26 Jul 2015 20:18:39 +0000 (20:18 +0000)]
Auto merge of #27012 - pornel:master, r=Gankro

Fixes #26689

This PR tries to clarify uses of "character" where it means "code point" or "UTF-8 sequence", which are almost, but not quite the same. Edge cases added to some examples to demonstrate this.

However, I've kept use of the term "code point" instead of "Unicode scalar value", because in UTF-8 they're the same, and "code point" is more widely known.

8 years agoAuto merge of #27272 - eefriedman:closure-const-crash, r=nikomatsakis
bors [Sun, 26 Jul 2015 17:51:30 +0000 (17:51 +0000)]
Auto merge of #27272 - eefriedman:closure-const-crash, r=nikomatsakis

Fixes issue #27268.

r? @nikomatsakis

8 years agoRevert "trans: Be a little more picky about dllimport"
Alex Crichton [Sun, 26 Jul 2015 17:19:11 +0000 (10:19 -0700)]
Revert "trans: Be a little more picky about dllimport"

This reverts commit a0efd3a3d99a98e3399a4f07abe6a67cf0660335.

8 years agoAuto merge of #27297 - mitaa:cleanup_E0005, r=alexcrichton
bors [Sun, 26 Jul 2015 15:17:24 +0000 (15:17 +0000)]
Auto merge of #27297 - mitaa:cleanup_E0005, r=alexcrichton

This does two things:
* removes ast::LocalSource, where only one variant was used because for-loop expansion has changed. One reason that this slipped into here is because the code in `check_local` which checks for `LocalSource::LocalFor` would report the same error as in `check_exhaustive` while using the wrong error code (E0005 instead of E0297).
* silences the warning about already used diagnostic code E0005 (fixes #27279)

passes `make check` locally.

8 years agoAuto merge of #26870 - jroesch:default-typaram-fallback, r=nikomatsakis
bors [Sun, 26 Jul 2015 10:39:18 +0000 (10:39 +0000)]
Auto merge of #26870 - jroesch:default-typaram-fallback, r=nikomatsakis

This PR completes [RFC 213](https://github.com/rust-lang/rfcs/blob/master/text/0213-defaulted-type-params.md) by allowing default type parameters to influence inference. This is almost certainly a breaking change due to interactions between default type parameters and the old fallback algorithm used for integral and floating point literals.

The error messages still require polish but I wanted to get early review and feedback from others on the the changes, error messages, and test cases. I also imagine we will want to run anywhere from 1-3 versions of this on crater and evaluate the impact, and it would be best to get that ball rolling.

The only outstanding issue I'm aware of is that type alias defaults don't work. It seems this may require significant restructuring, since during inference type aliases have already been expanded. @nikomatsakis might be able to provide some clarity here.

r? @nikomatsakis

cc @eddyb @Gankro @aturon @brson

8 years agoAuto merge of #27283 - arielb1:free-self-2, r=eddyb
bors [Sun, 26 Jul 2015 07:58:43 +0000 (07:58 +0000)]
Auto merge of #27283 - arielb1:free-self-2, r=eddyb

Fixes #27281

r? @eddyb

8 years agoSidestep warning about repeated E0005 `span_err!` invocation.
mitaa [Sat, 25 Jul 2015 22:01:28 +0000 (00:01 +0200)]
Sidestep warning about repeated E0005 `span_err!` invocation.

Fixes #27279

8 years agoRemove `ast::LocalSource` with only one used variant
mitaa [Sat, 25 Jul 2015 20:43:35 +0000 (22:43 +0200)]
Remove `ast::LocalSource` with only one used variant

`LocalSource` indicated wether a let binding originated from for-loop desugaring to enable specialized error messages, but for-loop expansion has changed and this is now achieved through `MatchSource::ForLoopDesugar`.

8 years agoAdd omitted trailing comma
Jared Roesch [Sun, 26 Jul 2015 04:22:38 +0000 (21:22 -0700)]
Add omitted trailing comma

8 years agoAddress nit
Jared Roesch [Sun, 26 Jul 2015 02:27:15 +0000 (19:27 -0700)]
Address nit

8 years agoAdd feature gate
Jared Roesch [Fri, 24 Jul 2015 20:39:11 +0000 (13:39 -0700)]
Add feature gate

8 years agoMake default error reporting deterministic
Jared Roesch [Tue, 21 Jul 2015 21:52:21 +0000 (14:52 -0700)]
Make default error reporting deterministic

8 years agoAdd cross-crate error message tests
Jared Roesch [Mon, 20 Jul 2015 19:49:03 +0000 (12:49 -0700)]
Add cross-crate error message tests

8 years agoAddress tidy
Jared Roesch [Mon, 20 Jul 2015 19:48:24 +0000 (12:48 -0700)]
Address tidy

8 years agoRework cross crate error messages
Jared Roesch [Mon, 20 Jul 2015 19:39:34 +0000 (12:39 -0700)]
Rework cross crate error messages

8 years agoFix error message spans
Jared Roesch [Thu, 16 Jul 2015 18:26:02 +0000 (11:26 -0700)]
Fix error message spans

8 years agoCorrectly subst defaults with the in-scope substs
Jared Roesch [Tue, 14 Jul 2015 01:12:18 +0000 (18:12 -0700)]
Correctly subst defaults with the in-scope substs

8 years agoRemove second transaction
Jared Roesch [Mon, 13 Jul 2015 08:49:13 +0000 (01:49 -0700)]
Remove second transaction

8 years agoRebase fixes
Jared Roesch [Mon, 13 Jul 2015 04:43:13 +0000 (21:43 -0700)]
Rebase fixes

8 years agoClean up test cases
Jared Roesch [Mon, 13 Jul 2015 04:02:16 +0000 (21:02 -0700)]
Clean up test cases

8 years agoRefactor the default type parameter algorithm
Jared Roesch [Mon, 13 Jul 2015 03:33:17 +0000 (20:33 -0700)]
Refactor the default type parameter algorithm

The algorithm was not correctly detecting conflicts after moving
defaults into TypeVariableValue. The updated algorithm
correctly detects and reports conflicts with information about
where the conflict occured and which items the defaults were
introduced by. The span's for said items are not being correctly
attached and still need to be patched.

8 years agoFix bug with defaults not being restored
Jared Roesch [Thu, 9 Jul 2015 23:04:37 +0000 (16:04 -0700)]
Fix bug with defaults not being restored

8 years agoRemove defaults table and attach defaults directly to tyvars
Jared Roesch [Thu, 9 Jul 2015 19:15:48 +0000 (12:15 -0700)]
Remove defaults table and attach defaults directly to tyvars

8 years agoCorrectly collect defaults from type alises in astconv
Jared Roesch [Wed, 8 Jul 2015 20:42:46 +0000 (13:42 -0700)]
Correctly collect defaults from type alises in astconv

8 years agoFix tidy
Jared Roesch [Tue, 7 Jul 2015 23:06:35 +0000 (16:06 -0700)]
Fix tidy

8 years agoImplement Default TyParam fallback
Jared Roesch [Tue, 7 Jul 2015 22:50:02 +0000 (15:50 -0700)]
Implement Default TyParam fallback

This patch allows type parameter defaults to influence type inference. This is a possible breaking change since it effects the way type inference works and will have different behavior when mixing defaults and literal fallback.

8 years agoDefault methods example: Show "(in)valid" case
Leif Arne Storset [Sat, 25 Jul 2015 16:18:47 +0000 (18:18 +0200)]
Default methods example: Show "(in)valid" case

Instead of bar/baz, use valid/invalid as default methods. This
illustrates why you might want default methods, and shows that you can
call other trait methods from a default method.

8 years agoSubstitute free lifetimes in `Self::T`
Ariel Ben-Yehuda [Sat, 25 Jul 2015 18:25:51 +0000 (21:25 +0300)]
Substitute free lifetimes in `Self::T`

Fixes #27281

8 years agoAuto merge of #27258 - nikomatsakis:issue-26952, r=eddyb
bors [Sat, 25 Jul 2015 18:16:51 +0000 (18:16 +0000)]
Auto merge of #27258 - nikomatsakis:issue-26952, r=eddyb

Correct regression in type-inference caused by failing to reconfirm that
the object trait matches the required trait during trait selection.  The
existing code was checking that the object trait WOULD match (in a
probe), but never executing the match outside of a probe.

This corrects various regressions observed in the wild, including
issue #26952. Fixes #26952.

r? @eddyb
cc @frankmcsherry

8 years agoDocument Unicode complications in chars iterator
Kornel Lesiński [Sat, 25 Jul 2015 15:01:48 +0000 (16:01 +0100)]
Document Unicode complications in chars iterator

8 years agoAuto merge of #26630 - eefriedman:recursive-static, r=pnkfelix
bors [Sat, 25 Jul 2015 14:50:13 +0000 (14:50 +0000)]
Auto merge of #26630 - eefriedman:recursive-static, r=pnkfelix

***Edit: Fixed now.*** I'm pretty sure the way I'm using LLVMReplaceAllUsesWith here is
unsafe... but before I figure out how to fix that, I'd like a
reality-check: is this actually useful?

8 years agoAuto merge of #27253 - bossmc:unbalanced-delimiters-cause-ice, r=nikomatsakis
bors [Sat, 25 Jul 2015 11:20:15 +0000 (11:20 +0000)]
Auto merge of #27253 - bossmc:unbalanced-delimiters-cause-ice, r=nikomatsakis

This introduces a test for #23389 and improves the error behaviour to treat the malformed LHS as an error, not a compiler bug.

The parse phase that precedes the call to `check_lhs_nt_follows` could possibly be enhanced to police the format itself (which the old code suggests was the original intention), but I'm not sure that's any nicer than just parsing the matcher as generic rust code and then policing the specific requirements for being a macro matcher afterwards (as this does).

Fixes #23389

8 years agoAuto merge of #26960 - Manishearth:wrapper-types, r=steveklabnik
bors [Sat, 25 Jul 2015 07:54:48 +0000 (07:54 +0000)]
Auto merge of #26960 - Manishearth:wrapper-types, r=steveklabnik

@steveklabnik had suggested I do this.

This needs much review -- I tried reducing the informal tone but there's room for improvement.

r? @steveklabnik

8 years agoReference issue #27277 on Result::expect
John Hodge [Sat, 25 Jul 2015 07:02:21 +0000 (15:02 +0800)]
Reference issue #27277 on Result::expect

8 years agoMove wrapper types blog post into trpl
Manish Goregaokar [Sat, 11 Jul 2015 07:08:50 +0000 (12:38 +0530)]
Move wrapper types blog post into trpl

8 years agoreference: "those" feels misplaced there
Tshepang Lekhonkhobe [Sat, 25 Jul 2015 04:56:21 +0000 (06:56 +0200)]
reference: "those" feels misplaced there

Also, join the 2 sentences to improve flow

8 years agoAuto merge of #27233 - tbu-:pr_wtf8, r=alexcrichton
bors [Sat, 25 Jul 2015 04:25:33 +0000 (04:25 +0000)]
Auto merge of #27233 - tbu-:pr_wtf8, r=alexcrichton

8 years agoAllow writing types which "can't" be instantiated.
Eli Friedman [Sun, 28 Jun 2015 17:38:28 +0000 (10:38 -0700)]
Allow writing types which "can't" be instantiated.

The borrow checker doesn't allow constructing such a type at runtime
using safe code, but there isn't any reason to ban them in the type checker.

Included in this commit is an example of a neat static doubly-linked list.

Feature-gated under the static_recursion gate to be on the safe side, but
there are unlikely to be any reasons this shouldn't be turned on by
default.

8 years agoAdd static_recursion feature gate.
Eli Friedman [Thu, 2 Jul 2015 21:07:42 +0000 (14:07 -0700)]
Add static_recursion feature gate.

8 years agoAllow recursive static variables.
Eli Friedman [Sun, 28 Jun 2015 17:36:46 +0000 (10:36 -0700)]
Allow recursive static variables.

There isn't any particularly good reason for this restriction, so just
get rid of it, and fix trans to handle this case.

8 years agoAuto merge of #26963 - Manishearth:improve-diag, r=steveklabnik
bors [Sat, 25 Jul 2015 01:01:32 +0000 (01:01 +0000)]
Auto merge of #26963 - Manishearth:improve-diag, r=steveklabnik

I'll be adding more commits to this PR as the weekend progresses. Was hoping to make this a mega-PR, but getting some eyes on this early would be nice too.

r? @steveklabnik

r? @eddyb on the object safety bits

cc @michaelsproul

Part of #24407

8 years agoFix an ICE with a closure in a constant.
Eli Friedman [Fri, 24 Jul 2015 22:51:54 +0000 (15:51 -0700)]
Fix an ICE with a closure in a constant.

Fixes issue #27268.

8 years agoFix `improper_ctypes` fallout
Tamir Duberstein [Fri, 24 Jul 2015 20:03:43 +0000 (16:03 -0400)]
Fix `improper_ctypes` fallout

8 years agoAuto merge of #27265 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 24 Jul 2015 19:04:31 +0000 (19:04 +0000)]
Auto merge of #27265 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27137, #27145, #27177, #27193, #27212, #27220, #27229, #27235, #27238, #27244, #27251
- Failed merges:

8 years agoRollup merge of #27251 - dhuseby:adding_snapshots, r=alexcrichton
Steve Klabnik [Fri, 24 Jul 2015 18:56:04 +0000 (14:56 -0400)]
Rollup merge of #27251 - dhuseby:adding_snapshots, r=alexcrichton

@alexcrichton please upload the following snapshot files along with this PR:

https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-17-d4432b3-bitrig-x86_64-af77768e0eb0f4c7ec5a8e36047a08053b54b230.tar.bz2
https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-17-d4432b3-freebsd-i386-b049325e5b2efe5f4884f3dafda448c1dac49b4f.tar.bz2
https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-17-d4432b3-freebsd-x86_64-a59e397188dbfe67456a6301df5ca13c7e238ab9.tar.bz2

8 years agoRollup merge of #27244 - Detegr:master, r=eddyb
Steve Klabnik [Fri, 24 Jul 2015 18:56:04 +0000 (14:56 -0400)]
Rollup merge of #27244 - Detegr:master, r=eddyb

Hi all.
This is my first contribution to Rust and fixes an issue causing an invalid error message to be presented to the user when using unit struct as length of a repeat expression, issue #27008. The solution is based on suggestions by @oli-obk, but as I'm a complete newbie to this, I have no clue if I got them right :)
The biggest concern I have is that if the `NodeId` I'm returning is the correct one or not (it's not meaningful in this case but I think it would be nice to get it right).

8 years agoRollup merge of #27238 - steveklabnik:gh26927, r=huonw
Steve Klabnik [Fri, 24 Jul 2015 18:56:03 +0000 (14:56 -0400)]
Rollup merge of #27238 - steveklabnik:gh26927, r=huonw

FIxes #26927

8 years agoRollup merge of #27235 - tbu-:pr_catch_panic_doc, r=steveklabnik
Steve Klabnik [Fri, 24 Jul 2015 18:56:03 +0000 (14:56 -0400)]
Rollup merge of #27235 - tbu-:pr_catch_panic_doc, r=steveklabnik

Fixes #27027.

8 years agoRollup merge of #27229 - AlisdairO:diagnostics371, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:03 +0000 (14:56 -0400)]
Rollup merge of #27229 - AlisdairO:diagnostics371, r=Manishearth

As title!

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27220 - AlisdairO:diagnostics120, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:02 +0000 (14:56 -0400)]
Rollup merge of #27220 - AlisdairO:diagnostics120, r=Manishearth

As title!

I should probably be bunching these up a bit more, but I'm not sure when my time is going to disappear on me.  Once my schedule stabilises I'll try to start batching them into larger PRs.

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27212 - AlisdairO:diagnostics225, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:02 +0000 (14:56 -0400)]
Rollup merge of #27212 - AlisdairO:diagnostics225, r=Manishearth

As title!

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27193 - aidanhs:aphs-advanced-linking-doc, r=steveklabnik
Steve Klabnik [Fri, 24 Jul 2015 18:56:02 +0000 (14:56 -0400)]
Rollup merge of #27193 - aidanhs:aphs-advanced-linking-doc, r=steveklabnik

Continuation of #25685.

8 years agoRollup merge of #27177 - echochamber:master, r=steveklabnik
Steve Klabnik [Fri, 24 Jul 2015 18:56:01 +0000 (14:56 -0400)]
Rollup merge of #27177 - echochamber:master, r=steveklabnik

Was browsing somebody else's code and came across a snippet using labels. Looking around, it seems like there was an example for this in [rustbyexample](http://rustbyexample.com/flow_control/loop/nested.html) but none in trpl.

8 years agoRollup merge of #27145 - apasel422:diagnostic-407-437-438, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:01 +0000 (14:56 -0400)]
Rollup merge of #27145 - apasel422:diagnostic-407-437-438, r=Manishearth

8 years agoRollup merge of #27137 - dhuseby:fixing_bitrig_linking, r=alexcrichton
Steve Klabnik [Fri, 24 Jul 2015 18:56:01 +0000 (14:56 -0400)]
Rollup merge of #27137 - dhuseby:fixing_bitrig_linking, r=alexcrichton

fixes the linking error on bitrig.

8 years agoAddress comments
Manish Goregaokar [Thu, 23 Jul 2015 06:41:04 +0000 (12:11 +0530)]
Address comments

8 years agoAdd long diagnostic for E0276
Manish Goregaokar [Wed, 22 Jul 2015 15:49:24 +0000 (21:19 +0530)]
Add long diagnostic for E0276

8 years agoAdd long diagnostic explanation for E0275
Manish Goregaokar [Wed, 22 Jul 2015 15:43:22 +0000 (21:13 +0530)]
Add long diagnostic explanation for E0275

8 years agoAdd long diagnostics for E0272-274 (on_unimplemented)
Manish Goregaokar [Wed, 22 Jul 2015 15:31:19 +0000 (21:01 +0530)]
Add long diagnostics for E0272-274 (on_unimplemented)

8 years agoAdd E0270
Manish Goregaokar [Sun, 19 Jul 2015 14:02:48 +0000 (19:32 +0530)]
Add E0270

8 years agotrans: Try to detect the Universal CRT on MSVC
Alex Crichton [Thu, 23 Jul 2015 23:10:04 +0000 (16:10 -0700)]
trans: Try to detect the Universal CRT on MSVC

Visual Studio 2015, recently released, includes the Universal CRT, a different
flavor than was provided before. The binaries and header files for this library
are included in new locations not previously known about by gcc-rs, and this
commit adds support for the necessary probing to find these.

Unfortunately there are no prior examples of this probing to be found in
frameworks like CMake or clang, so this is done is a bit of a sketchy method
today. It assumes that the installation is in a relatively standard format and
then blindly looks for the location of the UCRT. I'd love to switch this over to
using registry keys for probing, but I was currently unable to find such keys.

This should enable the compiler to work outside VS 2015 dev tools prompts.

8 years agoAuto merge of #27087 - nikomatsakis:closure-exploration, r=nrc
bors [Fri, 24 Jul 2015 16:36:32 +0000 (16:36 +0000)]
Auto merge of #27087 - nikomatsakis:closure-exploration, r=nrc

Refactors the "desugaring" of closures to expose the types of the upvars. This is necessary to be faithful with how actual structs work. The reasoning of the particular desugaring that I chose is explained in a fairly detailed comment.

As a side-effect, recursive closure types are prohibited unless a trait object intermediary is used. This fixes #25954 and also eliminates concerns about unrepresentable closure types that have infinite size, I believe. I don't believe this can cause regressions because of #25954.

(As for motivation, besides #25954 etc, this work is also intended as refactoring in support of incremental compilation, since closures are one of the thornier cases encountered when attempting to split node-ids into item-ids and within-item-ids. The goal is to eliminate the "internal def-id" distinction in astdecoding. However, I have to do more work on trans to really make progress there.)

r? @nrc

8 years agoCorrect regression in type-inference caused by failing to reconfirm that
Niko Matsakis [Fri, 24 Jul 2015 14:23:35 +0000 (10:23 -0400)]
Correct regression in type-inference caused by failing to reconfirm that
the object trait matches the required trait during trait selection.  The
existing code was checking that the object trait WOULD match (in a
probe), but never executing the match outside of a probe.

This corrects various regressions observed in the wild, including
issue #26952. Fixes #26952.

8 years agoFix typo
Guillaume Gomez [Fri, 24 Jul 2015 15:26:41 +0000 (17:26 +0200)]
Fix typo

8 years agoAuto merge of #27136 - dhuseby:fixing_freebsd_linking, r=alexcrichton
bors [Fri, 24 Jul 2015 14:17:48 +0000 (14:17 +0000)]
Auto merge of #27136 - dhuseby:fixing_freebsd_linking, r=alexcrichton

freebsd linking fix.

8 years agoAdd E0425 error explanation
Guillaume Gomez [Fri, 24 Jul 2015 12:58:00 +0000 (14:58 +0200)]
Add E0425 error explanation

8 years agoAdd E0426 error explanation
Guillaume Gomez [Fri, 24 Jul 2015 12:44:44 +0000 (14:44 +0200)]
Add E0426 error explanation

8 years agominor rebase fixes
Niko Matsakis [Fri, 24 Jul 2015 08:48:32 +0000 (04:48 -0400)]
minor rebase fixes

8 years agoAdd E0432 error explanation
Guillaume Gomez [Fri, 24 Jul 2015 10:30:14 +0000 (12:30 +0200)]
Add E0432 error explanation

8 years agoAdd E0431 error explanation
Guillaume Gomez [Fri, 24 Jul 2015 10:24:12 +0000 (12:24 +0200)]
Add E0431 error explanation

8 years agoAdd E0430 error explanation
Guillaume Gomez [Fri, 24 Jul 2015 10:19:36 +0000 (12:19 +0200)]
Add E0430 error explanation

8 years agoAuto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakis
bors [Fri, 24 Jul 2015 10:12:20 +0000 (10:12 +0000)]
Auto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakis

Macro desugaring of `in PLACE { BLOCK }` into "simpler" expressions following the in-development "Placer" protocol.

Includes Placer API that one can override to integrate support for `in` into one's own type.  (See [RFC 809].)

[RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md

Part of #22181

Replaced PR #26180.

Turns on the `in PLACE { BLOCK }` syntax, while leaving in support for the old `box (PLACE) EXPR` syntax (since we need to support that at least until we have a snapshot with support for `in PLACE { BLOCK }`.

(Note that we are not 100% committed to the `in PLACE { BLOCK }` syntax.  In particular I still want to play around with some other alternatives.  Still, I want to get the fundamental framework for the protocol landed so we can play with implementing it for non `Box` types.)

----

Also, this PR leaves out support for desugaring-based `box EXPR`.  We will hopefully land that in the future, but for the short term there are type-inference issues injected by that change that we want to resolve separately.

8 years agoImprove error explanation
Guillaume Gomez [Fri, 24 Jul 2015 09:02:26 +0000 (11:02 +0200)]
Improve error explanation

8 years agonits
Niko Matsakis [Fri, 24 Jul 2015 01:08:29 +0000 (21:08 -0400)]
nits

8 years agoAdd regression test for #25368. Fixes #25368.
Niko Matsakis [Fri, 24 Jul 2015 01:05:09 +0000 (21:05 -0400)]
Add regression test for #25368. Fixes #25368.

8 years agoAdd regression test for #25954 (cyclic closure type), which is now
Niko Matsakis [Fri, 17 Jul 2015 12:26:14 +0000 (08:26 -0400)]
Add regression test for #25954 (cyclic closure type), which is now
impossible.