]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #30175 - alexcrichton:less-c-code, r=brson
bors [Tue, 22 Dec 2015 07:23:16 +0000 (07:23 +0000)]
Auto merge of #30175 - alexcrichton:less-c-code, r=brson

All these definitions can now be written in Rust, so do so!

8 years agostd: Remove rust_builtin C support library
Alex Crichton [Wed, 2 Dec 2015 18:31:29 +0000 (10:31 -0800)]
std: Remove rust_builtin C support library

All these definitions can now be written in Rust, so do so!

8 years agoAuto merge of #30516 - retep998:non-universal-crt, r=alexcrichton
bors [Tue, 22 Dec 2015 02:07:30 +0000 (02:07 +0000)]
Auto merge of #30516 - retep998:non-universal-crt, r=alexcrichton

Checks for a `10.` prefix on the subfolder because that is what vcvars does.

r? @alexcrichton

8 years agoFix Universal CRT detection on weird setups
Peter Atashian [Tue, 22 Dec 2015 01:44:48 +0000 (20:44 -0500)]
Fix Universal CRT detection on weird setups
Checks for a `10.` prefix on the subfolder

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoAuto merge of #30434 - alexcrichton:update-jemalloc, r=alexcrichton
bors [Mon, 21 Dec 2015 23:31:06 +0000 (23:31 +0000)]
Auto merge of #30434 - alexcrichton:update-jemalloc, r=alexcrichton

It's been awhile since we last updated jemalloc, and there's likely some bugs
that have been fixed since the last version we're using, so let's try to update
again.

8 years agoAuto merge of #30352 - alexcrichton:new-snashots, r=nikomatsakis
bors [Mon, 21 Dec 2015 21:37:26 +0000 (21:37 +0000)]
Auto merge of #30352 - alexcrichton:new-snashots, r=nikomatsakis

Lots of cruft to remove!

8 years agostd: Update jemalloc version
Alex Crichton [Thu, 17 Dec 2015 07:06:00 +0000 (23:06 -0800)]
std: Update jemalloc version

It's been awhile since we last updated jemalloc, and there's likely some bugs
that have been fixed since the last version we're using, so let's try to update
again.

8 years agoAuto merge of #30460 - Ms2ger:BindingMode, r=alexcrichton
bors [Mon, 21 Dec 2015 19:10:51 +0000 (19:10 +0000)]
Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichton

8 years agoRegister new snapshots
Alex Crichton [Fri, 11 Dec 2015 21:07:11 +0000 (13:07 -0800)]
Register new snapshots

Lots of cruft to remove!

8 years agoAuto merge of #30512 - semarie:openbsd-libc, r=alexcrichton
bors [Mon, 21 Dec 2015 15:52:41 +0000 (15:52 +0000)]
Auto merge of #30512 - semarie:openbsd-libc, r=alexcrichton

- upgrades libc to version with `si_addr` support in openbsd
- declares libc use for getentropy
- remove now unused use

r? @alexcrichton

8 years agounbreak openbsd code
Sébastien Marie [Mon, 21 Dec 2015 09:12:48 +0000 (10:12 +0100)]
unbreak openbsd code

- upgrades libc to version with si_addr support in openbsd
- declares libc use for getentropy

8 years agoAuto merge of #30413 - pnkfelix:fsk-span_note, r=Manishearth
bors [Mon, 21 Dec 2015 07:49:05 +0000 (07:49 +0000)]
Auto merge of #30413 - pnkfelix:fsk-span_note, r=Manishearth

Add note when item accessed from module via `m.i` rather than `m::i`.

(I tried to make this somewhat future-proofed, in that the `UnresolvedNameContext` could be expanded in the future with other cases besides paths that are known to be modules.)

This supersedes PR #30356 ; since I'm responsible for a bunch of new code here, someone else should review it. :)

8 years agoAuto merge of #30400 - fbergr:master, r=steveklabnik
bors [Mon, 21 Dec 2015 06:02:13 +0000 (06:02 +0000)]
Auto merge of #30400 - fbergr:master, r=steveklabnik

See: https://github.com/rust-lang/rust/issues/30397

r? @steveklabnik

8 years agoAuto merge of #30493 - semarie:openbsd-cc, r=alexcrichton
bors [Mon, 21 Dec 2015 04:15:28 +0000 (04:15 +0000)]
Auto merge of #30493 - semarie:openbsd-cc, r=alexcrichton

this PR reverts previous ones, that tried to make `cc` to found `estdc++` in `/usr/local/lib`. It causes more trouble than it resolvs things: rustc become unbuildable if another version already exists in `/usr/local` (for example, `libstd-xxxx.so` is found in `/usr/local/lib` and in builddir).

so this PR tries another way to achieve build, but using the good linker for building. By default, rustc use `cc` for linking. But under OpenBSD, `cc` is gcc 4.2.1 from base, whereas we build with gcc 4.9 from ports. By linking using the compiler found at compile-time, we ensure that the compiler will found his own stdc++ library without trouble.

r? @alexcrichton

8 years agoAuto merge of #30486 - nagisa:mir-fix-geps, r=luqmana
bors [Mon, 21 Dec 2015 02:26:10 +0000 (02:26 +0000)]
Auto merge of #30486 - nagisa:mir-fix-geps, r=luqmana

Fixes https://github.com/rust-lang/rust/issues/30474

8 years agoAuto merge of #30482 - luqmana:const-fat-ptr, r=dotdash
bors [Mon, 21 Dec 2015 00:39:24 +0000 (00:39 +0000)]
Auto merge of #30482 - luqmana:const-fat-ptr, r=dotdash

Fixes #30479.

8 years agoAuto merge of #30470 - petrochenkov:owned5, r=nrc
bors [Sun, 20 Dec 2015 22:50:34 +0000 (22:50 +0000)]
Auto merge of #30470 - petrochenkov:owned5, r=nrc

cc https://github.com/rust-lang/rust/pull/30095

r? @nrc

8 years agoStop re-exporting the ast::BindingMode variants.
Ms2ger [Fri, 18 Dec 2015 13:23:01 +0000 (14:23 +0100)]
Stop re-exporting the ast::BindingMode variants.

8 years agoAuto merge of #30469 - nagisa:mir-gv-prettify, r=luqmana
bors [Sun, 20 Dec 2015 21:03:48 +0000 (21:03 +0000)]
Auto merge of #30469 - nagisa:mir-gv-prettify, r=luqmana

One will look at graphviz often when working with MIR, so may as well make the tables a bit more
pretty :)

![This is what it looks like now](https://cloud.githubusercontent.com/assets/679122/11908983/438f228e-a5ea-11e5-90bd-a2c2ec52412e.png)

8 years agoAuto merge of #30468 - Eljay:fix-doc-link, r=alexcrichton
bors [Sun, 20 Dec 2015 16:34:09 +0000 (16:34 +0000)]
Auto merge of #30468 - Eljay:fix-doc-link, r=alexcrichton

8 years agoAuto merge of #30454 - mmcco:size_t, r=alexcrichton
bors [Sun, 20 Dec 2015 07:19:07 +0000 (07:19 +0000)]
Auto merge of #30454 - mmcco:size_t, r=alexcrichton

It returns sizeof(dirent_t), so I'm not sure why its return type is int.
It's only used once, and that usage immediately casts it to usize.

8 years agoopenbsd: use specific linker for building
Sébastien Marie [Sat, 19 Dec 2015 17:00:23 +0000 (18:00 +0100)]
openbsd: use specific linker for building

By default, rustc use `cc` as linker. Under OpenBSD, `cc` is gcc version 4.2.1.
So use the compiler found at configure-time for linking: it will be gcc 4.9.

It permits to resolv problem of finding -lestdc++ or -lgcc. For base gcc (4.2), there are in not standard path, whereas for ports gcc (4.9) there are in standard path.

8 years agoremove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGS
Sébastien Marie [Sat, 19 Dec 2015 10:42:10 +0000 (11:42 +0100)]
remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGS

it isn't the good way to process, as it makes conflicts when building rustc while another version of rustc in installed system-wide.

8 years agoAuto merge of #30455 - mmcco:beautify-isaac, r=alexcrichton
bors [Sun, 20 Dec 2015 05:28:26 +0000 (05:28 +0000)]
Auto merge of #30455 - mmcco:beautify-isaac, r=alexcrichton

Call me verbose, but the existing logic was hideously formatted. The
result still fits in a small terminal. No functional change.

8 years agoAuto merge of #30436 - durka:patch-14, r=alexcrichton
bors [Sun, 20 Dec 2015 02:15:06 +0000 (02:15 +0000)]
Auto merge of #30436 - durka:patch-14, r=alexcrichton

Relevant to #30422.

8 years agoAuto merge of #30430 - mmcco:master, r=alexcrichton
bors [Sat, 19 Dec 2015 23:21:12 +0000 (23:21 +0000)]
Auto merge of #30430 - mmcco:master, r=alexcrichton

Rust already supports Linux's getrandom(2), which is very similar and
was based on getentropy(2). This is a pretty clean, simple addition that
uses the same approach as the iOS randomness API support.

8 years agoAuto merge of #30401 - DiamondLovesYou:pnacl-target, r=alexcrichton
bors [Sat, 19 Dec 2015 21:29:04 +0000 (21:29 +0000)]
Auto merge of #30401 - DiamondLovesYou:pnacl-target, r=alexcrichton

r? @alexcrichton

8 years agoAuto merge of #30394 - geofft:dt-runpath, r=alexcrichton
bors [Sat, 19 Dec 2015 19:39:25 +0000 (19:39 +0000)]
Auto merge of #30394 - geofft:dt-runpath, r=alexcrichton

This causes the linker to emit DT_RUNPATH instead of DT_RPATH, which fixes #30378. See that bug for rationale.

8 years agoFix GEPs for MIR indexing translation
Simonas Kazlauskas [Sat, 19 Dec 2015 18:28:12 +0000 (20:28 +0200)]
Fix GEPs for MIR indexing translation

Fixes #30474

8 years ago[MIR] Handle FatPtr in mir::constant::trans_constval.
Luqman Aden [Sat, 19 Dec 2015 14:32:08 +0000 (09:32 -0500)]
[MIR] Handle FatPtr in mir::constant::trans_constval.

8 years agoAuto merge of #30435 - Ms2ger:ParseResult, r=alexcrichton
bors [Sat, 19 Dec 2015 14:07:08 +0000 (14:07 +0000)]
Auto merge of #30435 - Ms2ger:ParseResult, r=alexcrichton

8 years agoAuto merge of #30408 - durka:issue-26873, r=alexcrichton
bors [Sat, 19 Dec 2015 08:08:53 +0000 (08:08 +0000)]
Auto merge of #30408 - durka:issue-26873, r=alexcrichton

I think we can close #26873 with these tests.

8 years agoAdd PNaCl target info to the makefile target cfgs and initialize the PNaCl target
Richard Diamond [Tue, 15 Dec 2015 21:34:06 +0000 (15:34 -0600)]
Add PNaCl target info to the makefile target cfgs and initialize the PNaCl target
machine if available.

8 years agoAuto merge of #30403 - webmobster:master, r=alexcrichton
bors [Sat, 19 Dec 2015 06:21:10 +0000 (06:21 +0000)]
Auto merge of #30403 - webmobster:master, r=alexcrichton

I didn't see any reason that debug couldn't be added to this object, since every field derives debug.

8 years agoUse libc's syscall() and NR_GETENTROPY const
Michael McConville [Sat, 19 Dec 2015 03:40:07 +0000 (22:40 -0500)]
Use libc's syscall() and NR_GETENTROPY const

8 years agoPull newer version of libc for NR_GETENTROPY
Michael McConville [Sat, 19 Dec 2015 03:37:54 +0000 (22:37 -0500)]
Pull newer version of libc for NR_GETENTROPY

8 years agoMerge branch 'master' of https://github.com/rust-lang/rust
Michael McConville [Sat, 19 Dec 2015 03:37:00 +0000 (22:37 -0500)]
Merge branch 'master' of https://github.com/rust-lang/rust

8 years agoAuto merge of #30184 - petrochenkov:ascr, r=nikomatsakis
bors [Sat, 19 Dec 2015 02:45:15 +0000 (02:45 +0000)]
Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakis

This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below.

This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided.
So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all.
In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone.

Part of https://github.com/rust-lang/rust/issues/23416

8 years agoImprove OwnedSlice and use it in HIR
Vadim Petrochenkov [Sat, 19 Dec 2015 01:20:11 +0000 (04:20 +0300)]
Improve OwnedSlice and use it in HIR

8 years agoAuto merge of #30381 - fhahn:memchr-in-std, r=alexcrichton
bors [Sat, 19 Dec 2015 00:57:25 +0000 (00:57 +0000)]
Auto merge of #30381 - fhahn:memchr-in-std, r=alexcrichton

This PR adds `memchr`and `memrchr` based on @BurntSushi 's rust-memchr crate to libstd (as discussed in #30151).

I've update some places in libstd to use memchr/memrchr, but I am not sure if there are other places where it could be used as well.

ref #30076

8 years agoFix build by removing needless type prefix
Michael McConville [Thu, 17 Dec 2015 07:13:48 +0000 (02:13 -0500)]
Fix build by removing needless type prefix

8 years agoSimplify logic checking getentropy's return value
Michael McConville [Thu, 17 Dec 2015 05:52:18 +0000 (00:52 -0500)]
Simplify logic checking getentropy's return value

8 years agoUse a const for getentropy(2)'s syscall number
Michael McConville [Thu, 17 Dec 2015 05:21:11 +0000 (00:21 -0500)]
Use a const for getentropy(2)'s syscall number

Reported by Sebastien Marie.

8 years agoUse the correct syscall name in panic message
Michael McConville [Thu, 17 Dec 2015 05:17:31 +0000 (00:17 -0500)]
Use the correct syscall name in panic message

I copied it from the getrandom code but forgot to change the name.
Reported by Sebastien Marie.

8 years agoUse the getentropy(2) syscall on OpenBSD
Michael McConville [Thu, 17 Dec 2015 02:54:16 +0000 (21:54 -0500)]
Use the getentropy(2) syscall on OpenBSD

Rust already supports Linux's getrandom(2), which is very similar and
was based on getentropy(2). This is a pretty clean, simple addition that
uses the same approach as the iOS randomness API support.

8 years agoPrettify MIR graphviz output
Simonas Kazlauskas [Fri, 18 Dec 2015 22:45:39 +0000 (00:45 +0200)]
Prettify MIR graphviz output

One will look at graphviz often when working with MIR, so may as well make the tables a bit more
pretty :)

8 years agoAuto merge of #30364 - luqmana:mir-calls, r=nikomatsakis
bors [Fri, 18 Dec 2015 23:06:24 +0000 (23:06 +0000)]
Auto merge of #30364 - luqmana:mir-calls, r=nikomatsakis

8 years ago[MIR] Initial implementation for translating calls.
Luqman Aden [Sun, 13 Dec 2015 13:48:43 +0000 (05:48 -0800)]
[MIR] Initial implementation for translating calls.

8 years agoFix broken link in E0070 description.
Lee Jeffery [Fri, 18 Dec 2015 21:47:16 +0000 (21:47 +0000)]
Fix broken link in E0070 description.

8 years agoUse memrchr bindings provided by libc
Florian Hahn [Thu, 17 Dec 2015 23:36:38 +0000 (00:36 +0100)]
Use memrchr bindings provided by libc

8 years agoAuto merge of #30389 - nikomatsakis:rfc1214-error, r=arielb1
bors [Fri, 18 Dec 2015 20:44:33 +0000 (20:44 +0000)]
Auto merge of #30389 - nikomatsakis:rfc1214-error, r=arielb1

Make RFC 1214 warnings into errors, and rip out the "warn or err"
associated machinery. Future such attempts should go through lints
anyhow.

There is a fair amount of fallout in the compile-fail tests, as WF
checking now occurs earlier in the process.

r? @arielb1

8 years agoAuto merge of #29973 - petrochenkov:privinpub, r=nikomatsakis
bors [Fri, 18 Dec 2015 18:54:52 +0000 (18:54 +0000)]
Auto merge of #29973 - petrochenkov:privinpub, r=nikomatsakis

Some notes:
This patch enforces the rules from [RFC 136](https://github.com/rust-lang/rfcs/blob/master/text/0136-no-privates-in-public.md) and makes "private in public" a module-level concept and not crate-level. Only `pub` annotations are used by the new algorithm, crate-level exported node set produced by `EmbargoVisitor` is not used. The error messages are tweaked accordingly and don't use the word "exported" to avoid confusing people (https://github.com/rust-lang/rust/issues/29668).

The old algorithm tried to be extra smart with impls, but it mostly led to unpredictable behavior and bugs like https://github.com/rust-lang/rust/issues/28325.
The new algorithm tries to be as simple as possible - an impl is considered public iff its type is public and its trait is public (if presents).
A type or trait is considered public if all its components are public, [complications](https://internals.rust-lang.org/t/limits-of-type-inference-smartness/2919) with private types leaking to other crates/modules through trait impls and type inference are deliberately ignored so far.

The new algorithm is not recursive and uses the nice new facility `Crate::visit_all_items`!

Obsolete pre-1.0 feature `visible_private_types` is removed.

This is a [breaking-change].
The two main vectors of breakage are type aliases (https://github.com/rust-lang/rust/issues/28450) and impls (https://github.com/rust-lang/rust/issues/28325).
I need some statistics from a crater run (cc @alexcrichton) to decide on the breakage mitigation strategy.
UPDATE: All the new errors are reported as warnings controlled by a lint `private_in_public` and lint group `future_incompatible`, but the intent is to make them hard errors eventually.

Closes https://github.com/rust-lang/rust/issues/28325
Closes https://github.com/rust-lang/rust/issues/28450
Closes https://github.com/rust-lang/rust/issues/29524
Closes https://github.com/rust-lang/rust/issues/29627
Closes https://github.com/rust-lang/rust/issues/29668
Closes https://github.com/rust-lang/rust/issues/30055

r? @nikomatsakis

8 years agoDo not substitute type aliases during error reporting
Vadim Petrochenkov [Fri, 18 Dec 2015 17:57:36 +0000 (20:57 +0300)]
Do not substitute type aliases during error reporting
Type aliases are still substituted when determining impl publicity

8 years agoMake RFC 1214 warnings into errors, and rip out the "warn or err"
Niko Matsakis [Tue, 15 Dec 2015 09:31:58 +0000 (04:31 -0500)]
Make RFC 1214 warnings into errors, and rip out the "warn or err"
associated machinery. Future such attempts should go through lints
anyhow.

There is a fair amount of fallout in the compile-fail tests, as WF
checking now occurs earlier in the process.

8 years agoadd tests for #26873
Alex Burka [Wed, 16 Dec 2015 02:35:11 +0000 (21:35 -0500)]
add tests for #26873

8 years agoAuto merge of #30374 - durka:issue-30371, r=alexcrichton
bors [Fri, 18 Dec 2015 17:06:19 +0000 (17:06 +0000)]
Auto merge of #30374 - durka:issue-30371, r=alexcrichton

Fixes #30371.

8 years agoRequire exact type equality + add tests
Vadim Petrochenkov [Fri, 18 Dec 2015 17:00:19 +0000 (20:00 +0300)]
Require exact type equality + add tests

+ Rebase fixes

8 years agoAdded doc comments for new UnresolvedNameContext enum.
Felix S. Klock II [Fri, 18 Dec 2015 16:42:46 +0000 (17:42 +0100)]
Added doc comments for new UnresolvedNameContext enum.

8 years agoAuto merge of #30457 - Manishearth:rollup, r=Manishearth
bors [Fri, 18 Dec 2015 15:17:29 +0000 (15:17 +0000)]
Auto merge of #30457 - Manishearth:rollup, r=Manishearth

- Successful merges: #30272, #30286, #30365, #30381, #30384, #30398, #30406, #30408, #30420, #30431, #30447, #30452
- Failed merges:

8 years agoRollup merge of #30452 - dotdash:24876_take_2, r=alexcrichton
Manish Goregaokar [Fri, 18 Dec 2015 08:13:46 +0000 (13:43 +0530)]
Rollup merge of #30452 - dotdash:24876_take_2, r=alexcrichton

LLVM doesn't really support reusing the same module to emit more than
one file. One bug this causes is that the IR is invalidated by the stack
coloring pass when emitting the first file, and then the IR verifier
complains by the time we try to emit the second file. Also, we get
different binaries with --emit=asm,link than with just --emit=link. In
some cases leading to segfaults.

Unfortunately, it seems that at this point in time, the most sensible
option to circumvent this problem is to just clone the whole llvm module
for the asm output if we need both, asm and obj file output.

Fixes #24876
Fixes #26235

8 years agoRollup merge of #30447 - Xmasreturns:Docu, r=steveklabnik
Manish Goregaokar [Fri, 18 Dec 2015 08:13:46 +0000 (13:43 +0530)]
Rollup merge of #30447 - Xmasreturns:Docu, r=steveklabnik

Added sentences for description of code and changed x in the example to an int

8 years agoRollup merge of #30431 - mmcco:cleanup, r=alexcrichton
Manish Goregaokar [Fri, 18 Dec 2015 08:13:46 +0000 (13:43 +0530)]
Rollup merge of #30431 - mmcco:cleanup, r=alexcrichton

Remove a needless variable and simply a cfg().

8 years agoRollup merge of #30420 - petrochenkov:owned2, r=nrc
Manish Goregaokar [Fri, 18 Dec 2015 08:13:46 +0000 (13:43 +0530)]
Rollup merge of #30420 - petrochenkov:owned2, r=nrc

Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults.

r? @nrc

8 years agoUpdate liblibc to current master
Florian Hahn [Thu, 17 Dec 2015 23:16:25 +0000 (00:16 +0100)]
Update liblibc to current master

8 years agoUse memchr in libstd where possible, closes #30076
Florian Hahn [Mon, 14 Dec 2015 23:03:42 +0000 (00:03 +0100)]
Use memchr in libstd where possible, closes #30076

8 years agoAdd memchr implemenation based on rust-memchr to libstd
Florian Hahn [Sat, 12 Dec 2015 22:38:03 +0000 (23:38 +0100)]
Add memchr implemenation based on rust-memchr to libstd

8 years agoAuto merge of #30286 - oli-obk:const_error_span, r=nikomatsakis
bors [Fri, 18 Dec 2015 12:23:54 +0000 (12:23 +0000)]
Auto merge of #30286 - oli-obk:const_error_span, r=nikomatsakis

previously the error was erased and a `non-const path` error was emitted at the location of the field access instead of at the overflow location (as can be seen in the playground: http://is.gd/EuAF5F )

8 years agoRollup merge of #30406 - durka:patch-13, r=sanxiyn
Manish Goregaokar [Fri, 18 Dec 2015 08:13:46 +0000 (13:43 +0530)]
Rollup merge of #30406 - durka:patch-13, r=sanxiyn

The previous example had no chance of compiling in either form, due to the restrictive follow set for `ty`. This one has the desired behavior: http://is.gd/kYdw4g (well, I don't exactly desire this behavior at all, but it's true at least :p )

8 years agoRollup merge of #30398 - jwworth:pull-request-1450205451, r=sanxiyn
Manish Goregaokar [Fri, 18 Dec 2015 08:13:45 +0000 (13:43 +0530)]
Rollup merge of #30398 - jwworth:pull-request-1450205451, r=sanxiyn

This fixes a double word typo, 'the'.

8 years agoRollup merge of #30384 - nrc:diagnostics, r=@nikomatsakis
Manish Goregaokar [Fri, 18 Dec 2015 08:13:45 +0000 (13:43 +0530)]
Rollup merge of #30384 - nrc:diagnostics, r=@nikomatsakis

Should make it possible to add JSON or HTML errors. Also tidies up a lot.

8 years agoRollup merge of #30286 - oli-obk:const_error_span, r=nikomatsakis
Manish Goregaokar [Fri, 18 Dec 2015 08:13:45 +0000 (13:43 +0530)]
Rollup merge of #30286 - oli-obk:const_error_span, r=nikomatsakis

previously the error was erased and a `non-const path` error was emitted at the location of the field access instead of at the overflow location (as can be seen in the playground: http://is.gd/EuAF5F )

8 years agoAuto merge of #30272 - tshepang:doc-drain, r=bluss
bors [Fri, 18 Dec 2015 05:05:09 +0000 (05:05 +0000)]
Auto merge of #30272 - tshepang:doc-drain, r=bluss

Second sentence actually repeats info from first sentence. "from start to end" also feels like it adds nothing.

I also extended Vec::drain example.

8 years agoBeautify ISAAC's mixing arithmetic
Michael McConville [Fri, 18 Dec 2015 03:43:48 +0000 (22:43 -0500)]
Beautify ISAAC's mixing arithmetic

Call me verbose, but the existing logic was hideously formatted. The
result still fits in a small terminal. No functional change.

8 years agoFix emitting asm and object file output at the same time
Björn Steinbrink [Fri, 18 Dec 2015 00:24:40 +0000 (01:24 +0100)]
Fix emitting asm and object file output at the same time

LLVM doesn't really support reusing the same module to emit more than
one file. One bug this causes is that the IR is invalidated by the stack
coloring pass when emitting the first file, and then the IR verifier
complains by the time we try to emit the second file. Also, we get
different binaries with --emit=asm,link than with just --emit=link. In
some cases leading to segfaults.

Unfortunately, it seems that at this point in time, the most sensible
option to circumvent this problem is to just clone the whole llvm module
for the asm output if we need both, asm and obj file output.

Fixes #24876
Fixes #26235

8 years agoAuto merge of #30414 - alexcrichton:fix-cross-builds, r=brson
bors [Fri, 18 Dec 2015 03:05:02 +0000 (03:05 +0000)]
Auto merge of #30414 - alexcrichton:fix-cross-builds, r=brson

It looks like #27937 accidentally switched the llvmdeps file from the target to
the host by accident, so be sure to use the right llvmdeps file which is built
for the target when building rustc_llvm

8 years agoAdd a type prefix to fix build
Michael McConville [Fri, 18 Dec 2015 02:24:14 +0000 (21:24 -0500)]
Add a type prefix to fix build

Apparently this file's use annotations have changed since I last pulled
on my test machine.

8 years agoMake runtime function return size_t
Michael McConville [Fri, 18 Dec 2015 02:04:54 +0000 (21:04 -0500)]
Make runtime function return size_t

It returns sizeof(dirent_t), so I'm not sure why its return type is int.
It's only used once, and that usage immediately casts it to usize.

8 years agoAdd more systematic tests
Vadim Petrochenkov [Fri, 18 Dec 2015 01:56:27 +0000 (04:56 +0300)]
Add more systematic tests

8 years agoProhibit public glob reexports of private variants
Vadim Petrochenkov [Sun, 13 Dec 2015 18:57:07 +0000 (21:57 +0300)]
Prohibit public glob reexports of private variants

8 years agoAddress the comments
Vadim Petrochenkov [Fri, 4 Dec 2015 18:51:18 +0000 (21:51 +0300)]
Address the comments

8 years agoSubstitute type aliases before checking for privacy
Vadim Petrochenkov [Thu, 26 Nov 2015 22:48:26 +0000 (01:48 +0300)]
Substitute type aliases before checking for privacy

8 years agoUse lint instead of warning
Vadim Petrochenkov [Thu, 26 Nov 2015 17:56:20 +0000 (20:56 +0300)]
Use lint instead of warning

8 years agoReport errors not caught by the old visitor as warnings
Vadim Petrochenkov [Thu, 26 Nov 2015 16:26:15 +0000 (19:26 +0300)]
Report errors not caught by the old visitor as warnings

8 years agoProhibit private variant reexports
Vadim Petrochenkov [Tue, 24 Nov 2015 00:36:12 +0000 (03:36 +0300)]
Prohibit private variant reexports

8 years agoApproximate type aliases as public when determining impl publicity
Vadim Petrochenkov [Mon, 23 Nov 2015 10:36:49 +0000 (13:36 +0300)]
Approximate type aliases as public when determining impl publicity

8 years agoUpdate error messages and error descriptions
Vadim Petrochenkov [Sat, 21 Nov 2015 15:36:10 +0000 (18:36 +0300)]
Update error messages and error descriptions

8 years agoFix the fallout
Vadim Petrochenkov [Sat, 21 Nov 2015 14:39:15 +0000 (17:39 +0300)]
Fix the fallout

8 years agoRewrite VisiblePrivateTypesVisitor
Vadim Petrochenkov [Sat, 21 Nov 2015 14:38:17 +0000 (17:38 +0300)]
Rewrite VisiblePrivateTypesVisitor

8 years agoAuto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakis
bors [Fri, 18 Dec 2015 00:24:05 +0000 (00:24 +0000)]
Auto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakis

Still will not translate references to items like `X` or `Y::V` where

```
struct X;
enum Y { V }
```

but I must go work on university things so I’m PRing what I have.

r? @nikomatsakis

8 years agoClarified shadowing example
Xmasreturns [Thu, 17 Dec 2015 21:05:00 +0000 (13:05 -0800)]
Clarified shadowing example

Added some additional descriptive sentences and changed x to an int in
the example

8 years agoAbstract away differences between Vec and ptr::P in HIR
Vadim Petrochenkov [Thu, 17 Dec 2015 17:41:28 +0000 (20:41 +0300)]
Abstract away differences between Vec and ptr::P in HIR

8 years agoDeprecate name `OwnedSlice` and don't use it
Vadim Petrochenkov [Wed, 16 Dec 2015 18:44:33 +0000 (21:44 +0300)]
Deprecate name `OwnedSlice` and don't use it

8 years agolibsyntax: Merge OwnedSlice into ptr::P
Vadim Petrochenkov [Wed, 16 Dec 2015 17:58:26 +0000 (20:58 +0300)]
libsyntax: Merge OwnedSlice into ptr::P

8 years agoAuto merge of #30445 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 17 Dec 2015 20:08:48 +0000 (20:08 +0000)]
Auto merge of #30445 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #30370, #30404, #30415, #30419, #30428, #30437, #30439, #30441, #30442, #30443
- Failed merges:

8 years agoRollup merge of #30443 - tshepang:just-a-rename, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30443 - tshepang:just-a-rename, r=steveklabnik

8 years agoRollup merge of #30442 - tshepang:typo, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30442 - tshepang:typo, r=steveklabnik

8 years agoRollup merge of #30441 - tshepang:missing-comma, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30441 - tshepang:missing-comma, r=steveklabnik

8 years agoRollup merge of #30439 - swooster:swooster-nomicon-patch-1, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:14 +0000 (14:47 -0500)]
Rollup merge of #30439 - swooster:swooster-nomicon-patch-1, r=steveklabnik

The Rustonomicon's Lifetimes chapter uses the idiom "big ask", which is obscure compared to "tall order" (check [Google ngrams](https://books.google.com/ngrams/graph?content=big+ask%2C+tall+order&year_start=1800)). Also, it's easily mistaken for a typo; either "a big task" or "a big thing to ask" could plausibly work there.

r? @steveklabnik

8 years agoRollup merge of #30437 - tshepang:clarity, r=steveklabnik
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30437 - tshepang:clarity, r=steveklabnik

The comma removes the sorface ambiguity

8 years agoRollup merge of #30428 - steveklabnik:quickfix, r=apasel422
Steve Klabnik [Thu, 17 Dec 2015 19:47:13 +0000 (14:47 -0500)]
Rollup merge of #30428 - steveklabnik:quickfix, r=apasel422