Commit Graph

43875 Commits

Author SHA1 Message Date
Tshepang Lekhonkhobe
a8680deb7f README: improve description of Rust 2015-06-18 23:48:51 +02:00
bors
ff8fee180b Auto merge of #26147 - arielb1:assoc-trans, r=nikomatsakis
Fixes #25700

r? @nikomatsakis
2015-06-18 21:34:04 +00:00
Brian Anderson
ab0bb0956d Update RELEASES.md for 1.1 2015-06-18 13:59:30 -07:00
Ariel Ben-Yehuda
2bce9d0ff5 Fix #23589 2015-06-18 23:18:15 +03:00
Ariel Ben-Yehuda
21fd312043 Normalize associated types in closure signatures
Fixes #25700.
2015-06-18 23:04:57 +03:00
bors
9cc0b22475 Auto merge of #26192 - alexcrichton:features-clean, r=aturon
This commit shards the all-encompassing `core`, `std_misc`, `collections`, and `alloc` features into finer-grained components that are much more easily opted into and tracked. This reflects the effort to push forward current unstable APIs to either stabilization or removal. Keeping track of unstable features on a much more fine-grained basis will enable the library subteam to quickly analyze a feature and help prioritize internally about what APIs should be stabilized.

A few assorted APIs were deprecated along the way, but otherwise this change is just changing the feature name associated with each API. Soon we will have a dashboard for keeping track of all the unstable APIs in the standard library, and I'll also start making issues for each unstable API after performing a first-pass for stabilization.
2015-06-18 19:14:52 +00:00
Ariel Ben-Yehuda
56d765d0eb Simplify and type_known_to_meet_builtin_bound and make it more correct when
associated types are involved.
2015-06-18 20:51:43 +03:00
Alex Crichton
ec333380e0 Fix libstd tests 2015-06-18 10:51:31 -07:00
Johannes Oertel
d234b0bb5f rustdoc: Update document title when displaying search results
Fixes #26360.
2015-06-18 18:39:31 +02:00
bors
f451812763 Auto merge of #26385 - nham:fix_25396, r=alexcrichton
Currently in the E0252 message, traits and modules are all called types (as in "a type named `Foo` has already been imported", even when `Foo` was a trait or module). This commit changes that to additionally detect when the import in question is a trait or module and report it accordingly.

Fixes #25396.
2015-06-18 16:17:04 +00:00
Ariel Ben-Yehuda
ea7637ebc0 Prohibit casts between fat pointers to different traits
This makes them compliant with the new version of RFC 401 (i.e.
    RFC 1052).

Fixes #26391. I *hope* the tests I have are enough.

This is a [breaking-change]
2015-06-18 15:51:06 +03:00
bors
7a13b93b00 Auto merge of #26392 - oli-obk:unused_functions, r=dotdash
These aren't used anywhere and to my current knowledge it's unlikely that they are going to be used in the future
2015-06-18 12:06:25 +00:00
Oliver Schneider
59638d15c1 remove unused functions from trans and llvm 2015-06-18 13:23:41 +02:00
bors
1ef14d9411 Auto merge of #26358 - nham:fix_24081, r=alexcrichton
Previously, it said "import `Foo` conflicts with existing submodule" even
when it was a type alias, enum, or trait. The message now says the conflict
is with "type in this module" in the case of the first two, and "trait in
this module" for the last one.

Fixes #24081.
2015-06-18 10:30:46 +00:00
bors
941af7be24 Auto merge of #26389 - Manishearth:rollup, r=Manishearth
- Successful merges: #26314, #26342, #26348, #26349, #26369, #26387
- Failed merges:
2015-06-18 08:54:35 +00:00
Manish Goregaokar
2424800453 Rollup merge of #26387 - frewsxcv:regression-tests-25180, r=eddyb
Closes #25180
2015-06-18 13:38:10 +05:30
Manish Goregaokar
81024d9931 Rollup merge of #26369 - IvanUkhov:collections, r=eddyb 2015-06-18 13:38:10 +05:30
Manish Goregaokar
3afc385ae1 Rollup merge of #26349 - petrochenkov:bitwise, r=steveklabnik
I'm surprised that bitwise operators `&`, `|` and `^` are implemented for `bool` arguments, because inspection of boolean's bits is not something that should be encouraged and because `&&` -> `&` is a common typo, but if they are implemented, then their behavior should be documented.
2015-06-18 13:38:10 +05:30
Manish Goregaokar
b5f2b098d7 Rollup merge of #26348 - eefriedman:unused-interiorsafety, r=luqmana 2015-06-18 13:38:09 +05:30
Manish Goregaokar
39e4d03e35 Rollup merge of #26342 - steveklabnik:quix_reference_fix, r=alexcrichton
https://github.com/rust-lang/rust/pull/26323/files#r32503568
2015-06-18 13:38:09 +05:30
Manish Goregaokar
b780bc513c Rollup merge of #26314 - steveklabnik:gh26312, r=bluss
Fixes #26312
2015-06-18 13:38:09 +05:30
bors
b20728c0de Auto merge of #26364 - frewsxcv:regression-tests-22864, r=bluss
Fixes https://github.com/rust-lang/rust/issues/22864
2015-06-18 07:19:32 +00:00
bors
a19ed8ad15 Auto merge of #26340 - bluss:bench-sigfix, r=alexcrichton
test: Fix a bug in bench result formatting

It would skip the middle part if it was 0, displaying a number a 1000
times too small. The MB/s number next to it gave it away.

Fixed it looks like this:

```
test h ... bench:   1,000,129 ns/iter (+/- 4,730)
```
2015-06-18 04:52:28 +00:00
bors
1d33318018 Auto merge of #26336 - dotdash:raw_ptr_coercions, r=nrc
Unlike coercing from reference to unsafe pointer, coercing between two
unsafe pointers doesn't need an AutoDerefRef, because there is no region
that regionck would need to know about.

In unoptimized libcore, this reduces the number of "auto_deref" allocas
from 174 to 4.
2015-06-18 03:16:40 +00:00
Corey Farwell
c680f08182 Add regression test for #21622
Closes #21622
2015-06-17 19:46:33 -07:00
Corey Farwell
fba9cecab7 Add regression test for #25180
Closes #25180
2015-06-17 19:37:27 -07:00
Nick Hamann
b637f6b1bd Fix the E0252 error message to use better names for things.
Currently in the E0252 message, traits and modules are all called types
(as in "a type named `Foo` has already been imported", even when `Foo` was
a trait or module). This commit changes that to additionally detect when
the import in question is a trait or module and report it accordingly.

Fixes #25396.
2015-06-17 19:41:55 -05:00
Alex Crichton
fcd99aae0a rustc_driver: Frob the global PATH less
Environment variables are global state so this can lead to surprising results if
the driver is called in a multithreaded environment (e.g. doctests). There
shouldn't be any memory corruption that's possible, but a lot of the bots have
been failing because they can't find `cc` or `gcc` in the path during doctests,
and I highly suspect that it is due to the compiler modifying `PATH` in a
multithreaded fashion.

This commit moves the logic for appending to `PATH` to only affect the child
process instead of also affecting the parent, at least for the linking stage.
When loading dynamic libraries the compiler still modifies `PATH` on Windows,
but this may be more difficult to fix than spawning off a new process.
2015-06-17 17:38:03 -07:00
Alex Crichton
2e63604e2a mk: Fix reconfiguring top-level ./configure
In #26252 support was added to have prettier paths printed out on failure by not
passing the full path to the source file to the compiler, but instead just a
small relative path. To preserve this relative path across configurations, the
`SREL` variable was used for reconfiguring, but if `SREL` is empty then it will
attempt to run the command `configure` which is distinct from running
`./configure` (e.g. doesn't run the local script).

This commit modifies the `SREL` value to re-run the configure script by setting
it to `./` in the case where `SREL` is empty.
2015-06-17 17:32:11 -07:00
bors
20d23d8e57 Auto merge of #26347 - nagisa:macro-exp, r=nrc
r? @nrc, because breakage was caused by https://github.com/rust-lang/rust/pull/25318
2015-06-18 00:26:23 +00:00
Brian Anderson
ff207f1c91 Update AUTHORS.txt for 1.1 2015-06-17 16:32:02 -07:00
Brian Anderson
2b78d9aa84 Update .mailmap 2015-06-17 16:32:02 -07:00
Brian Anderson
13bba763f5 Add src/etc/add-authors.sh script for managing the AUTHORS.txt file
This is the kind of dumb task that gets done a different way every
time and is easily automated.
2015-06-17 16:32:01 -07:00
Brian Anderson
bc8d862e59 Resort AUTHORS.txt using unix sort 2015-06-17 16:32:01 -07:00
bors
713d9176ad Auto merge of #26326 - nikomatsakis:optimize-fulfillment-cache-in-tcx, r=pcwalton
When we successfully resolve a trait reference with no type/lifetime parameters, like `i32: Foo` or `Box<u32>: Sized`, this is in fact globally true. This patch adds a simple global to the tcx to cache such cases. The main advantage of this is really about caching things like `Box<Vec<Foo>>: Sized`. It also points to the need to revamp our caching infrastructure -- the current caches make selection cost cheaper, but we still wind up paying a high cost in the confirmation process, and in particular unrolling out dependent obligations. Moreover, we should probably do caching more uniformly and with a key that takes the where-clauses into account. But that's for later.

For me, this shows up as a reasonably nice win (20%) on Servo's script crate (when built in dev mode). This is not as big as my initial measurements suggested, I think because I was building my rustc with more debugging enabled at the time. I've not yet done follow-up profiling and so forth to see where the new hot spots are. Bootstrap times seem to be largely unaffected.

cc @pcwalton 

This is technically a [breaking-change] in that functions with unsatisfiable where-clauses may now yield errors where before they may have been accepted. Even before, these functions could never have been *called* by actual code. In the future, such functions will probably become illegal altogether, but in this commit they are still accepted, so long as they do not rely on the unsatisfiable where-clauses. As before, the functions still cannot be called in any case.
2015-06-17 22:50:17 +00:00
bors
8af39cebc5 Auto merge of #26321 - srwalter:remove-i386-textrel, r=alexcrichton
This prevents a relocation in the text section.  Text relocations are
incompatible with hardened kernels.

https://github.com/rust-lang/rust/issues/5714
2015-06-17 20:04:19 +00:00
Brian Anderson
9b29cbe1ea Remove unused emit_feature_warn function 2015-06-17 11:31:43 -07:00
bors
37cc79f81c Auto merge of #26315 - steveklabnik:gh26287, r=alexcrichton
The font can make this hard to read, and we don't even strictly need
the annotation, so let's just remove it

Fixes #26287
2015-06-17 18:09:10 +00:00
bors
6065bed37b Auto merge of #26062 - eefriedman:cleanup-cached, r=nikomatsakis
Using the wrong landing pad has obvious bad effects, like dropping a value
twice.

Testcase written by Alex Crichton.

Fixes #25089.
2015-06-17 16:14:30 +00:00
Alex Crichton
913c2273eb Add comment about stabilizing CString::from_ptr
This naming needs to consider the raw vs ptr naming of
Box/CStr/CString/slice/etc.
2015-06-17 09:07:17 -07:00
Alex Crichton
c9b40a30c0 std: Stabilize vec_map::Entry::or_insert{,_with}
These functions mirror the other Entry APIs of other maps, and were mistakenly
just not stabilized the first time around.
2015-06-17 09:07:17 -07:00
Alex Crichton
edf933538b std: Hide some internal functions more aggressively
* Add `#[doc(hidden)]`
* Rename away from `Error::description`
2015-06-17 09:07:17 -07:00
Alex Crichton
252ef28593 std: Update stable since for core::char
Also add `#[doc(hidden)]` to a few internal functions.
2015-06-17 09:07:17 -07:00
Alex Crichton
b4a2823cd6 More test fixes and fallout of stability changes 2015-06-17 09:07:17 -07:00
Alex Crichton
aa931e9c6f std: Move free-functions to associated functions
This commit moves the free functions in the `rc`, `arc`, and `boxed` modules to
associated functions on their respective types, following the recent trend
towards this pattern. The previous free functions are all left in-place with
`#[deprecated]` pointers towards the new locations.

This commit also deprecates `arc::get_mut` and `Arc::make_unique` with no
replacement as they are racy in the face of weak pointers.
2015-06-17 09:07:17 -07:00
Alex Crichton
3346fb0442 std: Deprecate the thunk module
This has been replaced with `FnBox`
2015-06-17 09:07:17 -07:00
Alex Crichton
d645f8fc28 std: Deprecate the scoped feature
The `thread::scoped` function will never be stabilized as-is and the API will
likely change significantly if it does, so this function is deprecated for
removal.
2015-06-17 09:07:17 -07:00
Alex Crichton
04f7eba909 std: Deprecate the future feature
This commit deprecates the `sync::Future` type to be developed outside in
crates.io instead.
2015-06-17 09:07:17 -07:00
Alex Crichton
96cce02924 std: Deprecate the exit_status feature
These two functions should be replaceable with the `process::exit` function.
2015-06-17 09:07:17 -07:00
Alex Crichton
0d818b4ee4 std: Deprecate the io::BufStream type
Questions about the utility of this type has caused it to move to crates.io in
the `bufstream` crate, so this type can be deprecated.
2015-06-17 09:07:16 -07:00