Commit Graph

44090 Commits

Author SHA1 Message Date
Eduard Burtescu
dfbc9608ce rustc: replace Repr/UserString impls with Debug/Display ones. 2015-06-19 01:36:20 +03:00
Eduard Burtescu
17e333d31b Move AST Repr impls to Debug impls in libsyntax. 2015-06-19 01:32:46 +03:00
Eduard Burtescu
af7daa0daf rustc: remove some unused UserString and Repr impls. 2015-06-19 01:32:45 +03:00
Eduard Burtescu
b510ea1487 Clean up unused argument/variable warnings. 2015-06-19 01:32:45 +03:00
Eduard Burtescu
a3727559c6 rustc: use the TLS type context in Repr and UserString. 2015-06-19 01:32:44 +03:00
Alex Crichton
57260262e7 rustc_trans: Disable landing pads on MSVC
Currently all these do is cause linker errors as they try to lower to GNU-like
exception handling, none of which exists with MSVC.
2015-06-18 15:24:36 -07:00
Eduard Burtescu
1f70a2e370 rustc: allow "lifting" T<'a> to T<'tcx> if the value is part of ty::ctxt<'tcx>. 2015-06-19 01:18:43 +03:00
Eduard Burtescu
d8952e7932 rustc: store the type context in TLS and allow safe access to it. 2015-06-19 01:18:43 +03:00
Eduard Burtescu
6061707348 rustc: leave only one free top-level function in ppaux, and private. 2015-06-19 01:18:43 +03:00
Eduard Burtescu
96ad4a4863 rustc: use Repr and UserString instead of ppaux::ty_to_string. 2015-06-19 01:18:43 +03:00
Eduard Burtescu
4e0cb86a5c rustc: reduce ppaux's public footprint to 5 functions. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
bc383f6294 rustc: enforce stack discipline on ty::ctxt. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
84b49b2d35 rustc_resolve: don't require redundant arguments to resolve_crate. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
2e997ef2d4 rustc: remove ownership of tcx from trans' context. 2015-06-19 01:18:42 +03:00
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
Tshepang Lekhonkhobe
1cf6a82038 README: make it clear rustc is the compiler 2015-06-17 22:13:37 +02:00