]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoImplement Weak::new_downgraded() (#30425)
Sebastian Hahn [Fri, 18 Dec 2015 19:40:17 +0000 (20:40 +0100)]
Implement Weak::new_downgraded() (#30425)

This adds a constructor for a Weak that can never be upgraded. These are
mostly useless, but for example are required when deserializing.

8 years agoAuto merge of #30286 - oli-obk:const_error_span, r=nikomatsakis
bors [Fri, 18 Dec 2015 12:23:54 +0000 (12:23 +0000)]
Auto merge of #30286 - oli-obk:const_error_span, r=nikomatsakis

previously the error was erased and a `non-const path` error was emitted at the location of the field access instead of at the overflow location (as can be seen in the playground: http://is.gd/EuAF5F )

8 years agoAuto merge of #30272 - tshepang:doc-drain, r=bluss
bors [Fri, 18 Dec 2015 05:05:09 +0000 (05:05 +0000)]
Auto merge of #30272 - tshepang:doc-drain, r=bluss

Second sentence actually repeats info from first sentence. "from start to end" also feels like it adds nothing.

I also extended Vec::drain example.

8 years agoAuto merge of #30414 - alexcrichton:fix-cross-builds, r=brson
bors [Fri, 18 Dec 2015 03:05:02 +0000 (03:05 +0000)]
Auto merge of #30414 - alexcrichton:fix-cross-builds, r=brson

It looks like #27937 accidentally switched the llvmdeps file from the target to
the host by accident, so be sure to use the right llvmdeps file which is built
for the target when building rustc_llvm

8 years agoAuto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakis
bors [Fri, 18 Dec 2015 00:24:05 +0000 (00:24 +0000)]
Auto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakis

Still will not translate references to items like `X` or `Y::V` where

```
struct X;
enum Y { V }
```

but I must go work on university things so I’m PRing what I have.

r? @nikomatsakis

8 years agoAuto merge of #30445 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 17 Dec 2015 20:08:48 +0000 (20:08 +0000)]
Auto merge of #30445 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #30370, #30404, #30415, #30419, #30428, #30437, #30439, #30441, #30442, #30443
- Failed merges:

8 years agoRollup merge of #30443 - tshepang:just-a-rename, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30443 - tshepang:just-a-rename, r=steveklabnik

8 years agoRollup merge of #30442 - tshepang:typo, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30442 - tshepang:typo, r=steveklabnik

8 years agoRollup merge of #30441 - tshepang:missing-comma, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30441 - tshepang:missing-comma, r=steveklabnik

8 years agoRollup merge of #30439 - swooster:swooster-nomicon-patch-1, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30439 - swooster:swooster-nomicon-patch-1, r=steveklabnik

The Rustonomicon's Lifetimes chapter uses the idiom "big ask", which is obscure compared to "tall order" (check [Google ngrams](https://books.google.com/ngrams/graph?content=big+ask%2C+tall+order&year_start=1800)). Also, it's easily mistaken for a typo; either "a big task" or "a big thing to ask" could plausibly work there.

r? @steveklabnik

8 years agoRollup merge of #30437 - tshepang:clarity, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30437 - tshepang:clarity, r=steveklabnik

The comma removes the sorface ambiguity

8 years agoRollup merge of #30428 - steveklabnik:quickfix, r=apasel422
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30428 - steveklabnik:quickfix, r=apasel422

8 years agoRollup merge of #30419 - shepmaster:rogue-I, r=alexcrichton
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30419 - shepmaster:rogue-I, r=alexcrichton

r? @steveklabnik

8 years agoRollup merge of #30415 - steveklabnik:remove_bad_stability_note, r=alexcrichton
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30415 - steveklabnik:remove_bad_stability_note, r=alexcrichton

8 years agoRollup merge of #30404 - Shiney:ImprovedStackHeap, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30404 - Shiney:ImprovedStackHeap, r=steveklabnik

…entation clearer

I could not use colors as suggested for #29854 because Github doesn't support these in markdown, however this solution may be better for color-blind readers.

8 years agoRollup merge of #30370 - zachreizner:patch-1, r=apasel422
Steve Klabnik [Thu, 17 Dec 2015 19:47:12 +0000 (14:47 -0500)]
Rollup merge of #30370 - zachreizner:patch-1, r=apasel422

8 years agodoc: improve drain examples and remove secondary info from leading paragraph
Tshepang Lekhonkhobe [Tue, 8 Dec 2015 22:04:54 +0000 (00:04 +0200)]
doc: improve drain examples and remove secondary info from leading paragraph

8 years agodoc: no need to duplicate docs on renamed API
Tshepang Lekhonkhobe [Thu, 17 Dec 2015 19:04:26 +0000 (21:04 +0200)]
doc: no need to duplicate docs on renamed API

8 years agoTest generic methods
Simonas Kazlauskas [Sat, 5 Dec 2015 18:35:46 +0000 (20:35 +0200)]
Test generic methods

8 years agodoc: fix typo
Tshepang Lekhonkhobe [Thu, 17 Dec 2015 18:57:14 +0000 (20:57 +0200)]
doc: fix typo

8 years agodoc: add a missing comma
Tshepang Lekhonkhobe [Thu, 17 Dec 2015 18:55:20 +0000 (20:55 +0200)]
doc: add a missing comma

8 years agoAuto merge of #30325 - jseyfried:fixes_30078, r=nrc
bors [Thu, 17 Dec 2015 18:21:25 +0000 (18:21 +0000)]
Auto merge of #30325 - jseyfried:fixes_30078, r=nrc

This fixes a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in `resolve_path` (issue #30078), and it removes unused imports that were previously undetected because of the bug.

8 years agoChange "big ask" to "tall order" in Rustonomicon.
Steve Wooster [Thu, 17 Dec 2015 17:40:02 +0000 (09:40 -0800)]
Change "big ask" to "tall order" in Rustonomicon.

The Rustonomicon's Lifetimes chapter uses the idiom "big ask", which is obscure compared to "tall order" (check Google ngrams). Also, it's easily mistaken for a typo; either "a big task" or "a big thing to ask" could plausibly work there.

8 years agodoc: improve clarity by introducing a pause
Tshepang Lekhonkhobe [Thu, 17 Dec 2015 17:27:52 +0000 (19:27 +0200)]
doc: improve clarity by introducing a pause

8 years agorustc_resolve: fix a bug in which unused imports can get wrongly marked as used when...
Jeffrey Seyfried [Sat, 12 Dec 2015 03:30:53 +0000 (03:30 +0000)]
rustc_resolve: fix a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in resolve_path (fixes #30078)

8 years agoRemove unused imports
Jeffrey Seyfried [Sat, 12 Dec 2015 03:29:35 +0000 (03:29 +0000)]
Remove unused imports

8 years agosmall fix to str doc example
Steve Klabnik [Thu, 17 Dec 2015 03:12:47 +0000 (22:12 -0500)]
small fix to str doc example

8 years agoAuto merge of #30354 - petrochenkov:defuse, r=sanxiyn
bors [Thu, 17 Dec 2015 01:22:53 +0000 (01:22 +0000)]
Auto merge of #30354 - petrochenkov:defuse, r=sanxiyn

A relic of some old resolution algorithm?

8 years agoAuto merge of #30341 - pnkfelix:call-site-scope, r=nikomatsakis
bors [Wed, 16 Dec 2015 22:53:19 +0000 (22:53 +0000)]
Auto merge of #30341 - pnkfelix:call-site-scope, r=nikomatsakis

Ensure borrows of fn/closure params do not outlive invocations.

Does this by adding a new CallSiteScope to the region (or rather code extent) hierarchy, which outlives even the ParameterScope (which in turn outlives the DestructionScope of a fn/closure's body).

Fix #29793

r? @nikomatsakis

8 years agoUsed bold and italic in the markdown to make the stack and heap documentation clearer
Shiney [Tue, 15 Dec 2015 22:13:04 +0000 (22:13 +0000)]
Used bold and italic in the markdown to make the stack and heap documentation clearer

8 years agoAuto merge of #29962 - aturon:coherence-errors, r=nmatsakis
bors [Wed, 16 Dec 2015 20:22:07 +0000 (20:22 +0000)]
Auto merge of #29962 - aturon:coherence-errors, r=nmatsakis

Currently, a coherence error based on overlapping impls simply mentions
the trait, and points to the two conflicting impls:

```
error: conflicting implementations for trait `Foo`
```

With this commit, the error will include all input types to the
trait (including the `Self` type) after unification between the
overlapping impls. In other words, the error message will provide
feedback with full type details, like:

```
error: conflicting implementations of trait `Foo<u32>` for type `u8`:
```

When the `Self` type for the two impls unify to an inference variable,
it is elided in the output, since "for type `_`" is just noise in that
case.

Closes #23980

r? @nikomatsakis

8 years agoRemove rogue I
Jake Goulding [Wed, 16 Dec 2015 18:25:33 +0000 (13:25 -0500)]
Remove rogue I

8 years agoProvide overlapping types for coherence errors
Aaron Turon [Tue, 1 Dec 2015 19:26:47 +0000 (11:26 -0800)]
Provide overlapping types for coherence errors

Currently, a coherence error based on overlapping impls simply mentions
the trait, and points to the two conflicting impls:

```
error: conflicting implementations for trait `Foo`
```

With this commit, the error will include all input types to the
trait (including the `Self` type) after unification between the
overlapping impls. In other words, the error message will provide
feedback with full type details, like:

```
error: conflicting implementations of trait `Foo<u32>` for type `u8`:
```

When the `Self` type for the two impls unify to an inference variable,
it is elided in the output, since "for type `_`" is just noise in that
case.

Closes #23980

8 years agoRemove incorrect words about libcore's stability
Steve Klabnik [Wed, 16 Dec 2015 16:42:18 +0000 (11:42 -0500)]
Remove incorrect words about libcore's stability

8 years agoAuto merge of #30337 - wesleywiser:mir_switch, r=nikomatsakis
bors [Wed, 16 Dec 2015 16:10:26 +0000 (16:10 +0000)]
Auto merge of #30337 - wesleywiser:mir_switch, r=nikomatsakis

Fixes #29574

8 years agomk: Use the right llvmdeps.rs file for cross build
Alex Crichton [Wed, 16 Dec 2015 16:06:27 +0000 (08:06 -0800)]
mk: Use the right llvmdeps.rs file for cross build

It looks like #27937 accidentally switched the llvmdeps file from the target to
the host by accident, so be sure to use the right llvmdeps file which is built
for the target when building rustc_llvm

8 years agorustc: Remove def::DefUse
Vadim Petrochenkov [Sat, 12 Dec 2015 22:50:07 +0000 (01:50 +0300)]
rustc: Remove def::DefUse

8 years agoAuto merge of #30269 - sanxiyn:no-mangle-generic, r=Aatch
bors [Wed, 16 Dec 2015 14:12:43 +0000 (14:12 +0000)]
Auto merge of #30269 - sanxiyn:no-mangle-generic, r=Aatch

Fix #15844.

Should the default be Deny instead?

8 years agoAuto merge of #30410 - Manishearth:rollup, r=Manishearth
bors [Wed, 16 Dec 2015 12:16:43 +0000 (12:16 +0000)]
Auto merge of #30410 - Manishearth:rollup, r=Manishearth

- Successful merges: #30320, #30368, #30372, #30376, #30388, #30392
- Failed merges: #30354, #30389

8 years agoRollup merge of #30392 - Ms2ger:RestrictionResult, r=alexcrichton
Manish Goregaokar [Wed, 16 Dec 2015 12:16:30 +0000 (17:46 +0530)]
Rollup merge of #30392 - Ms2ger:RestrictionResult, r=alexcrichton

8 years agoRollup merge of #30388 - DanielJCampbell:macro-ident-spans, r=nrc
Manish Goregaokar [Wed, 16 Dec 2015 12:16:29 +0000 (17:46 +0530)]
Rollup merge of #30388 - DanielJCampbell:macro-ident-spans, r=nrc

r? @nrc

8 years agoRollup merge of #30376 - salty-horse:btree_links, r=alexcrichton
Manish Goregaokar [Wed, 16 Dec 2015 12:16:29 +0000 (17:46 +0530)]
Rollup merge of #30376 - salty-horse:btree_links, r=alexcrichton

The BtreeSet main description mentions `BTreeMap`, `Ord`, `Cell`, `RefCell`.

This patch adds links to their documentation.

8 years agoRollup merge of #30372 - sanxiyn:rustdoc-cfg, r=alexcrichton
Manish Goregaokar [Wed, 16 Dec 2015 12:16:29 +0000 (17:46 +0530)]
Rollup merge of #30372 - sanxiyn:rustdoc-cfg, r=alexcrichton

Fix #30252.

8 years agoRollup merge of #30368 - arielb1:region-unification-2, r=nikomatsakis
Manish Goregaokar [Wed, 16 Dec 2015 12:16:29 +0000 (17:46 +0530)]
Rollup merge of #30368 - arielb1:region-unification-2, r=nikomatsakis

Turns out that calling `resolve_type_variables_if_possible` in a O(n^2)
loop is a bad idea. Now we just resolve each copy of the region variable
to its lowest name each time (we resolve the region variable to its lowest
name, rather than to its unify-table name to avoid the risk of
the unify-table name changing infinitely many times. That may be
not a problem in practice, but I am not sure of it).

8 years agoRollup merge of #30320 - nrc:err-names, r=@nikomatsakis
Manish Goregaokar [Wed, 16 Dec 2015 12:16:29 +0000 (17:46 +0530)]
Rollup merge of #30320 - nrc:err-names, r=@nikomatsakis

We can now handle name resolution errors and get past type checking (if we're a bit lucky). This is the first step towards doing code completion for partial programs (we need error recovery in the parser and early access to save-analysis).

8 years agoAuto merge of #30300 - sanxiyn:syntax-ext, r=nikomatsakis
bors [Wed, 16 Dec 2015 10:09:36 +0000 (10:09 +0000)]
Auto merge of #30300 - sanxiyn:syntax-ext, r=nikomatsakis

This reduces iteration time (`make rustc-stage1`) for moved syntax extensions from 11 minutes to 3 minutes on my machine.

Because of the signature change, this is a [breaking-change] for people directly calling `expand_crate`. I think it is rare: from GitHub search, only case I found is [glassful](https://github.com/kmcallister/glassful).

8 years agoAuto merge of #30206 - petrochenkov:newdepr, r=brson
bors [Wed, 16 Dec 2015 08:15:23 +0000 (08:15 +0000)]
Auto merge of #30206 - petrochenkov:newdepr, r=brson

Closes https://github.com/rust-lang/rust/issues/29935

The attributes `deprecated` and `rustc_deprecated` are completely independent in this implementation and it leads to some noticeable code duplication. Representing `deprecated` as
```
Stability {
    level: Stable { since: "" },
    feature: "",
    depr: Some(Deprecation),
}
```
or, contrariwise, splitting rustc_deprecation from stability makes most of the duplication go away.
I can do this refactoring, but before doing it I must be sure, that further divergence of `deprecated` and `rustc_deprecated` is certainly not a goal.

cc @llogiq

8 years agoAuto merge of #30141 - oli-obk:fix/30117, r=arielb1
bors [Wed, 16 Dec 2015 05:40:41 +0000 (05:40 +0000)]
Auto merge of #30141 - oli-obk:fix/30117, r=arielb1

r? @arielb1

8 years agoStop re-exporting RestrictionResult variants.
Ms2ger [Tue, 15 Dec 2015 15:15:59 +0000 (16:15 +0100)]
Stop re-exporting RestrictionResult variants.

8 years agoRegression tests for Issue 29793.
Felix S. Klock II [Thu, 10 Dec 2015 18:30:37 +0000 (19:30 +0100)]
Regression tests for Issue 29793.

8 years agoEnsure borrows of fn/closure params do not outlive invocations.
Felix S. Klock II [Tue, 8 Dec 2015 22:38:36 +0000 (23:38 +0100)]
Ensure borrows of fn/closure params do not outlive invocations.

resolve_lifetime.rs: Switch from BlockScope to FnScope in ScopeChain
construction. Lifetimes introduced by a fn signature are scoped to the
call-site for that fn. (Note `add_scope_and_walk_fn` must only add
FnScope for the walk of body, *not* of the fn signature.)

region.rs: Introduce new CodeExtentData::CallSiteScope variant. Use
CodeExtentData as the cx.parent, rather than just a NodeId.  Change
DestructionScopeData to CallSiteScopeData.

regionck.rs: Thread call_site_scope via Rcx; constrain fn return
values.

(update; incorporated review feedback from niko.)

8 years agoImplement translation for ConstVal::{Array,Repeat}
Simonas Kazlauskas [Sat, 5 Dec 2015 18:35:00 +0000 (20:35 +0200)]
Implement translation for ConstVal::{Array,Repeat}

8 years agoImplement references to functions and constants
Simonas Kazlauskas [Mon, 16 Nov 2015 17:57:57 +0000 (19:57 +0200)]
Implement references to functions and constants

8 years agoConst-eval more constants during MIR building
Simonas Kazlauskas [Mon, 16 Nov 2015 19:45:44 +0000 (21:45 +0200)]
Const-eval more constants during MIR building

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 agoMark libsyntax_ext unstable
Seo Sanghyeon [Tue, 15 Dec 2015 07:23:18 +0000 (16:23 +0900)]
Mark libsyntax_ext unstable

8 years agoFix custom deriving tests
Seo Sanghyeon [Fri, 11 Dec 2015 07:40:25 +0000 (16:40 +0900)]
Fix custom deriving tests

8 years agoFix expansion tests
Seo Sanghyeon [Thu, 10 Dec 2015 18:42:47 +0000 (03:42 +0900)]
Fix expansion tests

8 years agoMove built-in syntax extensions to a separate crate
Seo Sanghyeon [Thu, 10 Dec 2015 14:23:14 +0000 (23:23 +0900)]
Move built-in syntax extensions to a separate crate

8 years agoGenerated code spans now point to callsite parameters (where applicable)
Daniel Campbell [Tue, 15 Dec 2015 04:31:54 +0000 (17:31 +1300)]
Generated code spans now point to callsite parameters (where applicable)

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 agoImplement trans for the MIR Switch terminator
Wesley Wiser [Fri, 11 Dec 2015 18:19:19 +0000 (13:19 -0500)]
Implement trans for the MIR Switch terminator

Fixes #29574

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 agoAdd links in BTreeSet docs
Ori Avtalion [Sun, 13 Dec 2015 22:12:17 +0000 (00:12 +0200)]
Add links in BTreeSet docs

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 agofix copy-paste typo in docs for wrapping_shr
Zach Reizner [Sun, 13 Dec 2015 20:00:00 +0000 (12:00 -0800)]
fix copy-paste typo in docs for wrapping_shr

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 agoSupport `#[deprecated]` in rustdoc
Vadim Petrochenkov [Sat, 12 Dec 2015 20:01:27 +0000 (23:01 +0300)]
Support `#[deprecated]` in rustdoc

8 years agoAddress the review comments
Vadim Petrochenkov [Sat, 12 Dec 2015 18:40:45 +0000 (21:40 +0300)]
Address the review comments

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 agofix dropck performance regression
Ariel Ben-Yehuda [Sat, 12 Dec 2015 17:02:33 +0000 (19:02 +0200)]
fix dropck performance regression

Turns out that calling `resolve_type_variables_if_possible` in a O(n^2)
loop is a bad idea. Now we just resolve each copy of the region variable
to its lowest name each time (we resolve the region variable to its lowest
name, rather than to its unify-table name to avoid the risk of
the unify-table name changing infinitely many times. That may be
not a problem in practice, but I am not sure of it).

8 years agoImplement `#[deprecated]` attribute (RFC 1270)
Vadim Petrochenkov [Fri, 4 Dec 2015 16:34:28 +0000 (19:34 +0300)]
Implement `#[deprecated]` attribute (RFC 1270)

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