Commit graph

48942 commits

Author SHA1 Message Date
Alex Burka 4c0c4e5546 add failing run-pass test for #30371 2015-12-14 17:51:52 -05:00
Ori Avtalion 37b8e22c68 Add links in BTreeSet docs 2015-12-14 23:15:21 +02:00
faineance ec8ea22c7f [breaking-change] move ast_util functions to methods 2015-12-14 21:15:01 +00:00
bors 44d9601ad3 Auto merge of #30328 - sanxiyn:include-type-name, r=alexcrichton
Fix #30260.
2015-12-14 21:08:13 +00:00
bors f150c178ea 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).
2015-12-14 19:14:37 +00:00
bors 9ea4b4f01f Auto merge of #30321 - sanxiyn:E0170, r=alexcrichton
Fix #30302.
2015-12-14 16:45:02 +00:00
bors 50a02b43ba 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.
2015-12-14 13:48:41 +00:00
bors 6b3a3f2702 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.
2015-12-14 01:33:58 +00:00
bors 110df043bf Auto merge of #30351 - tamird:remove-range-inclusive, r=alexcrichton
r? @alexcrichton
2015-12-13 23:40:12 +00:00
Richard Diamond 7bd69f2248 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).
2015-12-13 15:05:43 -06:00
Zach Reizner dc7c3cd5c7 fix copy-paste typo in docs for wrapping_shr 2015-12-13 12:00:00 -08:00
jethrogb 6e46a0fb95 Make BinaryHeap Dijkstra example return Option 2015-12-13 11:40:27 -08:00
bors 2841cc0381 Auto merge of #30348 - shepmaster:box-any-docs, r=steveklabnik 2015-12-13 18:59:08 +00:00
bors 69adc883aa Auto merge of #30343 - Seeker14491:patch-1, r=bluss
The `MIN` link was broken. Reverts #29624.
2015-12-13 17:11:36 +00:00
bors d5cdf0687e 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.
2015-12-13 15:22:03 +00:00
bors 33378f09fd Auto merge of #30339 - Manishearth:oops-i-did-it-again, r=eddyb
r? @eddyb
2015-12-13 13:34:46 +00:00
bors 5a1045699d Auto merge of #30332 - bluss:nomicon-variance, r=gankro
Update nomicon for variance typo & contravariance

Fixes #28704
Fixes #28100
2015-12-13 11:44:39 +00:00
bors 5de242f1b2 Auto merge of #30329 - salty-horse:punctuation, r=steveklabnik
Missing period at the end of a sentence.
2015-12-13 09:57:35 +00:00
bors d382fcdb82 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.
2015-12-13 07:56:03 +00:00
Tamir Duberstein d477708736 Remove duplicate test case
`match-arm-statics` covers this, but needs to be compiled with
debuginfo. However, that still produces an ICE. See #29696.
2015-12-13 01:02:23 -05:00
Tamir Duberstein b964b1d043 remove deprecated APIs missed in #30182 2015-12-13 01:02:12 -05:00
Tamir Duberstein 722905fda0 restore tests accidentally removed in #30182 2015-12-13 01:02:12 -05:00
bors c4c191afae 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.
2015-12-13 05:18:19 +00:00
bors 35b6461b6e 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?
2015-12-13 01:53:06 +00:00
bors 1ddaf8bdf4 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.
2015-12-12 23:50:03 +00:00
bors 8babb7db7e Auto merge of #30334 - dhuseby:FreeBSD_30333, r=alexcrichton
Removed the offending flag from the makefile.
2015-12-12 20:55:44 +00:00
Vadim Petrochenkov 67a978411a Support #[deprecated] in rustdoc 2015-12-12 23:01:27 +03:00
Vadim Petrochenkov 105bd15207 Address the review comments 2015-12-12 21:40:45 +03:00
bors 83eda08037 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.
2015-12-12 18:02:43 +00:00
Ariel Ben-Yehuda 08bffdd5c0 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).
2015-12-12 19:02:33 +02:00
Alex Crichton 9bff8b090a configure: Enable -C rpath by default
This commit changes our distribution and in-tree sources to pass the `-C rpath`
flag by default during compiles. This means that from-source builds, including
our release channels, will have this option enabled as well. Motivated
by #29941, this change means that the compiler should be usable as-is on all
platforms just after extraction or installation. This experience is already true
on Windows but on Unixes you still need to set up LD_LIBRARY_PATH or the
equivalent, which can often be unfortunate.

This option was originally turned off by default for Linux distributions who
tend to take care of these sorts of details themselves, so it is expected that
all those builds of Rust will want to pass `--disable-rpath` to the configure
script to preserve that behavior.

Closes #29941
2015-12-12 09:01:52 -08:00
Vadim Petrochenkov e3ed7b0501 Implement #[deprecated] attribute (RFC 1270) 2015-12-12 19:39:37 +03:00
bors 45a73c8c0c Auto merge of #30110 - oli-obk:pretty_const_trans, r=pnkfelix
turned some `match`es into `if let`s.
2015-12-12 14:35:43 +00:00
bors f0ed9f9169 Auto merge of #30312 - seanmonstar:ioerror-description, r=alexcrichton
cc @pnkfelix @alexcrichton
2015-12-12 12:47:03 +00:00
bors e583ab6281 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
2015-12-12 11:01:12 +00:00
bors 5e82941281 Auto merge of #27929 - w00ns:issue-27889-same-field-names, r=pnkfelix
Fix for issue #27889: same field names in enum variants
2015-12-12 09:03:39 +00:00
bors da31c148ae 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
2015-12-12 06:18:44 +00:00
Ulrik Sverdrup 2a30f0ea41 nomicon: Mention contravariance 2015-12-12 06:14:06 +01:00
Jake Goulding b8366b171a Correct reference to Box<Any> in Any docs 2015-12-11 18:44:11 -05:00
Robin Kruppe c4230ea50c dec2flt: Remove unused macro argument
The argument was a remnant of an earlier, needlessly complicated implementation.
2015-12-12 00:10:15 +01:00
Robin Kruppe 2863a8ba7a 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.
2015-12-12 00:07:42 +01:00
Robin Kruppe 6d87929bcb Remove an accent in a comment 2015-12-12 00:06:05 +01:00
Jeffrey Seyfried de0de61dd4 Partially undo the fix of issue #30159 in PR #30294 to avoid breakage. 2015-12-11 21:21:13 +00:00
Brian Bowman 73615f7f8a Fix MIN, MAX links
The `MIN` link was broken. Reverts #29624.
2015-12-11 15:00:54 -06:00
Ori Avtalion d01ec6ccca Add missing links to str docs 2015-12-11 22:52:28 +02:00
Manish Goregaokar 8bfdd993d0 Remove leftover debugging code (fixes #30336) 2015-12-11 15:12:50 -05:00
Dave Huseby 0c491e86f0 Fixes #30333 by removing the -arch i386 form the right spot 2015-12-11 10:53:04 -08:00
Ulrik Sverdrup a0101624ad nomicon: Fix variance in example
&'b mut B was described incorrectly (just in this example, is correct in
the actual text).
2015-12-11 18:24:10 +01:00
Ori Avtalion bb3360adde book: Add missing punctuation 2015-12-11 18:18:13 +02:00
Seo Sanghyeon 87405751ae Include type name in symbol for methods 2015-12-12 00:01:08 +09:00