]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoUse --cfg when running doctests
Seo Sanghyeon [Tue, 15 Dec 2015 09:03:55 +0000 (18:03 +0900)]
Use --cfg when running doctests

Previously passed --cfg was used only when collecting doctests.

8 years agoAuto merge of #30233 - retep998:where-in-the-world-is-windows-sdk, r=alexcrichton
bors [Tue, 15 Dec 2015 04:21:53 +0000 (04:21 +0000)]
Auto merge of #30233 - retep998:where-in-the-world-is-windows-sdk, r=alexcrichton

What I've done here is try to make the code match what vcvars does much more closely. It now chooses which SDK to find based on the version of MSVC that it found. It also bases the decision of whether to find all the things on whether `VCINSTALLDIR` has been set, which is more likely to have only been set by an invocation of vcvars, unlike previously where it would do some things only if `LIB` wasn't set even though there was a valid use case for libraries to add themselves to `LIB` without having invoked vcvars.

There are still some debug `println!`s so people can test the PR and make sure it works correctly on various setups.

It supports VS 2015, 2013, and 2012. People who want to use versions of VS older (or newer) than that will have to manually invoke the appropriate vcvars bat file to set the proper environment variables themselves.

Do not merge yet.

Fixes https://github.com/rust-lang/rust/issues/30229

8 years agoAuto merge of #30105 - faineance:master, r=nrc
bors [Tue, 15 Dec 2015 01:18:01 +0000 (01:18 +0000)]
Auto merge of #30105 - faineance:master, r=nrc

Issue: #30058
Updated for:
 - Stmt
 - BinOp_
 - UnOp
 - UintTy, IntTy and FloatTy
 - Lit
 - Generics

A possible inconsistancy?
The `Stmt` methods are on the spanned varient:
```rust
pub type Stmt = Spanned<Stmt_>;

impl Stmt {
    pub fn id(s: &Stmt) -> Option<NodeId> {
        match s.node {
          StmtDecl(_, id) => Some(id),
          StmtExpr(_, id) => Some(id),
          StmtSemi(_, id) => Some(id),
          StmtMac(..) => None,
      }
  }
}
```
Whilst the methods for BinOp are on the non spanned version.
````rust
impl BinOp_ {
    pub fn to_string(op: BinOp_) -> &'static str { ... }
    pub fn lazy(b: BinOp_) -> bool { ... }

    pub fn is_shift(b: BinOp_) -> bool { ... }
    pub fn is_comparison(b: BinOp_) -> bool { ... }
    /// Returns `true` if the binary operator takes its arguments by value
    pub fn is_by_value(b: BinOp_) -> bool { ... }

}
pub type BinOp = Spanned<BinOp_>;
````
r? @Manishearth

8 years agoOverhaul MSVC linker and Windows SDK detection code
Peter Atashian [Sun, 6 Dec 2015 08:27:21 +0000 (03:27 -0500)]
Overhaul MSVC linker and Windows SDK detection code
Fixes https://github.com/rust-lang/rust/issues/30229

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years ago[breaking-change] move ast_util functions to methods
faineance [Sat, 28 Nov 2015 19:02:07 +0000 (19:02 +0000)]
[breaking-change] move ast_util functions to methods

8 years agoAuto merge of #30328 - sanxiyn:include-type-name, r=alexcrichton
bors [Mon, 14 Dec 2015 21:08:13 +0000 (21:08 +0000)]
Auto merge of #30328 - sanxiyn:include-type-name, r=alexcrichton

Fix #30260.

8 years agoAuto merge of #27937 - DiamondLovesYou:llvm-root-and-shared, r=alexcrichton
bors [Mon, 14 Dec 2015 19:14:37 +0000 (19:14 +0000)]
Auto merge of #27937 - DiamondLovesYou:llvm-root-and-shared, r=alexcrichton

This handles cases when the LLVM used isn't configured will the 'usual' targets. Also, cases where LLVM is shared are also handled (ie with `LD_LIBRARY_PATH` etc).

8 years agoAuto merge of #30321 - sanxiyn:E0170, r=alexcrichton
bors [Mon, 14 Dec 2015 16:45:02 +0000 (16:45 +0000)]
Auto merge of #30321 - sanxiyn:E0170, r=alexcrichton

Fix #30302.

8 years agoAuto merge of #29735 - Amanieu:asm_indirect_constraint, r=pnkfelix
bors [Mon, 14 Dec 2015 13:48:41 +0000 (13:48 +0000)]
Auto merge of #29735 - Amanieu:asm_indirect_constraint, r=pnkfelix

This PR reverts #29543 and instead implements proper support for "=*m" and "+*m" indirect output operands. This provides a framework on top of which support for plain memory operands ("m", "=m" and "+m") can be implemented.

This also fixes the liveness analysis pass not handling read/write operands correctly.

8 years agoAuto merge of #30369 - jethrogb:patch-2, r=steveklabnik
bors [Mon, 14 Dec 2015 01:33:58 +0000 (01:33 +0000)]
Auto merge of #30369 - jethrogb:patch-2, r=steveklabnik

The old code returned `usize::MAX` as an error condition, which is not the Rust way.

8 years agoAuto merge of #30351 - tamird:remove-range-inclusive, r=alexcrichton
bors [Sun, 13 Dec 2015 23:40:12 +0000 (23:40 +0000)]
Auto merge of #30351 - tamird:remove-range-inclusive, r=alexcrichton

r? @alexcrichton

8 years agoBetter support for `--llvm-root`.
Richard Diamond [Sat, 22 Aug 2015 04:43:56 +0000 (23:43 -0500)]
Better support for `--llvm-root`.

This handles cases when the LLVM used isn't configured will the 'usual'
targets. Also, cases where LLVM is shared are also handled (ie with
`LD_LIBRARY_PATH` etc).

8 years agoMake BinaryHeap Dijkstra example return Option
jethrogb [Sun, 13 Dec 2015 19:40:27 +0000 (11:40 -0800)]
Make BinaryHeap Dijkstra example return Option

8 years agoAuto merge of #30348 - shepmaster:box-any-docs, r=steveklabnik
bors [Sun, 13 Dec 2015 18:59:08 +0000 (18:59 +0000)]
Auto merge of #30348 - shepmaster:box-any-docs, r=steveklabnik

8 years agoAuto merge of #30343 - Seeker14491:patch-1, r=bluss
bors [Sun, 13 Dec 2015 17:11:36 +0000 (17:11 +0000)]
Auto merge of #30343 - Seeker14491:patch-1, r=bluss

The `MIN` link was broken. Reverts #29624.

8 years agoAuto merge of #30342 - salty-horse:doc_links, r=steveklabnik
bors [Sun, 13 Dec 2015 15:22:03 +0000 (15:22 +0000)]
Auto merge of #30342 - salty-horse:doc_links, r=steveklabnik

Many of the structs in `str` that are used as part of its methods do not have links to the methods.
This is especially annoying when a Google search drops you into the documentation of the struct, when you really wanted to get to the method of the same name.

This patch adds those links.

8 years agoAuto merge of #30339 - Manishearth:oops-i-did-it-again, r=eddyb
bors [Sun, 13 Dec 2015 13:34:46 +0000 (13:34 +0000)]
Auto merge of #30339 - Manishearth:oops-i-did-it-again, r=eddyb

r? @eddyb

8 years agoAuto merge of #30332 - bluss:nomicon-variance, r=gankro
bors [Sun, 13 Dec 2015 11:44:39 +0000 (11:44 +0000)]
Auto merge of #30332 - bluss:nomicon-variance, r=gankro

Update nomicon for variance typo & contravariance

Fixes #28704
Fixes #28100

8 years agoAuto merge of #30329 - salty-horse:punctuation, r=steveklabnik
bors [Sun, 13 Dec 2015 09:57:35 +0000 (09:57 +0000)]
Auto merge of #30329 - salty-horse:punctuation, r=steveklabnik

Missing period at the end of a sentence.

8 years agoAuto merge of #30314 - fhahn:issue-30299-missing-fields, r=pnkfelix
bors [Sun, 13 Dec 2015 07:56:03 +0000 (07:56 +0000)]
Auto merge of #30314 - fhahn:issue-30299-missing-fields, r=pnkfelix

This PR for #30299 adds the name of the type where the field is missing.

The span that's used for the error seems correct. What may be confusing is when the initializer with the missing field contains other intializers. These are then included in the span. For example, consider the following listing.

    struct A {
        a1: i32,
        a2: B,
    }

    struct B {
        b1: i32,
        b2: i32
    }

    fn main() {
        let x = A {
            a2: B {
                b1: 1,
                b2: 1
            },
        };
    }

It will display the following code snippet along with the message that field `a2` is missing:

        let x = A {
            a2: B {
                b1: 1,
                b2: 1
            },
        };

By adding the name of the type it's clearer where the field is missing.

8 years agoRemove duplicate test case
Tamir Duberstein [Sun, 8 Nov 2015 18:39:27 +0000 (13:39 -0500)]
Remove duplicate test case

`match-arm-statics` covers this, but needs to be compiled with
debuginfo. However, that still produces an ICE. See #29696.

8 years agoremove deprecated APIs missed in #30182
Tamir Duberstein [Sat, 12 Dec 2015 12:55:28 +0000 (07:55 -0500)]
remove deprecated APIs missed in #30182

8 years agorestore tests accidentally removed in #30182
Tamir Duberstein [Sat, 12 Dec 2015 13:13:43 +0000 (08:13 -0500)]
restore tests accidentally removed in #30182

8 years agoAuto merge of #30324 - jseyfried:unfix_30159, r=nrc
bors [Sun, 13 Dec 2015 05:18:19 +0000 (05:18 +0000)]
Auto merge of #30324 - jseyfried:unfix_30159, r=nrc

r? @nrc
Since PR #30294 unintentionally fixed issue #30159, it can cause breakage for a different reason than I originally stated in the PR (see #30159, I characterized the issue precisely there).

This commit limits the scope of the breakage to what I originally stated in the PR by "unfixing" the backwards incompatible part of #30159.

I think fixing #30159 has enough potential for breakage to warrant a crater run. If you disagree, I can cancel this PR, leaving it fixed.

8 years agoAuto merge of #30310 - mbrubeck:doc-vec-bounds, r=steveklabnik
bors [Sun, 13 Dec 2015 01:53:06 +0000 (01:53 +0000)]
Auto merge of #30310 - mbrubeck:doc-vec-bounds, r=steveklabnik

r? @steveklabnik

Currently neither the API docs nor the book clearly explain that out-of-bounds array indexing causes a panic.  Since this is fairly important and seems to surprise a number of new Rust programmers, I think it's worth adding to both places.  (But if you think it would be better to put this info in the API docs only, that's fine too.)

Some specific things I'd like feedback on:

* The new text here talks about panicking, which hasn't been formally introduced at this point in chapter 5 (though it has been mentioned in previous sections too).
* Similarly the `Vec::get` example uses `Option<T>` which hasn't been fully introduced yet.  Should we leave out this example?

8 years agoAuto merge of #30309 - alexcrichton:more-tier-two, r=steveklabnik
bors [Sat, 12 Dec 2015 23:50:03 +0000 (23:50 +0000)]
Auto merge of #30309 - alexcrichton:more-tier-two, r=steveklabnik

We've got lots of new automation set up in the past few months, so these
platforms are now all tier 2 as we're building artifacts and gating on them.

8 years agoAuto merge of #30334 - dhuseby:FreeBSD_30333, r=alexcrichton
bors [Sat, 12 Dec 2015 20:55:44 +0000 (20:55 +0000)]
Auto merge of #30334 - dhuseby:FreeBSD_30333, r=alexcrichton

Removed the offending flag from the makefile.

8 years agoAuto merge of #30347 - rkruppe:misc-dec2flt-cleanup, r=alexcrichton
bors [Sat, 12 Dec 2015 18:02:43 +0000 (18:02 +0000)]
Auto merge of #30347 - rkruppe:misc-dec2flt-cleanup, r=alexcrichton

The landing of #30182, specifically the removal of float `from_str_radix`, allowed the refactoring in the middle commit. While I was at it, I also crossed two other nits off my TODO list.

8 years agoAuto merge of #30110 - oli-obk:pretty_const_trans, r=pnkfelix
bors [Sat, 12 Dec 2015 14:35:43 +0000 (14:35 +0000)]
Auto merge of #30110 - oli-obk:pretty_const_trans, r=pnkfelix

turned some `match`es into `if let`s.

8 years agoAuto merge of #30312 - seanmonstar:ioerror-description, r=alexcrichton
bors [Sat, 12 Dec 2015 12:47:03 +0000 (12:47 +0000)]
Auto merge of #30312 - seanmonstar:ioerror-description, r=alexcrichton

cc @pnkfelix @alexcrichton

8 years agoAuto merge of #30279 - Aatch:dst-ref-binding, r=pnkfelix
bors [Sat, 12 Dec 2015 11:01:12 +0000 (11:01 +0000)]
Auto merge of #30279 - Aatch:dst-ref-binding, r=pnkfelix

We shouldn't load DSTs when recursing into the sub-pattern of `& ref ident`.

Fixes #30277

8 years agoAuto merge of #27929 - w00ns:issue-27889-same-field-names, r=pnkfelix
bors [Sat, 12 Dec 2015 09:03:39 +0000 (09:03 +0000)]
Auto merge of #27929 - w00ns:issue-27889-same-field-names, r=pnkfelix

Fix for issue #27889: same field names in enum variants

8 years agoAuto merge of #30242 - arielb1:region-unification, r=nikomatsakis
bors [Sat, 12 Dec 2015 06:18:44 +0000 (06:18 +0000)]
Auto merge of #30242 - arielb1:region-unification, r=nikomatsakis

Fixes #29844

I would prefer to
(a) make some performance measurements
(b) use the unification table in a few more places
before committing further, but this is probably good enough for beta.

r? @nikomatsakis

8 years agonomicon: Mention contravariance
Ulrik Sverdrup [Fri, 11 Dec 2015 17:23:31 +0000 (18:23 +0100)]
nomicon: Mention contravariance

8 years agoCorrect reference to `Box<Any>` in `Any` docs
Jake Goulding [Fri, 11 Dec 2015 23:44:11 +0000 (18:44 -0500)]
Correct reference to `Box<Any>` in `Any` docs

8 years agodec2flt: Remove unused macro argument
Robin Kruppe [Fri, 11 Dec 2015 23:10:15 +0000 (00:10 +0100)]
dec2flt: Remove unused macro argument

The argument was a remnant of an earlier, needlessly complicated implementation.

8 years agodec2flt: Simplify imports and module surface
Robin Kruppe [Fri, 11 Dec 2015 23:07:42 +0000 (00:07 +0100)]
dec2flt: Simplify imports and module surface

The import has been unnecessarily complicated since ParseFloatError::Invalid is not longer used unqualified.
The pfe_* functions do not need to be public any more since the only other use site, from_str_radix for floats, has been removed.

8 years agoRemove an accent in a comment
Robin Kruppe [Fri, 11 Dec 2015 23:06:05 +0000 (00:06 +0100)]
Remove an accent in a comment

8 years agoPartially undo the fix of issue #30159 in PR #30294 to avoid breakage.
Jeffrey Seyfried [Fri, 11 Dec 2015 21:21:13 +0000 (21:21 +0000)]
Partially undo the fix of issue #30159 in PR #30294 to avoid breakage.

8 years agoFix MIN, MAX links
Brian Bowman [Fri, 11 Dec 2015 21:00:54 +0000 (15:00 -0600)]
Fix MIN, MAX links

The `MIN` link was broken. Reverts #29624.

8 years agoAdd missing links to str docs
Ori Avtalion [Fri, 11 Dec 2015 13:25:50 +0000 (15:25 +0200)]
Add missing links to str docs

8 years agoRemove leftover debugging code (fixes #30336)
Manish Goregaokar [Fri, 11 Dec 2015 20:12:50 +0000 (15:12 -0500)]
Remove leftover debugging code (fixes #30336)

8 years agoFixes #30333 by removing the -arch i386 form the right spot
Dave Huseby [Fri, 11 Dec 2015 18:51:30 +0000 (10:51 -0800)]
Fixes #30333 by removing the -arch i386 form the right spot

8 years agonomicon: Fix variance in example
Ulrik Sverdrup [Fri, 11 Dec 2015 17:15:57 +0000 (18:15 +0100)]
nomicon: Fix variance in example

&'b mut B was described incorrectly (just in this example, is correct in
the actual text).

8 years agobook: Add missing punctuation
Ori Avtalion [Fri, 11 Dec 2015 16:18:02 +0000 (18:18 +0200)]
book: Add missing punctuation

8 years agoInclude type name in symbol for methods
Seo Sanghyeon [Fri, 11 Dec 2015 15:01:08 +0000 (00:01 +0900)]
Include type name in symbol for methods

8 years agoDocument bounds checking in the book
Matt Brubeck [Thu, 10 Dec 2015 20:14:41 +0000 (12:14 -0800)]
Document bounds checking in the book

8 years agoFix for issue #27889: same field names in enum variants
w00ns [Fri, 21 Aug 2015 06:22:51 +0000 (08:22 +0200)]
Fix for issue #27889: same field names in enum variants

8 years agoAuto merge of #30308 - tsion:typo, r=sanxiyn
bors [Fri, 11 Dec 2015 09:56:51 +0000 (09:56 +0000)]
Auto merge of #30308 - tsion:typo, r=sanxiyn

r? @steveklabnik

8 years agoDo not include generics in suggestion to qualify enum variants
Seo Sanghyeon [Fri, 11 Dec 2015 08:43:04 +0000 (17:43 +0900)]
Do not include generics in suggestion to qualify enum variants

8 years agoAuto merge of #30265 - oli-obk:const_val_trans, r=pnkfelix
bors [Fri, 11 Dec 2015 08:12:41 +0000 (08:12 +0000)]
Auto merge of #30265 - oli-obk:const_val_trans, r=pnkfelix

r? @nagisa

I'm going to need the `ConstVal` -> `ValueRef` translation to start removing trans/consts piece by piece. If you need anything implemented in the translation, feel free to assign an issue to me.

8 years agoAuto merge of #30248 - petevine:master, r=brson
bors [Fri, 11 Dec 2015 06:29:06 +0000 (06:29 +0000)]
Auto merge of #30248 - petevine:master, r=brson

Running `/usr/bin/time -v make` to build rust (using local llvm) shows the maximum memory usage at 715 megabytes on 32-bit x86 (on arm linux it's even less @ 580M).

Reworded according to @brson's [input](https://github.com/rust-lang/rust/pull/30196#issuecomment-162088921).

8 years agoAuto merge of #30294 - jseyfried:fix_shadowed_use_visibility, r=nrc
bors [Fri, 11 Dec 2015 04:27:53 +0000 (04:27 +0000)]
Auto merge of #30294 - jseyfried:fix_shadowed_use_visibility, r=nrc

This fixes a bug in which the visibility of a use declaration defining a name in one namespace (e.g. the value namespace) is overridden by a later use declaration defining the same name in the other namespace (e.g. the type namespace). For example,
```rust
fn f() {}
pub mod bar {}

mod foo {
    use f; // This import should not be visible outside `foo`,
    pub use bar as f; // but it visible outside of `foo` because of this import.
}

fn main() { foo::f(); }
```
As the example demonstrates, this is a [breaking-change], but it looks unlikely to cause breakage in practice, and any breakage can be fixed by correcting visibility modifiers.

8 years agoAuto merge of #30307 - pnkfelix:fix-issue-26656, r=alexcrichton
bors [Fri, 11 Dec 2015 02:44:21 +0000 (02:44 +0000)]
Auto merge of #30307 - pnkfelix:fix-issue-26656, r=alexcrichton

Long awaited regression test for dropck on trait object method.

Fix #26656.

8 years agoRename (Ns)ImportResolution
Jeffrey Seyfried [Fri, 11 Dec 2015 01:38:13 +0000 (01:38 +0000)]
Rename (Ns)ImportResolution

8 years agoAuto merge of #30301 - michaelwoerister:mir-to-metadata2, r=nikomatsakis
bors [Fri, 11 Dec 2015 00:59:48 +0000 (00:59 +0000)]
Auto merge of #30301 - michaelwoerister:mir-to-metadata2, r=nikomatsakis

This PR makes `Mir` `RustcEncodable` and `RustcDecodable` and stores it in crate metadata for inlinable items.

Some other things in here:
- `mir::visit::Visitor` is extended to also visit `Literals`, `Spans` and `DefIds`.
- It also adds `mir::visit::MutVisitor` which allows to mutate the visited `Mir` structure in place.
- Some numbers on how big MIR is in metadata (total metadata size in bytes):

|                | w/ MIR     | w/o MIR     | Rel. Size |
|----------------|-----------:|------------:|:---------:|
| libcore        | 17,695,473 |  14,263,377 |  124%     |
| liblibc        | 411,440   |  404,382    | 102%      |
| libcollections |  4,537,975 |   3,526,933 |   129%    |
| libserialize   |  2,574,769 |   2,060,798 |   125%    |
| libsyntax      | 15,262,894 |  12,075,574 |  126%     |
| librustc       | 16,984,537 |  13,692,168 |  124%     |

So, adding MIR to metadata makes it about 25% bigger. It could be worse, considering that it still uses the inefficient RBML encoding. Still, the question is whether we should put MIR emission behind a `-Z` flag.

8 years agoAdd name of initializer to missing field message, closes #30299
Florian Hahn [Thu, 10 Dec 2015 23:25:08 +0000 (00:25 +0100)]
Add name of initializer to missing field message, closes #30299

8 years agoAuto merge of #30148 - steveklabnik:doc_string, r=alexcrichton
bors [Thu, 10 Dec 2015 23:18:07 +0000 (23:18 +0000)]
Auto merge of #30148 - steveklabnik:doc_string, r=alexcrichton

Part of #29376

8 years agostd: improve io error descriptions
Sean McArthur [Thu, 10 Dec 2015 21:29:33 +0000 (13:29 -0800)]
std: improve io error descriptions

8 years agoImprove documentation on String's methods
Steve Klabnik [Tue, 1 Dec 2015 21:07:53 +0000 (16:07 -0500)]
Improve documentation on String's methods

Part of #29376

8 years agoMake MIR encodable and store it in crate metadata.
Michael Woerister [Tue, 8 Dec 2015 20:53:19 +0000 (15:53 -0500)]
Make MIR encodable and store it in crate metadata.

8 years agoAdd a MIR visitor that allows to mutate the visited data
Michael Woerister [Tue, 8 Dec 2015 19:09:16 +0000 (14:09 -0500)]
Add a MIR visitor that allows to mutate the visited data

8 years agoAdd visit_defid(), visit_span(), and visit_literal() to MIR visitor
Michael Woerister [Tue, 8 Dec 2015 19:07:25 +0000 (14:07 -0500)]
Add visit_defid(), visit_span(), and visit_literal() to MIR visitor

8 years agoMIR: Make Mir take ownership of InlineAsm values.
Michael Woerister [Thu, 10 Dec 2015 21:39:17 +0000 (16:39 -0500)]
MIR: Make Mir take ownership of InlineAsm values.

8 years agoAuto merge of #30303 - mitaa:htmldocck, r=brson
bors [Thu, 10 Dec 2015 21:36:08 +0000 (21:36 +0000)]
Auto merge of #30303 - mitaa:htmldocck, r=brson

This changes the error output and behaviour to:
* not emit python backtraces
* run all checks
* include a context line per error
* move the offending line-number to the start of the line

fixes #21455

8 years agoMIR: Refactor mir::Terminator to use tuples instead of a fixed-size arrays.
Michael Woerister [Thu, 10 Dec 2015 20:46:40 +0000 (15:46 -0500)]
MIR: Refactor mir::Terminator to use tuples instead of a fixed-size arrays.

8 years agoAdd TupleSlice trait to rustc_data_structures.
Michael Woerister [Thu, 10 Dec 2015 19:35:53 +0000 (14:35 -0500)]
Add TupleSlice trait to rustc_data_structures.

8 years agoAuto merge of #30182 - alexcrichton:remove-deprecated, r=aturon
bors [Thu, 10 Dec 2015 19:54:15 +0000 (19:54 +0000)]
Auto merge of #30182 - alexcrichton:remove-deprecated, r=aturon

This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.

8 years agobook: Update Tier 2 platforms
Alex Crichton [Thu, 10 Dec 2015 19:50:20 +0000 (11:50 -0800)]
book: Update Tier 2 platforms

We've got lots of new automation set up in the past few months, so these
platforms are now all tier 2 as we're building artifacts and gating on them.

8 years agoCorrect 'bye' to 'byte' in str docs.
Scott Olson [Thu, 10 Dec 2015 19:49:04 +0000 (13:49 -0600)]
Correct 'bye' to 'byte' in str docs.

8 years agostd: Remove deprecated functionality from 1.5
Alex Crichton [Thu, 3 Dec 2015 01:07:29 +0000 (17:07 -0800)]
std: Remove deprecated functionality from 1.5

This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.

8 years agoLong await regression test for dropck on trait object method.
Felix S. Klock II [Thu, 10 Dec 2015 18:59:20 +0000 (19:59 +0100)]
Long await regression test for dropck on trait object method.

Fix #26656.

8 years agoAuto merge of #30267 - alexcrichton:tls-init-oh-my, r=nikomatsakis
bors [Thu, 10 Dec 2015 18:11:32 +0000 (18:11 +0000)]
Auto merge of #30267 - alexcrichton:tls-init-oh-my, r=nikomatsakis

Due to #30228 it's not currently sound to do `*ptr = Some(value)`, so instead
use `mem::replace` which fixes the soundness hole for now.

8 years agoImprove `htmldocck.py` error messages
mitaa [Thu, 10 Dec 2015 16:34:54 +0000 (17:34 +0100)]
Improve `htmldocck.py` error messages

8 years agoAuto merge of #30298 - Letheed:docpatch, r=sanxiyn
bors [Thu, 10 Dec 2015 16:28:53 +0000 (16:28 +0000)]
Auto merge of #30298 - Letheed:docpatch, r=sanxiyn

Missing Panics tag and missing period in the documentation of `fn expect(…)` for `Option` and `Result`.

8 years agoAuto merge of #30194 - brson:relnotes, r=brson
bors [Thu, 10 Dec 2015 14:43:54 +0000 (14:43 +0000)]
Auto merge of #30194 - brson:relnotes, r=brson

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).

cc @aturon

8 years agofix missing Panics tag and missing period
Letheed [Thu, 10 Dec 2015 13:20:32 +0000 (14:20 +0100)]
fix missing Panics tag and missing period

8 years agoAuto merge of #30297 - oli-obk:doc/fix_intravisit, r=sanxiyn
bors [Thu, 10 Dec 2015 11:57:17 +0000 (11:57 +0000)]
Auto merge of #30297 - oli-obk:doc/fix_intravisit, r=sanxiyn

r? @steveklabnik

8 years agoadjust documentation to mention `intravisit` instead of `visit`
Oliver Schneider [Thu, 10 Dec 2015 09:52:32 +0000 (10:52 +0100)]
adjust documentation to mention `intravisit` instead of `visit`

8 years agoAuto merge of #30293 - steveklabnik:fixes, r=brson
bors [Thu, 10 Dec 2015 06:38:06 +0000 (06:38 +0000)]
Auto merge of #30293 - steveklabnik:fixes, r=brson

I meant to double check the work in https://github.com/rust-lang/rust/issues/29429, but due to Mozlando, forgot. Here are two small fixes.

r? @brson I would like to get this backported to beta as well, sorry :( I don't generally want doc backports, but feel this is exceptional and worth it.

8 years agoAuto merge of #30292 - Xmasreturns:patch-3, r=steveklabnik
bors [Thu, 10 Dec 2015 04:54:03 +0000 (04:54 +0000)]
Auto merge of #30292 - Xmasreturns:patch-3, r=steveklabnik

Updated structs.md in the book

8 years agoAuto merge of #30291 - Xmasreturns:patch-2, r=steveklabnik
bors [Thu, 10 Dec 2015 03:09:27 +0000 (03:09 +0000)]
Auto merge of #30291 - Xmasreturns:patch-2, r=steveklabnik

Updated enums.md in the book

8 years agoFix a bug in which the visibility of a use declaration defining a name in one namespa...
Jeffrey Seyfried [Tue, 1 Dec 2015 23:06:34 +0000 (23:06 +0000)]
Fix a bug in which the visibility of a use declaration defining a name in one namespace (e.g. the value namespace) is overridden by a later use declaration defining the same name in the other namespace (e.g. the type namespace).

8 years agoAuto merge of #30285 - glglwty:patch-1, r=alexcrichton
bors [Thu, 10 Dec 2015 01:24:54 +0000 (01:24 +0000)]
Auto merge of #30285 - glglwty:patch-1, r=alexcrichton

srong -> strong in liballoc/arc.rs

8 years agoAuto merge of #30284 - GuillaumeGomez:patch-3, r=Manishearth
bors [Wed, 9 Dec 2015 23:41:16 +0000 (23:41 +0000)]
Auto merge of #30284 - GuillaumeGomez:patch-3, r=Manishearth

r? @Manishearth

8 years agoFixes from review
Xmasreturns [Wed, 9 Dec 2015 21:25:53 +0000 (13:25 -0800)]
Fixes from review

Traits -> Field labels
Revert a change to convention

8 years agoAuto merge of #30288 - brson:bump, r=alexcrichton
bors [Wed, 9 Dec 2015 21:11:48 +0000 (21:11 +0000)]
Auto merge of #30288 - brson:bump, r=alexcrichton

8 years agoFix link in char docs
Steve Klabnik [Wed, 9 Dec 2015 20:58:49 +0000 (15:58 -0500)]
Fix link in char docs

8 years agoFix extra space in str docs
Steve Klabnik [Wed, 9 Dec 2015 20:52:04 +0000 (15:52 -0500)]
Fix extra space in str docs

8 years agoGrammar and slight ordering changes
Xmasreturns [Wed, 9 Dec 2015 19:37:57 +0000 (11:37 -0800)]
Grammar and slight ordering changes

8 years agoAuto merge of #30270 - DiamondLovesYou:fix-30231, r=alexcrichton
bors [Wed, 9 Dec 2015 18:42:15 +0000 (18:42 +0000)]
Auto merge of #30270 - DiamondLovesYou:fix-30231, r=alexcrichton

Closes #30231

8 years agoGrammar changes for readability
Xmasreturns [Wed, 9 Dec 2015 18:07:02 +0000 (10:07 -0800)]
Grammar changes for readability

8 years agoAuto merge of #29937 - alexcrichton:panic-recover, r=alexcrichton
bors [Wed, 9 Dec 2015 16:57:46 +0000 (16:57 +0000)]
Auto merge of #29937 - alexcrichton:panic-recover, r=alexcrichton

This commit is an implementation of [RFC 1236] and [RFC 1323] which
rename the `thread::catch_panic` function to `panic::recover` while also
replacing the `Send + 'static` bounds with a new `PanicSafe` bound.

[RFC 1236]: https://github.com/rust-lang/rfcs/pull/1236
[RFC 1323]: https://github.com/rust-lang/rfcs/pull/1323

cc #27719

8 years agoBump to 1.7
Brian Anderson [Wed, 9 Dec 2015 16:23:35 +0000 (08:23 -0800)]
Bump to 1.7

8 years agoAdd E0269 error explanation
Guillaume Gomez [Wed, 9 Dec 2015 15:07:30 +0000 (16:07 +0100)]
Add E0269 error explanation

8 years agostd: Rename thread::catch_panic to panic::recover
Alex Crichton [Mon, 31 Aug 2015 15:51:53 +0000 (08:51 -0700)]
std: Rename thread::catch_panic to panic::recover

This commit is an implementation of [RFC 1236] and [RFC 1323] which
rename the `thread::catch_panic` function to `panic::recover` while also
replacing the `Send + 'static` bounds with a new `PanicSafe` bound.

[RFC 1236]: https://github.com/rust-lang/rfcs/pull/1236
[RFC 1323]: https://github.com/rust-lang/rfcs/pull/1323

cc #27719

8 years agofixed a typo in comments
Tianyi Wang [Wed, 9 Dec 2015 15:18:24 +0000 (23:18 +0800)]
fixed a typo in comments

srong -> strong in liballoc/arc.rs

8 years agoAuto merge of #30140 - michaelwoerister:tls-encoding, r=nikomatsakis
bors [Wed, 9 Dec 2015 15:10:37 +0000 (15:10 +0000)]
Auto merge of #30140 - michaelwoerister:tls-encoding, r=nikomatsakis

With this commit, metadata encoding and decoding can make use of thread-local encoding and decoding contexts. These allow implementers of `serialize::Encodable` and `Decodable` to access information and
datastructures that would otherwise not be available to them. For example, we can automatically translate def-id and span information during decoding because the decoding context knows which crate the data is decoded from. Or it allows to make `ty::Ty` decodable because the context has access to the `ty::ctxt` that is needed for creating `ty::Ty` instances.

Some notes:
- `tls::with_encoding_context()` and `tls::with_decoding_context()` (as opposed to their unsafe versions) try to prevent the TLS data getting out-of-sync by making sure that the encoder/decoder passed in is actually the same as the one stored in the context. This should prevent accidentally reading from the wrong decoder.
- There are no real tests in this PR. I had a unit tests for some of the core aspects of the TLS implementation but it was kind of brittle, a lot of code for mocking `ty::ctxt`, `crate_metadata`, etc and did actually test not so much. The code will soon be tested by the first incremental compilation auto-tests that rely on MIR being properly serialized. However, if people think that some tests should be added before this can land, I'll try to provide some that make sense.

r? @nikomatsakis

8 years agoAdd scoped thread-local encoding and decoding contexts to cstore.
Michael Woerister [Tue, 1 Dec 2015 15:07:15 +0000 (16:07 +0100)]
Add scoped thread-local encoding and decoding contexts to cstore.

With this commit, metadata encoding and decoding can make use of
thread-local encoding and decoding contexts. These allow implementers
of serialize::Encodable and Decodable to access information and
datastructures that would otherwise not be available to them. For
example, we can automatically translate def-id and span information
during decoding because the decoding context knows which crate the
data is decoded from. Or it allows to make ty::Ty decodable because
the context has access to the ty::ctxt that is needed for creating
ty::Ty instances.

8 years agoFix `& ref ident` patterns for DSTs
James Miller [Wed, 9 Dec 2015 11:35:55 +0000 (00:35 +1300)]
Fix `& ref ident` patterns for DSTs

We shouldn't load DSTs when recursing into the sub-pattern of `& ref ident`.

Fixes #30277