Commit Graph

47744 Commits

Author SHA1 Message Date
bors
c340ea1de5 Auto merge of #29547 - arielb1:speculative-upvar, r=eddyb
`resolve_identifier` used to mark a variable as an upvar when used within a closure. However, the function is also used for the "unnecessary qualification" lint, which would mark paths whose last component had the same name as a local as upvars.

Fixes #29522 

r? @eddyb
2015-11-04 00:30:05 +00:00
bors
708e319f80 Auto merge of #29545 - mystor:vec-deque-test-panic, r=bluss
I think this should fix the test failures in debug mode from #29492

The assertion was written incorrectly, and I don't like the way the new assertion is written, but I _think_ it does the right thing now.
2015-11-03 21:12:03 +00:00
bors
2a7bd082ac Auto merge of #29532 - Ryman:cow_path, r=alexcrichton 2015-11-03 19:29:44 +00:00
Ariel Ben-Yehuda
ca04855a06 resolve: don't speculatively create freevars when resolving
Fixes #29522
2015-11-03 21:08:42 +02:00
Michael Layzell
26db71783f Correct incorrect assertion in VecDeque::wrap_copy 2015-11-03 13:03:36 -05:00
Kevin Butler
f57621535e libcollections: DRY up a PartialEq impl for String 2015-11-03 17:41:42 +00:00
Kevin Butler
cc830ef18b libstd: implement PartialEq<Path> for PathBuf and Cow<Path> 2015-11-03 17:41:42 +00:00
bors
de11d2aa83 Auto merge of #29529 - Ryman:rustdoc-cap-lints, r=alexcrichton
This sets the `cap-lints` setting to 'allow' for all doc compilations. There's precedent for this as rustdoc [already whitelists unstable code](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs#L112) when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here.

Problem case in the wild: https://github.com/laumann/compiletest-rs/pull/28

r? @Manishearth
2015-11-03 17:02:13 +00:00
bors
4aa1f59e1e Auto merge of #29515 - Manishearth:ice-itembody, r=eddyb
r? @eddyb or @nrc
2015-11-03 15:19:07 +00:00
Manish Goregaokar
6468292c35 Fix ICE with unresolved associated items in closures (fixes #28971) 2015-11-03 20:09:20 +05:30
bors
c143ae7764 Auto merge of #29495 - meqif:fix_unindent_tabs, r=steveklabnik
A line may be indented with either spaces or tabs, but not a mix of both. If there is a mix of tabs and spaces, only the kind that occurs first is counted.

This addresses issue #29268.
2015-11-03 13:34:09 +00:00
bors
f18c905163 Auto merge of #29535 - Toby-S:patch-1, r=steveklabnik
This basically just inlines the fatal! macro from BurntSushi's [blog post](http://blog.burntsushi.net/rust-error-handling/#argument-parsing).

cc @steveklabnik
2015-11-03 11:51:34 +00:00
Toby Scrace
d9df16bf61 Fix #29533
This replaces usage of the (missing) `fatal!` macro with `panic!`.
2015-11-03 11:46:05 +00:00
Kevin Butler
7690ec89ff libstd: implement From<&Path|PathBuf> for Cow<Path> 2015-11-03 11:25:34 +00:00
bors
5b87225deb Auto merge of #29509 - vadimcn:readme, r=alexcrichton
The current readme provides critical information about gcc versions too late in the flow.

r? @steveklabnik
2015-11-03 10:01:06 +00:00
bors
eacd35984b Auto merge of #29459 - tshepang:simplify, r=steveklabnik 2015-11-03 08:18:45 +00:00
bors
fffe075708 Auto merge of #29523 - durka:patch-9, r=alexcrichton
`Rc::try_unwrap` and `Rc::make_mut` are stable since 1.4.0, but the example code still has `#![feature(rc_unique)]`. Ideally the stable and beta docs would be updated, but I don't think that's possible :(
2015-11-03 06:34:53 +00:00
bors
3330f54198 Auto merge of #29514 - apasel422:issue-26220, r=alexcrichton
Closes #26220.

r? @alexcrichton
2015-11-03 04:52:12 +00:00
bors
b7fbfb658e Auto merge of #29285 - eefriedman:libsyntax-panic, r=nrc
A set of commits which pushes some panics out of core parser methods, and into users of those parser methods.
2015-11-03 03:06:03 +00:00
bors
749625ad6d Auto merge of #29500 - vadimcn:rustlib, r=alexcrichton
According to a recent [discussion on IRC](https://botbot.me/mozilla/rust-tools/2015-10-27/?msg=52887517&page=2), there's no good reason for Windows builds to store target libraries under `bin`, when on every other platform they are under `lib`.

This might be a [breaking-change] for some users.  I am pretty sure VisualRust has that path hard-coded somewhere.

r? @brson
2015-11-03 01:23:10 +00:00
Kevin Butler
b1ef5302d5 librustdoc: ignore lint warnings when compiling documentation 2015-11-02 23:44:53 +00:00
bors
e2bb53ca52 Auto merge of #29291 - petrochenkov:privacy, r=alexcrichton
The public set is expanded with trait items, impls and their items, foreign items, exported macros, variant fields, i.e. all the missing parts. Now it's a subset of the exported set.
This is needed for https://github.com/rust-lang/rust/pull/29083 because stability annotation pass uses the public set and all things listed above need to be annotated.
Rustdoc can now be migrated to the public set as well, I guess.

Exported set is now slightly more correct with regard to exported items in blocks - 1) blocks in foreign items are considered and 2) publicity is not inherited from the block's parent - if a function is public it doesn't mean structures defined in its body are public.

r? @alexcrichton or maybe someone else
2015-11-02 23:38:49 +00:00
Vadim Petrochenkov
ab7b3456d0 Parens + issue number + typo 2015-11-03 01:58:41 +03:00
bors
a1fd944eb8 Auto merge of #29456 - alexcrichton:path-hash, r=aturon
Almost all operations on Path are based on the components iterator in one form
or another to handle equivalent paths. The `Hash` implementations, however,
mistakenly just went straight to the underlying `OsStr`, causing these
equivalent paths to not get merged together.

This commit updates the `Hash` implementation to also be based on the iterator
which should ensure that if two paths are equal they hash to the same thing.

cc #29008, but doesn't close it
2015-11-02 21:56:47 +00:00
Alex Crichton
d2dd700891 std: Base Hash for Path on its iterator
Almost all operations on Path are based on the components iterator in one form
or another to handle equivalent paths. The `Hash` implementations, however,
mistakenly just went straight to the underlying `OsStr`, causing these
equivalent paths to not get merged together.

This commit updates the `Hash` implementation to also be based on the iterator
which should ensure that if two paths are equal they hash to the same thing.

cc #29008, but doesn't close it
2015-11-02 12:58:54 -08:00
Alex Burka
983349ee99 remove #![feature(rc_unique)] from Rc docs
`Rc::try_unwrap` and `Rc::make_mut` are stable since 1.4.0, but the example code still has `#![feature(rc_unique)]`. Ideally the stable and beta docs would be updated, but I don't think that's possible...
2015-11-02 15:36:22 -05:00
bors
2249b07ae9 Auto merge of #29513 - apasel422:issue-23217, r=alexcrichton
Closes #23217.

r? @alexcrichton
2015-11-02 20:11:53 +00:00
Vadim Chugunov
8cf50bc1fd Merged windows and unix find_libdir() 2015-11-02 11:42:20 -08:00
bors
cf2319bbb6 Auto merge of #29510 - mneumann:dragonfly-guard-page, r=alexcrichton
Only tested on DragonFly.
2015-11-02 18:29:33 +00:00
bors
033e142915 Auto merge of #29518 - KyleMayes:master, r=apasel422
Fixes one of the `expr` examples to be a correct expression

r? @steveklabnik
2015-11-02 14:41:31 +00:00
Kyle Mayes
6e5d78dba3 Minor fix to Rust Book, Macros chapter
Fixes one of the `expr` examples to be a proper expression
2015-11-02 08:52:05 -05:00
bors
5b11b286bc Auto merge of #28846 - Ms2ger:categorization, r=nikomatsakis 2015-11-02 10:44:08 +00:00
Ricardo Martins
a9cbf6c1c1 Accept tabs as indentation character
A line may be indented with both spaces or tabs. All leading whitespace
is trimmed, even if it is mixed.
2015-11-02 09:17:17 +00:00
bors
7caf54bc0f Auto merge of #29505 - rjbs:docs-where-type, r=steveklabnik
I read this section a few times before even having a guess what
was meant, then consulted IRC for confirmation.  It may be that I
was thick-headed, but I think this is a useful addition.
2015-11-02 08:01:56 +00:00
Ricardo Signes
21a0c40ab3 Attempt to clarify use of `where i32: ConvertTo<T>
I read this section a few times before even having a guess what
was meant, then consulted IRC for confirmation.  It may be that I
was thick-headed, but I think this is a useful addition.
2015-11-01 20:41:22 -05:00
Vadim Chugunov
363deb0864 Formatting 2015-11-01 16:24:51 -08:00
bors
9c2489be0c Auto merge of #29507 - fhartwig:result-expect, r=Manishearth
This fixes part of #29506
These instances of `ok().expect()` have no benefit over using `Result`'s `expect` directly.
2015-11-01 23:22:22 +00:00
Andrew Paseltiner
6ad6cc30ef Implement IntoIterator for &{Path, PathBuf}
Closes #26220.
2015-11-01 18:04:53 -05:00
Andrew Paseltiner
3c20bd4d81 Add test for #23217
Closes #23217.
2015-11-01 17:55:09 -05:00
Michael Neumann
9415450ace Use guard-pages also on DragonFly/FreeBSD.
Only tested on DragonFly.
2015-11-01 22:56:31 +01:00
bors
6307719a12 Auto merge of #29501 - Manishearth:pat-docs, r=alexcrichton
None
2015-11-01 21:42:18 +00:00
Vadim Chugunov
ab10cb7443 Clarify Windows gcc setup instructions. 2015-11-01 12:41:32 -08:00
bors
af6e413fdb Auto merge of #29471 - pierzchalski:custom-target-custom-unwind-json, r=alexcrichton 2015-11-01 20:00:07 +00:00
Florian Hartwig
4168e026b4 Stop using ok().expect() in Result docs 2015-11-01 20:41:23 +01:00
Florian Hartwig
f7a61678e3 Replace ok().expect() by Result::expect in trait chapter of trpl 2015-11-01 20:40:20 +01:00
bors
71409184dc Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichton
Note: for now, this change only affects `-windows-gnu` builds.

So why was this `libgcc` dylib dependency needed in the first place?
The stack unwinder needs to know about locations of unwind tables of all the modules loaded in the current process.  The easiest portable way of achieving this is to have each module register itself with the unwinder when loaded into the process.  All modules compiled by GCC do this by calling the __register_frame_info() in their startup code (that's `crtbegin.o` and `crtend.o`, which are automatically linked into any gcc output).
Another important piece is that there should be only one copy of the unwinder (and thus unwind tables registry) in the process.  This pretty much means that the unwinder must be in a shared library (unless everything is statically linked). 

Now, Rust compiler tries very hard to make sure that any given Rust crate appears in the final output just once.   So if we link the unwinder statically to one of Rust's crates, everything should be fine.

Unfortunately, GCC startup objects are built under assumption that `libgcc` is the one true place for the unwind info registry, so I couldn't find any better way than to replace them.  So out go `crtbegin`/`crtend`, in come `rsbegin`/`rsend`!  

A side benefit of this change is that rustc is now more in control of the command line that goes to the linker, so we could stop using `gcc` as the linker driver and just invoke `ld` directly.
2015-11-01 17:15:29 +00:00
bors
6d43fef3aa Auto merge of #29486 - petrochenkov:multiwild, r=Manishearth
Motivation:
- It is not actually a pattern
- It is not actually needed, except for...

Drawback:
- Slice patterns like `[a, _.., b]` are pretty-printed as `[a, .., b]`. Great loss :(

plugin-[breaking-change], as always
2015-11-01 13:36:49 +00:00
Vadim Petrochenkov
306b0efc44 Add comment for stability.rs 2015-11-01 16:33:46 +03:00
Manish Goregaokar
8bb72cfe00 Add code formatting on PatVec docs 2015-11-01 16:37:12 +05:30
Manish Goregaokar
7e9d73cf2d Fix PatEnum docs 2015-11-01 16:32:51 +05:30