Commit Graph

35909 Commits

Author SHA1 Message Date
Adolfo Ochagavía
7fcd2c2691 Fix typo in std::thread comments 2014-12-25 13:38:50 +01:00
Niko Matsakis
4856456dd7 Move mem-categorization more things to use TYPER for the method origin 2014-12-25 07:04:07 -05:00
Niko Matsakis
a583ba2fa0 Remove McResult from the mem-categorization interface. 2014-12-25 07:04:07 -05:00
Niko Matsakis
8f770f10b2 Extend Typer interface to include expr_ty_adjusted so that we can
remove another direct dependency on tcx from euv.
2014-12-25 07:04:07 -05:00
Niko Matsakis
f3ff084d01 Remove the regionck impl of Typer and just use fcx. This requires
modifying fcx to remove type variables where possible, but that's it.
2014-12-25 07:04:07 -05:00
Niko Matsakis
230d0eb003 Use the typer in ExprUseVisitor and do not hard code to tcx 2014-12-25 07:04:07 -05:00
Simon Sapin
c82e59d774 std::ascii: Use u8 methods rather than the maps directly. 2014-12-25 12:19:37 +01:00
Simon Sapin
3a6ccdc263 Remove Ascii, AsciiCast, OwnedAsciiCast, AsciiStr, IntoBytes, IntoString.
As a replacement, add is_ascii() to AsciiExt, and implement AsciiExt for u8 and char.

[breaking-change]
2014-12-25 12:19:37 +01:00
Jonathan Reem
f1e37f9893 trans: Remove is_lang_item from base::invoke
Removes a FIXME on closed issue #15064. This flag is no
longer needed or used since reflection is gone.
2014-12-24 22:52:47 -08:00
bors
ead198c513 auto merge of #20024 : mneumann/rust/dragonfly-fixes3, r=alexcrichton 2014-12-25 05:11:36 +00:00
Alex Crichton
58d808f988 mk: Build jemalloc with -ffunction-sections
It's quite possible that small programs don't use all of jemalloc, and building
with -ffunction-sections and -fdata-sections allows the linker (via
--gc-sections) to strip out all unused code at link time. This decreases the
size of a "hello world" executable for me from 716K to 482K with no measurable
impact on link time. After this patch jemalloc is still the largest portion of
our hello world executables, but this helps cut down on the size at least
somewhat!
2014-12-24 20:20:01 -08:00
Steven Fackler
e8b151b791 Fix backtrace demangling
Closes #20209
2014-12-24 21:41:09 -05:00
Chase Southwood
625697354d Rename remaining hashmap and hashtable iterators to match naming
conventions.

This is a [breaking-change].
2014-12-24 20:19:48 -06:00
bluss
1114685696 hashmap: Fix the example using derived Hash + Eq
The example derived Hash + Eq on a type that was used as *values* for
a hashmap.. for the example to make sense, we have to use a custom *key*
type.

Write a slightly more involved example, still using Vikings, but this
time as key.

I preferred using String over &str here, since that's the typical usage
and we might want to lead users down that path.
2014-12-25 02:17:48 +01:00
bors
65248c5e05 auto merge of #19934 : tomjakubowski/rust/rustdoc-unboxed-closures-redux, r=alexcrichton
We render HRTB and the unboxed closure trait sugar (the so-called 
"parenthesized" notation) where appropriate. Also address the new
`for` syntax on the old closures.
2014-12-25 01:01:42 +00:00
Tshepang Lekhonkhobe
6ca45c3871 doc: surround with symbols, like it should 2014-12-24 23:53:25 +02:00
bors
7e11b22713 auto merge of #20117 : lfairy/rust/rename-include-bin, r=alexcrichton
According to [RFC 344][], methods that return `&[u8]` should have names ending in `bytes`. Though `include_bin!` is a macro not a method, it seems reasonable to follow the convention anyway.

We keep the old name around for now, but trigger a deprecation warning when it is used.

[RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md

[breaking-change]
2014-12-24 20:47:12 +00:00
Tshepang Lekhonkhobe
0eafc3228b doc: remove repeated info 2014-12-24 21:06:27 +02:00
bors
14597f980a auto merge of #19813 : barosl/rust/autoderef-type-inference-ice, r=pnkfelix
`check::autoderef()` returns a `ty_err` when it fails to infer the type. `probe::probe()` should respect this failure and fail together to prevent further corruption.

Fixes #19692.
Fixes #19583.
Fixes #19297.
2014-12-24 18:37:07 +00:00
Simon Sapin
1e5811ef92 Rename to_ascii_{lower,upper} to to_ascii_{lower,upper}case, per #14401
[breaking-change]
2014-12-24 19:33:04 +01:00
Tom Jakubowski
64b5464f30 rustdoc: Use Fn trait sugar for external paths
Fix #19909
2014-12-24 11:18:27 -06:00
Tom Jakubowski
c639cf6ee9 rustdoc: Use unboxed closure sugar
This unfortunately leaves sugaring Fn/FnMut/FnOnce on cross-crate
re-exports for future work.

cc #19909
2014-12-24 11:18:27 -06:00
Tom Jakubowski
37225288be rustdoc: render higher-rank trait bounds
Fix #19915
2014-12-24 11:18:27 -06:00
Tom Jakubowski
b39e99cfc7 rustdoc: render for<> on old closure lifetimes 2014-12-24 10:32:49 -06:00
bors
29ad8539b9 auto merge of #20060 : Aatch/rust/enum-repr, r=alexcrichton
The previous behaviour of using the smallest type possible caused LLVM
to treat padding too conservatively, causing poor codegen. This commit
changes the behaviour to use an alignment-sized integer as the
discriminant. This keeps types the same size, but helps LLVM understand
the data structure a little better, resulting in better codegen.
2014-12-24 16:21:23 +00:00
Andrew Paseltiner
fe9f1beae2 clean up BinaryHeap code 2014-12-24 10:08:33 -05:00
Johannes Hoff
ee72c57bc9 Better temporary directory name 2014-12-24 13:25:28 +01:00
Johannes Hoff
0128159c95 Merge branch 'master' into cfg_tmp_dir
Conflicts:
	src/etc/rustup.sh
2014-12-24 13:22:11 +01:00
Simonas Kazlauskas
ffd0f5a111 Fix a typo 2014-12-24 12:40:42 +02:00
Jared Roesch
177529267d Address code review nits 2014-12-24 00:58:21 -08:00
Kang Seonghoon
556e3da55f core: Removed a shadowed, unused definition of debug_assert!. 2014-12-24 17:45:49 +09:00
bors
e64a8193b0 auto merge of #19858 : nick29581/rust/ranges, r=aturon
Closes #19794

r? @aturon for the first patch
r? @nikomatsakis for the rest
2014-12-24 06:31:13 +00:00
Chase Southwood
6bb59e4e19 Deprecate DList::ListInsertion 2014-12-23 23:39:36 -06:00
Jorge Aparicio
86d8579478 rustdoc: unmarked code fences are doctests too 2014-12-23 22:14:31 -05:00
Brian J Brennan
aa37b6dcbb Update json.rs
Treemap should be BTreeMap
2014-12-23 18:52:09 -05:00
bors
96a3c7c6a0 auto merge of #19758 : tbu-/rust/pr_fp_name, r=alexcrichton
This is a [breaking-change].
2014-12-23 22:21:10 +00:00
Jared Roesch
6948a2df31 Support all variants of WherePredicate
Adds support for all variants of ast::WherePredicate in clean/mod.rs. Fixes #20048, but will need modification when EqualityPredicates are fully implemented in #20041.
2014-12-23 13:58:49 -08:00
Nick Cameron
e82215d4e2 Review changes 2014-12-24 09:24:59 +13:00
Nick Cameron
e840e49b21 Tests 2014-12-24 09:12:46 +13:00
Nick Cameron
17826e10a2 Type checking and trans for ranges 2014-12-24 09:12:45 +13:00
Nick Cameron
8a357e1d87 Add syntax for ranges 2014-12-24 09:12:45 +13:00
Nick Cameron
53c5fcb99f Add lang items for ranges. 2014-12-24 09:12:45 +13:00
Nick Cameron
21ea66f47a Add structs for ranges to core::ops. 2014-12-24 09:12:45 +13:00
bors
d10642ef0f auto merge of #20083 : eddyb/rust/fix-expectation, r=nikomatsakis
This fixes a few corner cases with expected type propagation, e.g.:
```rust
fn take_int_slice(_: &[int]) {}
take_int_slice(&if 1 < 0 { [ 0, 1 ] } else { [ 0, 1 ] });
```
```rust
<anon>:2:28: 2:36 error: mismatched types: expected `[int]`, found `[int, ..2]`
<anon>:2 take_int_slice(&if 1 < 0 { [ 0, 1 ] } else { [ 0, 1 ] });
                                    ^~~~~~~~
<anon>:2:46: 2:54 error: mismatched types: expected `[int]`, found `[int, ..2]`
<anon>:2 take_int_slice(&if 1 < 0 { [ 0, 1 ] } else { [ 0, 1 ] });
                                                      ^~~~~~~~
```
Right now we unpack the expected `&[int]` and pass down `[int]`, forcing
rvalue expressions to take unsized types, which causes mismatch errors.
Instead, I replaced that expectation with a weaker hint, for the unsized
cases - a hint is still required to infer the integer literals' types, above.

Fixes #20169.
2014-12-23 18:01:22 +00:00
Tobias Bucher
16f01cc13f Rename and namespace FPCategory
Rename `FPCategory` to `FpCategory` and `Fp* to `*` in order to adhere to the
naming convention

This is a [breaking-change].

Existing code like this:
```
use std::num::{FPCategory, FPNaN};
```
should be adjusted to this:
```
use std::num::FpCategory as Fp
```

In the following code you can use the constants `Fp::Nan`, `Fp::Normal`, etc.
2014-12-23 13:42:09 +01:00
Eduard Burtescu
adabf4e63d rustc_typeck: don't expect rvalues to have unsized types. 2014-12-23 13:30:36 +02:00
Michael Woerister
875a30c492 debuginfo: Add test case for destructured for-loop variable. 2014-12-23 11:07:32 +01:00
Michael Woerister
07f10310c0 debuginfo: Clean the debuginfo module up a bit. 2014-12-23 10:45:29 +01:00
Michael Woerister
6f88258f1d debuginfo: Create debuginfo for for-loop variables again. 2014-12-23 10:45:16 +01:00
bors
658529467d Merge pull request #20155 from tbu-/pr_vecmap_fiximpls
Fix `collections::VecMap`'s `PartialEq` implementation

Reviewed-by: Gankro
2014-12-23 09:31:26 +00:00