Commit Graph

52041 Commits

Author SHA1 Message Date
bors
b0d31707cc Auto merge of #32643 - Amanieu:arc_compare_exchange, r=alexcrichton
Change Arc to use compare_exchange instead of compare_and_swap

This should slightly improve code generation on architectures with a weak memory model like ARM.
2016-04-01 01:46:06 -07:00
bors
53498eca50 Auto merge of #32635 - gereeter:hashmap-iter-variance, r=alexcrichton
Make HashMap, HashSet, and their iterators properly covariant

See #30642. `Drain` is the only type left invariant.
2016-03-31 23:31:58 -07:00
bors
3b342fae8e Auto merge of #32586 - seanmonstar:speialize-to-string, r=alexcrichton
specialize ToString for str

If there was some conditional compiling we could do, such that this impl only exists in nightly, and is turned off in beta/stable, I think that'd be an improvement here, as we could test specialization out without affecting stable builds.
2016-03-31 21:18:29 -07:00
bors
a2f0cc6b0c Auto merge of #32550 - tbu-:pr_ref_cell_as_unsafe_cell, r=alexcrichton
Remove `unsafe` qualifier from `RefCell::as_unsafe_cell`

This method is no longer unsafe because the field of `UnsafeCell` is no
longer public.
2016-03-31 17:52:25 -07:00
bors
e1195c24bb Auto merge of #32506 - petrochenkov:use, r=Manishearth
syntax: Extra diagnostics for `_` used in an identifier position

Closes https://github.com/rust-lang/rust/issues/32501
2016-03-31 14:08:44 -07:00
Emanuel Czirai
e1d2eda7f3 allow RUST_BACKTRACE=0 to act as if unset
/# This is a combination of 16 commits.
/# The first commit's message is:
allow RUST_BACKTRACE=disabled to act as if unset

When RUST_BACKTRACE is set to "disabled" then this acts as if the env.
var is unset.

/# This is the 2nd commit message:

case insensitive "DiSaBLeD" RUST_BACKTRACE value

previously it expected a lowercase "disabled" to treat the env. var as
unset

/# This is the 3rd commit message:

RUST_BACKTRACE=0 acts as if unset

previously RUST_BACKTRACE=disabled was doing the same thing

/# This is the 4th commit message:

RUST_BACKTRACE=0|n|no|off acts as if unset

previously only RUST_BACKTRACE=0 acted as if RUST_BACKTRACE was unset
Now added more options (case-insensitive): 'n','no' and 'off'
eg. RUST_BACKTRACE=oFF

/# This is the 5th commit message:

DRY on the value of 2

DRY=don't repeat yourself
Because having to remember to keep the two places of '2' in sync is not
ideal, even though this is a simple enough case.

/# This is the 6th commit message:

Revert "DRY on the value of 2"

This reverts commit 95a0479d5cf72a2b2d9d21ec0bed2823ed213fef.

Nevermind this DRY on 2, because we already have a RY on 1,
besides the code is less readable this way...

/# This is the 7th commit message:

attempt to document unsetting RUST_BACKTRACE

/# This is the 8th commit message:

curb allocations when checking for RUST_BACKTRACE

this means we don't check for case-insensitivity anymore

/# This is the 9th commit message:

as decided, RUST_BACKTRACE=0 turns off backtrace

/# This is the 10th commit message:

RUST_TEST_NOCAPTURE=0 acts as if unset

(that is, capture is on)

Any other value acts as if nocapture is enabled (that is, capture is off)

/# This is the 11th commit message:

update other RUST_TEST_NOCAPTURE occurrences

apparently only one place needs updating

/# This is the 12th commit message:

update RUST_BACKTRACE in man page

/# This is the 13th commit message:

handle an occurrence of RUST_BACKTRACE

/# This is the 14th commit message:

ensure consistency with new rules for backtrace

/# This is the 15th commit message:

a more concise comment for RUST_TEST_NOCAPTURE

/# This is the 16th commit message:

update RUST_TEST_NOCAPTURE in man page
2016-03-31 23:02:59 +02:00
Benjamin Herr
33cc0ed1f0 librustc: excise Session's now-unused bug methods 2016-03-31 22:06:52 +02:00
Benjamin Herr
89fcc00581 librustc_const_eval: use bug!(), span_bug!() 2016-03-31 22:06:52 +02:00
Benjamin Herr
c59ea491ea librustc_trans: use bug!(), span_bug!() 2016-03-31 22:06:52 +02:00
Benjamin Herr
35e160364d librustc_typeck: use bug!(), span_bug!() 2016-03-31 22:06:52 +02:00
Benjamin Herr
4bb767965c librustc_save_analysis: remove duplicate macro def 2016-03-31 22:06:52 +02:00
Benjamin Herr
37f8429f3d librustc_save_analysis: use bug!(), span_bug!() 2016-03-31 22:06:52 +02:00
Benjamin Herr
d05f726eed librustc_resolve: use bug!(), span_bug!() 2016-03-31 22:06:52 +02:00
Benjamin Herr
487219ccb1 librustc_privacy: use bug!(), span_bug!() 2016-03-31 22:06:52 +02:00
Benjamin Herr
676f6c3116 librustc_passes: use bug!(), span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
0305537652 librustc_metadata: use bug!(), span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
8aaf6eee2f librustc_mir: use bug!(), span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
cc8159b0ed librustc_lint: use bug!(), span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
065dcd0702 librustc_borrowck: use bug!(), span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
e3a7a66f1a librustc: replace panic!() with bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
2fa867a203 librustc: replace unimplemented!() with bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
dfd0e937ac librustc: replace unreachable! with bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
bcdaccfbbe librustc: replace span_bug calls with span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
859b5a141c librustc: replace tcx.sess.bug calls with bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
fc7ec6b614 librustc: add {span_,}bug! macros
... as single "internal compiler error" entry point.

The macros pass `file!()`, `line!()` and `format_args!(...)` on to a
cold, never-inlined function, ultimately calling `bug()` or `span_bug()`
on the `Handler` from `session::diagnostic()` via the tcx in tls or,
failing that, panicking directly.
2016-03-31 22:04:23 +02:00
Tobias Bucher
0872cc37bc Remove incorrect comment about PartialEq implementation 2016-03-31 21:19:17 +02:00
Tobias Bucher
28e45bb96a Fix a typo in the doc comment of std::os::unix:🧵:JoinHandleExt 2016-03-31 19:28:06 +02:00
bors
3399d19a2c Auto merge of #31938 - jseyfried:autoderef_privacy, r=nikomatsakis
Integrate privacy into field and method selection

This PR integrates privacy checking into field and method selection so that an inaccessible field/method can not stop an accessible field/method from being used (fixes #12808 and fixes #22684).
r? @eddyb
2016-03-31 09:09:34 -07:00
Amanieu d'Antras
78eae9bf23 Only allow using the atomic intrinsics on integer types 2016-03-31 16:03:27 +01:00
Валерий Лашманов
33db2d65ff added missing refcell ref/refmut coercions to unsized 2016-03-31 10:11:59 -04:00
Amanieu d'Antras
9a28d4edc9 Change Arc to use compare_exchange instead of compare_and_swap 2016-03-31 13:15:20 +01:00
Amanieu d'Antras
e72c8fb754 Fix formatting in the documentation for AtomicIsize::compare_exchange_weak 2016-03-31 13:14:25 +01:00
Tobias Bucher
10caca24f0 Improve E0277 error message in a generic context
This now mentions that you can restrict type parameters to be able to
call functions of traits.
2016-03-31 11:15:36 +02:00
David AO Lozano
9094935b46 Using only one Mibbit link for access the two channels 2016-03-31 02:49:15 -06:00
David AO Lozano
c233f2ee29 Adding #rust-beginners to README and pointing the two channels on getting-started 2016-03-31 02:49:05 -06:00
David AO Lozano
90d7440f54 Misspelled beginners in one place 2016-03-31 02:48:50 -06:00
David AO Lozano
823f239ae5 Book: in beginner guide change irc channel #rust → #rust-beginners 2016-03-31 02:47:46 -06:00
Vadim Petrochenkov
1cbdf4e7d3 syntax: Extra diagnostics for _ used in an identifier position 2016-03-31 10:15:36 +03:00
Jeffrey Seyfried
5428e6e273 Remove accidental println! 2016-03-31 06:23:45 +00:00
Jeffrey Seyfried
6f09deaa32 Fix suggestions 2016-03-31 05:12:10 +00:00
bors
4583dc9b13 Auto merge of #32439 - jseyfried:visible_suggestions, r=nrc
diagnostics: make paths to external items more visible

This PR changes the reported path for an external item so that it is visible from at least one local module (i.e. it does not use any inaccessible external modules) if possible. If the external item's crate was declared with an `extern crate`, the path is guarenteed to use the `extern crate`.

Fixes #23224, fixes #23355, fixes #26635, fixes #27165.

r? @nrc
2016-03-30 21:13:43 -07:00
Jonathan S
589108baf6 Test that HashMap, HashSet, and their iterators are properly covariant 2016-03-30 22:02:36 -05:00
Jonathan S
1639f2d289 Fix the variances of HashMap and HashSet iterators 2016-03-30 22:02:36 -05:00
Jonathan S
285a40a906 Make HashMap's RawBucket covariant 2016-03-30 22:01:31 -05:00
Alan Somers
0b0af5847f Register new FreeBSD snapshot
Actual file is at https://people.freebsd.org/~asomers/rust/rust-stage0-2016-03-18-235d774-freebsd-x86_64-390b9a9f60f3d0d6a52c04d939a0355f572d03b3.tar.bz2
2016-03-31 02:47:33 +00:00
James Miller
63321ca193 Turn break critical edges into a MIR pass
Also adds a new set of passes to run just before translation that
"prepare" the MIR for codegen. Removal of landing pads, region erasure
and break critical edges are run in this pass.

Also fixes some merge/rebase errors.
2016-03-31 15:13:24 +13:00
Matt Brubeck
d93fb02a5e Update Rust version in the Rustonomicon Vec chapter
I verified that the final code compiles in Rust 1.9.0-nightly.
2016-03-30 16:59:38 -07:00
Jeffrey Seyfried
3d9db59566 Detect cycles that include renamed imports 2016-03-30 23:50:19 +00:00
bors
30a3849f22 Auto merge of #32628 - Manishearth:rollup, r=Manishearth
Rollup of 4 pull requests

- Successful merges: #32259, #32494, #32612, #32618
- Failed merges: #32562
2016-03-30 16:41:08 -07:00
Manish Goregaokar
458fae709c Rollup merge of #32618 - ProgVal:patch-1, r=steveklabnik
Book: Fix phrasing: “an associated type” → “an object with an associated type”.

From what I understood, `graph` is the object from which we create a trait object, and the associated types are `Graph::N` and `Graph::E`.
2016-03-31 05:04:59 +05:30