]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoReplace ignore-android with ignore-cross-compile in rustdoc tests
Ryan Prichard [Wed, 22 Apr 2015 22:22:36 +0000 (15:22 -0700)]
Replace ignore-android with ignore-cross-compile in rustdoc tests

The problem is that rustdoc searches for external crates using the host
triple, not the target triple. It's actually unclear to me whether this is
correct behavior or not, but it is necessary to get cross-compiled tests
working.

9 years agoIgnore cross-compilation in some fulldeps tests.
Ryan Prichard [Wed, 22 Apr 2015 22:20:57 +0000 (15:20 -0700)]
Ignore cross-compilation in some fulldeps tests.

These tests fail, in general, for cross-compilation, because they require
the rustc crates to exist for the target, and they don't. We can't compile
them for the target unless we also compile LLVM for the target (we don't).

Android is a subset of cross-compilation.

The other fulldeps tests, on the other hand, work fine for
cross-compilation, and in fact, are verifying that rustc correctly searches
for a host plugin crate, not a target plugin crate.

9 years agoFix run-make/simd-ffi to work with parallel make check.
Ryan Prichard [Fri, 17 Apr 2015 11:58:47 +0000 (04:58 -0700)]
Fix run-make/simd-ffi to work with parallel make check.

9 years agoFix the dependency for the pretty-rpass-full tests
Ryan Prichard [Fri, 17 Apr 2015 12:05:22 +0000 (05:05 -0700)]
Fix the dependency for the pretty-rpass-full tests

The current code attempts to define the
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work,
because $(1) and $(3) are not inside a function. Moreover, there is a test
(run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not
an indirect dependency of librustc or libsyntax. Listing all the
dependencies will be hard to maintain, but there's a better way to do
this...

As with the rpass-full and cfail-full tests, add dependencies using the
$$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of
host and target crates, built for a particular stage and host. We use
T_$(3), not T_$(2), because we only build LLVM for host triples (not
target triples), so we can only build rustc_llvm for host triples. The
fulldeps tests that use plugins need host rustc crates, whereas fulldeps
tests that link against rustc and run should be skipped for
cross-compilation (such as Android).

Fixes #22021

9 years agoAuto merge of #24422 - pnkfelix:typeck-highlevel-before-bodies, r=nikomatsakis
bors [Fri, 17 Apr 2015 03:50:30 +0000 (03:50 +0000)]
Auto merge of #24422 - pnkfelix:typeck-highlevel-before-bodies, r=nikomatsakis

typeck: Do high-level structural/signature checks before function body checks.

This avoids various ICEs, e.g. premature calls to cat_expr that yield the dreaded "cat_expr Errd" ICE.

However, it also means that some early error feedback is now not provided.  This may be for the best, because the error feedback were were providing in some of those cases were false positives -- it was spurious feedback and a distraction from the real problem.

So it is not 100% clear whether we actually want to put this change in or not.  I think its a net win, but others might disagree.

(Kudos to @arielb1 for suggesting this modification.)

9 years agoAuto merge of #24420 - pnkfelix:oflo-api, r=alexcrichton
bors [Fri, 17 Apr 2015 00:28:48 +0000 (00:28 +0000)]
Auto merge of #24420 - pnkfelix:oflo-api, r=alexcrichton

Fill in missing parts of Integer overflow API

See todo list at #22020

9 years agoFix test for 32-bit targets.
Felix S. Klock II [Fri, 17 Apr 2015 00:03:38 +0000 (02:03 +0200)]
Fix test for 32-bit targets.

(The cast from the 64-bit value to isize was using the lower 32-bits,
which led to it being treated as a large positive value rather than a
smallish negative one. The fix was to use the same bits for the upper-
and lower- 32 bits.)

9 years agoAuto merge of #24396 - alexcrichton:rustdoc2, r=aturon
bors [Thu, 16 Apr 2015 20:34:55 +0000 (20:34 +0000)]
Auto merge of #24396 - alexcrichton:rustdoc2, r=aturon

A few final improvements to rustdoc for 1.0:

* Improve how rustdoc handles stability
* Fix cross-crate macro source links
* Improve experience of types inheriting methods through `Deref`

Some more details can be found in the commits.

[Preview](http://people.mozilla.org/~acrichton/doc/std/)

9 years agorustdoc: Inline methods inhereted through Deref
Alex Crichton [Mon, 13 Apr 2015 23:23:32 +0000 (16:23 -0700)]
rustdoc: Inline methods inhereted through Deref

Whenever a type implements Deref, rustdoc will now add a section to the "methods
available" sections for "Methods from Deref<Target=Foo>", listing all the
inherent methods of the type `Foo`.

Closes #19190

9 years agorustdoc: Fix cross-crate macro source links
Alex Crichton [Mon, 13 Apr 2015 22:25:40 +0000 (15:25 -0700)]
rustdoc: Fix cross-crate macro source links

The source filename for cross crate macros isn't quite right so the normal
generated links are invalid.

Closes #21311

9 years agorustdoc: Overhaul stability displays
Alex Crichton [Mon, 13 Apr 2015 18:55:00 +0000 (11:55 -0700)]
rustdoc: Overhaul stability displays

This commit is an overhaul to how rustdoc deals with stability of the standard
library. The handling has all been revisited with respect to Rust's current
approach to stability in terms of implementation as well as the state of the
standard library today. The high level changes made were:

* Stable items now have no marker by default
* Color-based small stability markers have been removed
* Module listings now fade out unstable/deprecated items slightly
* Trait methods have a separate background color based on stability and also
  list the reason that they are unstable.
* `impl` blocks with stability no longer render at all. This may be re-added
  once the compiler recognizes stability on `impl` blocks.
* `impl` blocks no longer have stability of the methods implemente indicated
* The stability summary has been removed

Closes #15468
Closes #21674
Closes #24201

9 years agoAuto merge of #24181 - jgallagher:aarch64-hfa, r=pnkfelix
bors [Thu, 16 Apr 2015 15:33:54 +0000 (15:33 +0000)]
Auto merge of #24181 - jgallagher:aarch64-hfa, r=pnkfelix

I doubt this PR is ready to merge as-is, for a couple reasons:

* There are no tests for this change. I'm not sure how to add tests for this change, as it modifies the C ABI for a cross-compilation target. Anecdotally, I have an iOS library I've been working on, and before this change, it crashes running on an arm64 device due to bad calling conventions (a simplified example is in #24154), and after this change, it runs correctly.
* This is my first foray into LLVM. I did my best to reimplement what Clang does for AArch64 codegen (https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/TargetInfo.cpp), particularly in `ABIInfo::isHomogeneousAggregate`, `AArch64ABIInfo::isHomogeneousAggregateBaseType`, and `AArch64ABIInfo::isHomogeneousAggregateSmallEnough`, but I'm not confident I got a complete translation, particularly because Clang includes a lot of checks that I don't believe are necessary for rustc.

Fixes #24154.

9 years agoAuto merge of #24448 - alexcrichton:issue-24445, r=huonw
bors [Thu, 16 Apr 2015 13:29:52 +0000 (13:29 +0000)]
Auto merge of #24448 - alexcrichton:issue-24445, r=huonw

One of the parameters to the magical "register a thread-local destructor"
function is called `__dso_handle` and largely just passed along (this seems to
be what other implementations do). Currently we pass the *value* of this symbol,
but apparently the correct piece of information to pass is the *address* of the
symbol.

In a PIE binary the symbol actually contains an address to itself which is why
we've gotten away with what we're doing as long as we have. In a non-PIE binary
the symbol contains the address `NULL`, causing a segfault in the runtime
library if it keeps going.

Closes #24445

9 years agoAuto merge of #24437 - fhahn:issue-24434, r=alexcrichton
bors [Thu, 16 Apr 2015 11:27:52 +0000 (11:27 +0000)]
Auto merge of #24437 - fhahn:issue-24434, r=alexcrichton

closes #24434

This PR changes executes `syntax::config::strip_unconfigured_items` before `syntax::feature_gate::check_crate_macros(sess.codemap()`. As far as I know, `strip_unconfigured_items` should be independent of `check_crate_macros`.

9 years agoAuto merge of #24423 - tbelaire:include_bytes, r=alexcrichton
bors [Thu, 16 Apr 2015 08:28:27 +0000 (08:28 +0000)]
Auto merge of #24423 - tbelaire:include_bytes, r=alexcrichton

This is a little bit tricky, since with include_str!, we know that we
are including utf-8 content, so it's safe to store the source as a
String in a FileMap. We don't know that for include_bytes!, but I don't
think we actually need to track the contents anyways, so I'm passing "".

new_filemap does check for the zero length content, and it should be
reasonable, howeven I'm not sure if it would be better to pass None
instead of Some(Rc::new("")) as the src component of a FileMap.

Fixes bug #24348

9 years agoAuto merge of #24306 - l0kod:libc-noctty, r=alexcrichton
bors [Thu, 16 Apr 2015 05:27:20 +0000 (05:27 +0000)]
Auto merge of #24306 - l0kod:libc-noctty, r=alexcrichton

cf. open(2): If the open file refers to a terminal device it will not become the process's controlling terminal even if the process does not have one.

9 years agoAuto merge of #23682 - tamird:DRY-is-empty, r=alexcrichton
bors [Thu, 16 Apr 2015 03:22:21 +0000 (03:22 +0000)]
Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichton

r? @alexcrichton

9 years agoAuto merge of #24485 - brson:is, r=alexcrichton
bors [Thu, 16 Apr 2015 01:17:04 +0000 (01:17 +0000)]
Auto merge of #24485 - brson:is, r=alexcrichton

It was an oversight that this was not done in the great int upheaval.

[breaking-change]

9 years agoForbid is/us suffixes. Fixes #22496
Brian Anderson [Wed, 15 Apr 2015 23:11:56 +0000 (16:11 -0700)]
Forbid is/us suffixes. Fixes #22496

It was an oversight that this was not done in the great int upheaval.

[breaking-change]

9 years agoAuto merge of #24481 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 15 Apr 2015 23:09:02 +0000 (23:09 +0000)]
Auto merge of #24481 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #24425, #24435, #24438, #24440, #24449, #24457, #24460, #24465, #24467, #24468, #24471, #24476, #24480
- Failed merges:

9 years agoRollup merge of #24480 - achanda:move_test, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:09 +0000 (17:26 -0400)]
Rollup merge of #24480 - achanda:move_test, r=alexcrichton

- Also move common functions to test.rs
- Leaves out Socket address related tests in addr.rs

9 years agoRollup merge of #24476 - brettcannon:patch-3, r=steveklabnik
Steve Klabnik [Wed, 15 Apr 2015 21:26:09 +0000 (17:26 -0400)]
Rollup merge of #24476 - brettcannon:patch-3, r=steveklabnik

"as an library" -> "as a library"

9 years agoRollup merge of #24471 - andrewseidl:master, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:09 +0000 (17:26 -0400)]
Rollup merge of #24471 - andrewseidl:master, r=alexcrichton

Use external instead of relative link for rustbyexample.com in generated `src/doc/index.md`. (http://doc.rust-lang.org/nightly/index.html)

Previous: http://doc.rust-lang.org/nightly/rustbyexample.com
Desired: http://rustbyexample.com/

9 years agoRollup merge of #24468 - brettcannon:patch-2, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:08 +0000 (17:26 -0400)]
Rollup merge of #24468 - brettcannon:patch-2, r=alexcrichton

Link spanned a line and was missing the actual link target.

9 years agoRollup merge of #24467 - brettcannon:patch-1, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:08 +0000 (17:26 -0400)]
Rollup merge of #24467 - brettcannon:patch-1, r=alexcrichton

Had a newline in middle of a link, causing the link text to be shown with `[]`.

9 years agoRollup merge of #24465 - steveklabnik:intoiteratordocfix, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:08 +0000 (17:26 -0400)]
Rollup merge of #24465 - steveklabnik:intoiteratordocfix, r=alexcrichton

9 years agoRollup merge of #24460 - bytewiseand:master, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:08 +0000 (17:26 -0400)]
Rollup merge of #24460 - bytewiseand:master, r=alexcrichton

Closes #24197
Closes #24375

These ICEs are fixed on nightly.

9 years agoRollup merge of #24457 - Ms2ger:more-typos, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:07 +0000 (17:26 -0400)]
Rollup merge of #24457 - Ms2ger:more-typos, r=alexcrichton

9 years agoRollup merge of #24449 - richo:typo, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:07 +0000 (17:26 -0400)]
Rollup merge of #24449 - richo:typo, r=alexcrichton

Spotted a typo, opened a tiny PR.

9 years agoRollup merge of #24440 - nham:improve_enumerate_doc, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:07 +0000 (17:26 -0400)]
Rollup merge of #24440 - nham:improve_enumerate_doc, r=alexcrichton

I found that the current description of `enumerate()` doesn't actually tell you what, specifically, the method does, and you have to look at the example to figure it out. Here's a description that I think is better.

9 years agoRollup merge of #24438 - nrc:tuple-span, r=sfackler
Steve Klabnik [Wed, 15 Apr 2015 21:26:07 +0000 (17:26 -0400)]
Rollup merge of #24438 - nrc:tuple-span, r=sfackler

9 years agoRollup merge of #24435 - killercup:patch-9, r=steveklabnik
Steve Klabnik [Wed, 15 Apr 2015 21:26:07 +0000 (17:26 -0400)]
Rollup merge of #24435 - killercup:patch-9, r=steveklabnik

The link works on the `std/ptr/index.html` docs page, but not the `std/primitive.pointer.html` page. Instead of leaving it half-broken, it is removed.

I tried fixing this in #24432, but @alexcrichton mentioned that this doc string was used in two places (with different base paths unfortunately).

r? @alexcrichton

9 years agoRollup merge of #24425 - dhuseby:bitrig_fixing_tests_3, r=alexcrichton
Steve Klabnik [Wed, 15 Apr 2015 21:26:06 +0000 (17:26 -0400)]
Rollup merge of #24425 - dhuseby:bitrig_fixing_tests_3, r=alexcrichton

the code block in the no-stdlib.md file caused test failure on bitrig and openbsd.

Closes #24108

9 years agoAuto merge of #24330 - pnkfelix:issue-24267, r=nikomatsakis
bors [Wed, 15 Apr 2015 21:05:16 +0000 (21:05 +0000)]
Auto merge of #24330 - pnkfelix:issue-24267, r=nikomatsakis

Extend rustc::middle::dataflow to allow filtering kills from flow-exits.

Fix borrowck analysis so that it will not treat a break that pops through an assignment
```rust
x = { ... break; ... }
```
as a kill of the "moved-out" bit for `x`.

Fix #24267.

[breaking-change], but really, its only breaking code that was already buggy.

9 years agoMove IP related tests to ip.rs
Abhishek Chanda [Wed, 15 Apr 2015 20:48:42 +0000 (13:48 -0700)]
Move IP related tests to ip.rs

- Also move common functions to test.rs
- Leaves out Socket address related tests in addr.rs

9 years agoGrammar fix
Brett Cannon [Wed, 15 Apr 2015 19:56:01 +0000 (15:56 -0400)]
Grammar fix

"as an library" -> "as a library"

9 years agoDescribe the Iterator enumerate() method more clearly.
Nick Hamann [Wed, 15 Apr 2015 01:11:37 +0000 (20:11 -0500)]
Describe the Iterator enumerate() method more clearly.

9 years agodoc: Fix link to rustbyexample.com
Andrew Seidl [Wed, 15 Apr 2015 17:58:00 +0000 (12:58 -0500)]
doc: Fix link to rustbyexample.com

9 years agoFix link to stack/heap page
Brett Cannon [Wed, 15 Apr 2015 16:57:22 +0000 (12:57 -0400)]
Fix link to stack/heap page

Link spanned a line and was mising the actual link target.

9 years agoFix link formatting error
Brett Cannon [Wed, 15 Apr 2015 16:51:34 +0000 (12:51 -0400)]
Fix link formatting error

Had a newline in middle of a link, causing the link text to be shown with `[]`.

9 years agoAuto merge of #24436 - fhahn:fix-small-typo, r=steveklabnik
bors [Wed, 15 Apr 2015 16:19:00 +0000 (16:19 +0000)]
Auto merge of #24436 - fhahn:fix-small-typo, r=steveklabnik

9 years agoRegression test.
Felix S. Klock II [Sat, 11 Apr 2015 16:57:41 +0000 (18:57 +0200)]
Regression test.

9 years agoDataflow changes and associated borrowck fix.
Felix S. Klock II [Sat, 11 Apr 2015 16:42:33 +0000 (18:42 +0200)]
Dataflow changes and associated borrowck fix.

Revise rustc::middle::dataflow: one must select kill-kind when calling
add_kill. The current kill-kinds are (1.) kills associated with
ends-of-scopes and (2.) kills associated with the actual action of the
expression/pattern.

Then, use this to fix borrowck analysis so that it will not treat a
break that pops through an assignment `x = { ... break; ... }` as a
kill of the "moved-out" bit for `x`.

Fix #24267.

(incorporated review feedback.)

9 years agostd: Fix thread_local! in non-PIE binaries
Alex Crichton [Wed, 15 Apr 2015 06:26:42 +0000 (23:26 -0700)]
std: Fix thread_local! in non-PIE binaries

One of the parameters to the magical "register a thread-local destructor"
function is called `__dso_handle` and largely just passed along (this seems to
be what other implementations do). Currently we pass the *value* of this symbol,
but apparently the correct piece of information to pass is the *address* of the
symbol.

In a PIE binary the symbol actually contains an address to itself which is why
we've gotten away with what we're doing as long as we have. In a non-PIE binary
the symbol contains the address `NULL`, causing a segfault in the runtime
library if it keeps going.

Closes #24445

9 years agoFix link in intoiterator docs
Steve Klabnik [Wed, 15 Apr 2015 15:43:43 +0000 (11:43 -0400)]
Fix link in intoiterator docs

9 years agoAdded a test for include_bytes! dep info
Theo Belaire [Wed, 15 Apr 2015 14:40:04 +0000 (10:40 -0400)]
Added a test for include_bytes! dep info

This tests that both include_str! and include_bytes!  mark their input
file as a dependancy, and it's correctly outputted when you run
`rustc --emit dep-info`.

9 years agoAdd tests for "ident only path should have been covered"-ICE
Andreas Martens [Wed, 15 Apr 2015 09:32:12 +0000 (11:32 +0200)]
Add tests for "ident only path should have been covered"-ICE

9 years agoFix some typos.
Ms2ger [Wed, 25 Mar 2015 17:02:11 +0000 (18:02 +0100)]
Fix some typos.

9 years agoAuto merge of #24426 - alexcrichton:windows-pipes, r=aturon
bors [Wed, 15 Apr 2015 08:21:43 +0000 (08:21 +0000)]
Auto merge of #24426 - alexcrichton:windows-pipes, r=aturon

This commit removes the last remnants of file descriptors from the Windows
implementation of `std::sys` by using `CreatePipe` to create anonymous pipes
instead of the `pipe` shim provided in msvcrt.

9 years agorustc: fix a typo in letter to rustc
Richo Healey [Wed, 15 Apr 2015 07:07:25 +0000 (00:07 -0700)]
rustc: fix a typo in letter to rustc

9 years agoAuto merge of #24211 - alexcrichton:windows-wsa-flag-overlapped, r=aturon
bors [Wed, 15 Apr 2015 06:18:51 +0000 (06:18 +0000)]
Auto merge of #24211 - alexcrichton:windows-wsa-flag-overlapped, r=aturon

This commit modifies the socket creation functions on windows to always specify
the `WSA_FLAG_OVERLAPPED` and `WSA_FLAG_NO_HANDLE_INHERIT` flags by default. The
overlapped flag enables IOCP APIs on Windows to be used with the socket at no
cost, enabling better interoperation with external libraries. The no handle
inherit flag mirrors the upcoming change to Unix to set CLOEXEC by default for
all handles.

Closes #24206

9 years agoAuto merge of #24431 - ruud-v-a:explain, r=alexcrichton
bors [Wed, 15 Apr 2015 04:14:50 +0000 (04:14 +0000)]
Auto merge of #24431 - ruud-v-a:explain, r=alexcrichton

This resolves part of #24407.

9 years agoFill in missing implementation
Tamir Duberstein [Wed, 25 Mar 2015 00:02:18 +0000 (17:02 -0700)]
Fill in missing implementation

9 years agoNegative case of `len()` -> `is_empty()`
Tamir Duberstein [Tue, 24 Mar 2015 23:54:09 +0000 (16:54 -0700)]
Negative case of `len()` -> `is_empty()`

`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`

9 years agoPositive case of `len()` -> `is_empty()`
Tamir Duberstein [Tue, 24 Mar 2015 23:53:34 +0000 (16:53 -0700)]
Positive case of `len()` -> `is_empty()`

`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`

9 years agoAuto merge of #24433 - alexcrichton:rollup, r=alexcrichton
bors [Wed, 15 Apr 2015 01:05:03 +0000 (01:05 +0000)]
Auto merge of #24433 - alexcrichton:rollup, r=alexcrichton

9 years agoTest fixes and rebase conflicts, round 2
Alex Crichton [Tue, 14 Apr 2015 21:37:14 +0000 (14:37 -0700)]
Test fixes and rebase conflicts, round 2

9 years agoFix the span for tuple expressions
Nick Cameron [Tue, 14 Apr 2015 23:20:17 +0000 (11:20 +1200)]
Fix the span for tuple expressions

9 years agoStrip configuration before checking feature gates of macros
Florian Hahn [Tue, 14 Apr 2015 21:25:40 +0000 (23:25 +0200)]
Strip configuration before checking feature gates of macros

closes #24434

9 years agoRemove superfluous `the` from `custom_attribute` feature gate message
Florian Hahn [Tue, 14 Apr 2015 21:24:03 +0000 (23:24 +0200)]
Remove superfluous `the` from `custom_attribute` feature gate message

9 years agoRemove Incorrect Link from std::ptr::null Docs
Pascal Hertleif [Tue, 14 Apr 2015 21:22:37 +0000 (23:22 +0200)]
Remove Incorrect Link from std::ptr::null Docs

The link works on the std::ptr docs page, but not the primitive.ptr.html page.
Instead of leaving it half-broken, it is removed.

9 years agoMerge remote-tracking branch 'origin/master' into rollup
Alex Crichton [Tue, 14 Apr 2015 21:13:42 +0000 (14:13 -0700)]
Merge remote-tracking branch 'origin/master' into rollup

Conflicts:
src/librustc/middle/stability.rs

9 years agostd: Remove final usage of fds from Windows
Alex Crichton [Tue, 14 Apr 2015 18:17:47 +0000 (11:17 -0700)]
std: Remove final usage of fds from Windows

This commit removes the last remnants of file descriptors from the Windows
implementation of `std::sys` by using `CreatePipe` to create anonymous pipes
instead of the `pipe` shim provided in msvcrt.

9 years agoTest fixes and rebase conflicts
Alex Crichton [Tue, 14 Apr 2015 19:18:37 +0000 (12:18 -0700)]
Test fixes and rebase conflicts

9 years agoAuto merge of #24399 - brson:stab, r=nrc
bors [Tue, 14 Apr 2015 18:59:26 +0000 (18:59 +0000)]
Auto merge of #24399 - brson:stab, r=nrc

9 years agodisabling a test for bitrig and openbsd
Dave Huseby [Tue, 14 Apr 2015 18:18:12 +0000 (11:18 -0700)]
disabling a test for bitrig and openbsd

9 years agoMake use of the stability attributes issue a deprecation warning. #22830
Brian Anderson [Tue, 14 Apr 2015 01:42:24 +0000 (18:42 -0700)]
Make use of the stability attributes issue a deprecation warning. #22830

9 years agorustc: Add long diagnostics for E0165
Ruud van Asseldonk [Tue, 14 Apr 2015 18:11:04 +0000 (20:11 +0200)]
rustc: Add long diagnostics for E0165

9 years agostd: Set overlap/noinherit flags on windows sockets
Alex Crichton [Wed, 8 Apr 2015 22:43:37 +0000 (15:43 -0700)]
std: Set overlap/noinherit flags on windows sockets

This commit modifies the socket creation functions on windows to always specify
the `WSA_FLAG_OVERLAPPED` and `WSA_FLAG_NO_HANDLE_INHERIT` flags by default. The
overlapped flag enables IOCP APIs on Windows to be used with the socket at no
cost, enabling better interoperation with external libraries. The no handle
inherit flag mirrors the upcoming change to Unix to set CLOEXEC by default for
all handles.

Closes #24206

9 years agorustc: Add long diagnostics for E0162
Ruud van Asseldonk [Tue, 14 Apr 2015 18:00:17 +0000 (20:00 +0200)]
rustc: Add long diagnostics for E0162

9 years agorollup merge of #24385: aturon/unstable-scoped
Alex Crichton [Tue, 14 Apr 2015 17:59:55 +0000 (10:59 -0700)]
rollup merge of #24385: aturon/unstable-scoped

Conflicts:
src/libstd/thread/mod.rs
src/test/bench/shootout-mandelbrot.rs
src/test/bench/shootout-reverse-complement.rs
src/test/run-pass/capturing-logging.rs
src/test/run-pass/issue-9396.rs
src/test/run-pass/tcp-accept-stress.rs
src/test/run-pass/tcp-connect-timeouts.rs
src/test/run-pass/tempfile.rs

9 years agorollup merge of #24377: apasel422/docs
Alex Crichton [Tue, 14 Apr 2015 17:56:57 +0000 (10:56 -0700)]
rollup merge of #24377: apasel422/docs

Conflicts:
src/libstd/net/ip.rs
src/libstd/sys/unix/fs.rs
src/libstd/sys/unix/mod.rs
src/libstd/sys/windows/mod.rs

9 years agorollup merge of #24401: fenduru/patch-2
Alex Crichton [Tue, 14 Apr 2015 17:56:00 +0000 (10:56 -0700)]
rollup merge of #24401: fenduru/patch-2

Not sure if `From<Error>` is the correct way to reference that trait (maybe `From<E: Error>`?)

r? @steveklabnik

9 years agorollup merge of #24399: brson/stab
Alex Crichton [Tue, 14 Apr 2015 17:55:59 +0000 (10:55 -0700)]
rollup merge of #24399: brson/stab

9 years agorollup merge of #24398: steveklabnik/thanks_mdinger
Alex Crichton [Tue, 14 Apr 2015 17:55:58 +0000 (10:55 -0700)]
rollup merge of #24398: steveklabnik/thanks_mdinger

The two-step command left off the nightly flag :frown:

Thanks @mdinger

9 years agorollup merge of #24394: rundrop1/patch-1
Alex Crichton [Tue, 14 Apr 2015 17:55:57 +0000 (10:55 -0700)]
rollup merge of #24394: rundrop1/patch-1

Feel silly because it's just one thing but it was bothering me that the documentation tells you what you're not going to learn now instead of linking to the item in question.  Am total noob pls assist, where is power button. :)

9 years agorollup merge of #24393: steveklabnik/rbe
Alex Crichton [Tue, 14 Apr 2015 17:55:56 +0000 (10:55 -0700)]
rollup merge of #24393: steveklabnik/rbe

It's no longer a community based project.

Also, Rust for Rubyists is deprecated at this point, so we shouldn't
link to it anymore.

9 years agorollup merge of #24391: nrc/visit-vis
Alex Crichton [Tue, 14 Apr 2015 17:55:55 +0000 (10:55 -0700)]
rollup merge of #24391: nrc/visit-vis

9 years agorollup merge of #24386: nagisa/rte-fix
Alex Crichton [Tue, 14 Apr 2015 17:55:54 +0000 (10:55 -0700)]
rollup merge of #24386: nagisa/rte-fix

r? @steveklabnik

9 years agorollup merge of #24381: erickt/cleanup
Alex Crichton [Tue, 14 Apr 2015 17:55:53 +0000 (10:55 -0700)]
rollup merge of #24381: erickt/cleanup

Just some minor patches I've been sitting on.

9 years agorollup merge of #24380: arielb1/no-enum-suggest
Alex Crichton [Tue, 14 Apr 2015 17:55:52 +0000 (10:55 -0700)]
rollup merge of #24380: arielb1/no-enum-suggest

Fixes #24365

9 years agorollup merge of #24379: rkruppe/fmt-negative-zero
Alex Crichton [Tue, 14 Apr 2015 17:55:51 +0000 (10:55 -0700)]
rollup merge of #24379: rkruppe/fmt-negative-zero

Fixes #20596 by making `Debug` render negative zero with a `-` without affecting the behavior of `Display`.

While I was at it, I also removed some dead code from `float_to_str_bytes_common` (the one from `libcore/fmt/float.rs`, not the function of the same name in `libstd/num/strconv.rs`). It had support for different bases, and for negative numbers, but the function is internal to core and the couple places that call it (all in `libcore/fmt/mod.rs`) never use those features: They pass in `num.abs()` and base 10.

9 years agorollup merge of #24376: lambdaburrito/master
Alex Crichton [Tue, 14 Apr 2015 17:55:48 +0000 (10:55 -0700)]
rollup merge of #24376: lambdaburrito/master

Values for `_SC_*` are not the same value between `macos` and `linux` so I've added specific target constants for Mac OS X and added `_SC_NPROCESSORS_ONLN` for `linux` and `macos`.

Closes #24374

9 years agorollup merge of #24371: dotdash/24353
Alex Crichton [Tue, 14 Apr 2015 17:55:47 +0000 (10:55 -0700)]
rollup merge of #24371: dotdash/24353

Fixes #24353

9 years agorollup merge of #24368: kgv/fix
Alex Crichton [Tue, 14 Apr 2015 17:55:46 +0000 (10:55 -0700)]
rollup merge of #24368: kgv/fix

Remove arity link from enums.md

r? @steveklabnik

9 years agorollup merge of #24350: tbelaire/cstring-doc-from-vec
Alex Crichton [Tue, 14 Apr 2015 17:55:45 +0000 (10:55 -0700)]
rollup merge of #24350: tbelaire/cstring-doc-from-vec

It looks like `from_vec` was subsumed by new at some point,
but the documentation still refers to it as `from_vec`.

This updates the documentation for `from_vec_unchecked`
so that it properly says that it's the unchecked version of `new`.

Also, from_vec_unchecked requires a actual Vec<u8> while
new can take anything that is Into<Vec<u8>>, so I also
mention that in the documentation.

Since this is documentation:
r? @steveklabnik

9 years agorollup merge of #24343: achanda/global_ip
Alex Crichton [Tue, 14 Apr 2015 17:55:45 +0000 (10:55 -0700)]
rollup merge of #24343: achanda/global_ip

- Adds two more functions for broadcast address and special
  address classes reserved for documentation
- Modifies the globally routable IP check to include these
  new functions

Fixes #24314

9 years agorollup merge of #24342: tbelaire/patch-1
Alex Crichton [Tue, 14 Apr 2015 17:55:44 +0000 (10:55 -0700)]
rollup merge of #24342: tbelaire/patch-1

It was mistakenly calling `with_extension` with "foo.txt" instead of "txt".
I've also added an assert.  This also calls more attention to the fact you get back a PathBuf, instead of a Path, which I feel is easy to miss when skimming.

9 years agorollup merge of #24337: barosl/rustdoc-help-key
Alex Crichton [Tue, 14 Apr 2015 17:55:43 +0000 (10:55 -0700)]
rollup merge of #24337: barosl/rustdoc-help-key

Only '?' should do that.

Fixes #24289.

9 years agorollup merge of #24329: GuillaumeGomez/atomicbool
Alex Crichton [Tue, 14 Apr 2015 17:55:42 +0000 (10:55 -0700)]
rollup merge of #24329: GuillaumeGomez/atomicbool

Fixes #24319.

9 years agorollup merge of #24310: alexcrichton/stabilize-utf8-error
Alex Crichton [Tue, 14 Apr 2015 17:55:41 +0000 (10:55 -0700)]
rollup merge of #24310: alexcrichton/stabilize-utf8-error

The meaning of each variant of this enum was somewhat ambiguous and it's uncler
that we wouldn't even want to add more enumeration values in the future. As a
result this error has been altered to instead become an opaque structure.
Learning about the "first invalid byte index" is still an unstable feature, but
the type itself is now stable.

9 years agorollup merge of #24303: alexcrichton/remove-deprecated
Alex Crichton [Tue, 14 Apr 2015 17:55:41 +0000 (10:55 -0700)]
rollup merge of #24303: alexcrichton/remove-deprecated

This commit removes these long deprecated modules. Such a nice diff stat!

9 years agorollup merge of #24273: steveklabnik/even_moar_editing
Alex Crichton [Tue, 14 Apr 2015 17:55:41 +0000 (10:55 -0700)]
rollup merge of #24273: steveklabnik/even_moar_editing

Three more sections

9 years agorollup merge of #24048: frewsxcv/patch-11
Alex Crichton [Tue, 14 Apr 2015 17:55:40 +0000 (10:55 -0700)]
rollup merge of #24048: frewsxcv/patch-11

Since it doesn't utilize the parameter, it's not very idiomatic since it
could just use the `Result::or` method. So this changes the example to
utilize the parameter. As far as I can tell, all the numbers in this
example are completely arbitrary.

9 years agoinclude_bytes! now registers the file included
Theo Belaire [Tue, 14 Apr 2015 17:53:23 +0000 (13:53 -0400)]
include_bytes! now registers the file included

This is a little bit tricky, since with include_str!, we know that we
are including utf-8 content, so it's safe to store the source as a
String in a FileMap. We don't know that for include_bytes!, but I don't
think we actually need to track the contents anyways, so I'm passing "".

new_filemap does check for the zero length content, and it should be
reasonable, howeven I'm not sure if it would be better to pass None
instead of Some(Rc::new("")) as the src component of a FileMap.

Fixes bug #24348

9 years agomutability fixes
Steve Klabnik [Tue, 14 Apr 2015 17:41:31 +0000 (13:41 -0400)]
mutability fixes

9 years agorustc: Add long diagnostics for E0302
Ruud van Asseldonk [Tue, 14 Apr 2015 17:39:58 +0000 (19:39 +0200)]
rustc: Add long diagnostics for E0302

9 years agorustc: Add long diagnostics for E0301
Ruud van Asseldonk [Tue, 14 Apr 2015 17:31:42 +0000 (19:31 +0200)]
rustc: Add long diagnostics for E0301

9 years agorustc: Add long diagnostics for E0297
Ruud van Asseldonk [Tue, 14 Apr 2015 16:27:41 +0000 (18:27 +0200)]
rustc: Add long diagnostics for E0297

9 years agoMore test fixes
Alex Crichton [Fri, 10 Apr 2015 20:51:53 +0000 (13:51 -0700)]
More test fixes