Commit Graph

51459 Commits

Author SHA1 Message Date
Amanieu d'Antras
86fd5a02e7 Fix LLVM assert with write_volatile 2016-03-13 19:01:35 +01:00
bors
ce943eb369 Auto merge of #32184 - ollie27:win_stdout, r=alexcrichton
Fixup stout/stderr on Windows

WriteConsoleW can fail if called with a large buffer so we need to slice
any stdout/stderr output.
However the current slicing has a few problems:
 1. It slices by byte but still expects valid UTF-8.
 2. The slicing happens even when not outputting to a console.
 3. panic! output is not sliced.

This fixes these issues by moving the slice to right before
WriteConsoleW and slicing on a char boundary.
2016-03-13 09:27:17 -07:00
Jonas Schievink
298b51e982 Give a more accurate error on thin-to-fat ptr cast
Fixes #31511
2016-03-13 17:03:31 +01:00
bors
1c8b245928 Auto merge of #32229 - Manishearth:rollup, r=Manishearth
Rollup of 4 pull requests

- Successful merges: #32164, #32179, #32212, #32218
- Failed merges:
2016-03-13 07:30:14 -07:00
Ruud van Asseldonk
a394d50490 Regenerate x86 platform intrinsics
The exact command used was:

    $ cd src/etc/platform-intrinsics/x86
    $ python2 ../generator.py --format compiler-defs -i info.json   \
      sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \
      avx.json avx2.json fma.json                                   \
      > ../../../librustc_platform_intrinsics/x86.rs
2016-03-13 15:09:46 +01:00
Ruud van Asseldonk
e1489caf0b Define AVX blend intrinsics
This defines the `_mm256_blendv_pd` and `_mm256_blendv_ps` intrinsics.
The `_mm256_blend_pd` and `_mm256_blend_ps` intrinsics are not available
as LLVM intrinsics. In Clang they are implemented using the
shufflevector builtin.

Intel reference: https://software.intel.com/en-us/node/524070.
2016-03-13 15:04:14 +01:00
Ruud van Asseldonk
ddfe9b6d7d Define AVX comparison intrinsics
This defines `_mm256_cmp_pd` and `_mm256_cmp_ps`.

Intel reference: https://software.intel.com/en-us/node/524075.
2016-03-13 15:04:14 +01:00
Manish Goregaokar
2e21ff1a9d Rollup merge of #32218 - cantino:minor_book_typo_fixes, r=steveklabnik
Fix minor typos in doc.rust-lang.org/book

I've made a few typo and grammar fixes as I've been working through the book.
2016-03-13 19:33:27 +05:30
Manish Goregaokar
d7f7ab9646 Rollup merge of #32212 - Manishearth:ice-cu, r=eddyb
Don't allow values for codegen-units less than 1

r? @eddyb

fixes #32191
2016-03-13 19:33:27 +05:30
Manish Goregaokar
07b9e89c5a Rollup merge of #32179 - srinivasreddy:remove_int_suffix, r=steveklabnik
Removed integer suffixes in libsyntax crate
2016-03-13 19:33:27 +05:30
Manish Goregaokar
511cb30619 Rollup merge of #32164 - nikomatsakis:fewer-errors, r=eddyb
Do not report errors from regionck if other errors were already reported

Do not report errors from regionck if other errors were already reported during the lifetime of this inferencer. Fixes #30580.

r? @arielb1
2016-03-13 19:33:27 +05:30
bors
c21644ad16 Auto merge of #31916 - nagisa:mir-passmgr-2, r=arielb1
Add Pass manager for MIR

A new PR, since rebasing the original one (https://github.com/rust-lang/rust/pull/31448) properly was a pain. Since then there has been several changes most notable of which:

1. Removed the pretty-printing with `#[rustc_mir(graphviz/pretty)]`, mostly because we now have `--unpretty=mir`, IMHO that’s the direction we should expand this functionality into;
2. Reverted the infercx change done for typeck, because typeck can make an infercx for itself by being a `MirMapPass`

r? @nikomatsakis
2016-03-13 05:33:28 -07:00
Jeffrey Seyfried
d1020143b6 Add regression test for #32222 2016-03-13 10:46:33 +00:00
Jeffrey Seyfried
9ca3ff16ad Fixes #32222 2016-03-13 10:46:19 +00:00
Jeffrey Seyfried
fa18403a2f Refactor out methods NameResolution::increment_outstanding_references and
`NameResolution::decrement_outstanding_references`.
2016-03-13 10:45:08 +00:00
bors
db6dd8e4fe Auto merge of #32182 - bluss:string-from-is-str-owned, r=alexcrichton
Call str::to_owned in String::from and uninline it

Call str::to_owned in String::from and uninline it

These methods were already effectively equal, but now one calls
the other, and neither is marked inline.
String::from does not need to be inlined, it can be without it just like
str::to_owned and String::clone are.

Fixes #32163
2016-03-13 03:40:14 -07:00
Ulrik Sverdrup
ec39a76a3e Call str::to_owned in String::from and uninline it
String::from does not need to be inlined, it can be without it just like
str::to_owned and String::clone are.
2016-03-13 09:36:02 +01:00
Andrey Cherkashin
4e4c0d7b5a Fix. FreeBSD snapshot
Previous snapshot was complied with avx2 instructions by accident.

Actual file: http://people.freebsd.org/~davide/rust/rust-stage0-2016-02-17-4d3eebf-freebsd-x86_64-f38991fbb81c1cd8d0bbda396f98f13a55b42804.tar.bz2
2016-03-12 22:02:39 -08:00
bors
06074ac004 Auto merge of #32141 - jseyfried:fix_resolution_in_lexical_scopes, r=nikomatsakis
Fix name resolution in lexical scopes

Currently, `resolve_item_in_lexical_scope` does not check the "ribs" (type parameters and local variables). This can allow items that should be shadowed by type parameters to be named.

For example,
```rust
struct T { i: i32 }
fn f<T>() {
    let t = T { i: 0 }; // This use of `T` resolves to the struct, not the type parameter
}

mod Foo {
    pub fn f() {}
}
fn g<Foo>() {
    Foo::f(); // This use of `Foo` resolves to the module, not the type parameter
}
```

This PR changes `resolve_item_in_lexical_scope` so that it fails when the item is shadowed by a rib (fixes #32120).
This is a [breaking-change], but it looks unlikely to cause breakage in practice.

r? @nikomatsakis
2016-03-12 21:55:14 -08:00
bors
3e05371c13 Auto merge of #32217 - alexcrichton:fix-make-dist, r=brson
mk: Fix `make dist`

With the movement of the erro-index-generator and rustbook, need to update the
rules in `make dist`.
2016-03-12 18:58:15 -08:00
bors
531b928ea6 Auto merge of #32140 - ruud-v-a:avx-intrinsics, r=alexcrichton
Add AVX broadcast and conversion intrinsics

This adds the following intrinsics:

 * `_mm256_broadcast_pd`
 * `_mm256_broadcast_ps`
 * `_mm256_cvtepi32_pd`
 * `_mm256_cvtepi32_ps`
 * `_mm256_cvtpd_epi32`
 * `_mm256_cvtpd_ps`
 * `_mm256_cvtps_epi32`
 * `_mm256_cvtps_pd`
 * `_mm256_cvttpd_epi32`
 * `_mm256_cvttps_epi32`

The "avx" codegen feature must be enabled to use these.
2016-03-12 16:18:34 -08:00
Abhishek Chanda
534bd19d25 Reject unspecified and loopback IP from global 2016-03-12 14:51:45 -08:00
bors
a2c56de764 Auto merge of #32112 - alexcrichton:fix-issues, r=aturon
std: Fix tracking issues and clean deprecated APIs

This PR fixes up a number of discrepancies found with tracking issues (some closed, some needed new ones, etc), and also cleans out all pre-1.8 deprecated APIs. The big beast here was dealing with `std::dynamic_lib`, and via many applications of a large hammer it's now out of the standard library.
2016-03-12 13:21:06 -08:00
Andrew Cantino
56ab2a1cde Fix minor typos in doc.rust-lang.org/book 2016-03-12 12:35:34 -08:00
Alex Crichton
b53764c73b std: Clean out deprecated APIs
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that
are deprecated in the 1.8 release are sticking around for the rest of this
cycle.

Some notable changes are:

* The `dynamic_lib` module was moved into `rustc_back` as the compiler still
  relies on a few bits and pieces.
* The `DebugTuple` formatter now special-cases an empty struct name with only
  one field to append a trailing comma.
2016-03-12 12:31:13 -08:00
Alex Crichton
f6c594b131 mk: Fix make dist
With the movement of the erro-index-generator and rustbook, need to update the
rules in `make dist`.
2016-03-12 12:22:40 -08:00
bors
8788ffc670 Auto merge of #32193 - eddyb:stage1-is-useful-mkay, r=eddyb
Statically link run-pass/command-before-exec so it passes not just whenever we happen to bootstrap perfectly.
2016-03-12 09:37:19 -08:00
Simonas Kazlauskas
bdc176ef6b Implement --unpretty mir-cfg for graphviz output
Also change output for --unpretty mir to output function names in a prettier way.
2016-03-12 19:07:00 +02:00
bors
beb444eaed Auto merge of #32142 - mitaa:rdoc-maybe-inline-local, r=alexcrichton
rustdoc: improve crate-local inlining

fixes #28537

r? @alexcrichton
2016-03-12 07:31:11 -08:00
Eduard Burtescu
27217e580f Statically link run-pass/command-before-exec so it passes not just whenever we happen to bootstrap perfectly. 2016-03-12 14:36:48 +02:00
Manish Goregaokar
8e3ccd9c9b Don't allow values for codegen-units less than 1 (fixes #32191) 2016-03-12 16:01:34 +05:30
Alex Crichton
083db64d90 std: Add a tracking issue for Peekable::is_empty
The listed tracking issue was hooked up to the wrong location by accident.
2016-03-11 22:09:58 -08:00
Alex Crichton
aed7ddae8e core: Make a new tracking issue for prelude traits
The referenced issues here were both closed, so hook up a new issue which tracks
specifically the prelude traits being unstable.
2016-03-11 22:09:58 -08:00
Alex Crichton
a38bf6e23d core: Mark Wrapping impls as stable
These are all insta-stable anyway, so just properly tag them.
2016-03-11 22:09:58 -08:00
Alex Crichton
1c440bdaf2 std: Remove unstable from ReentrantMutex
This isn't exported so it doesn't need a tag.
2016-03-11 22:09:58 -08:00
Alex Crichton
9a623f3378 test: Move some test outputs into $(TMPDIR)
Don't want to pollute the source tree!
2016-03-11 22:09:58 -08:00
Alex Crichton
3dd8b3ec9b alloc: Add unstable issue for FnBox APIs 2016-03-11 22:09:58 -08:00
bors
1a019dc86d Auto merge of #31925 - aturon:inherent-overlap, r=nikomatsakis
Forbid items with the same name from appearing in overlapping inherent impl blocks

For example, the following is now correctly illegal:

```rust
struct Foo;

impl Foo {
    fn id() {}
}

impl Foo {
    fn id() {}
}
```

"Overlapping" here is determined the same way it is for traits (and in fact shares the same code path): roughly, there must be some way of substituting any generic types to unify the impls, such that none of the `where` clauses are provably unsatisfiable under such a unification.

Along the way, this PR also introduces an `ImplHeader` abstraction (the first commit) that makes it easier to work with impls abstractly (without caring whether they are trait or inherent impl blocks); see the first commit.

Closes #22889
r? @nikomatsakis
2016-03-11 20:57:39 -08:00
Oliver Middleton
bd80a53407 Further simplify Windows stdout/stderr
This makes it output as much valid UTF-8 as it can then return failure.
2016-03-12 04:18:17 +00:00
srinivasreddy
b308ed0684 Removed integer suffixes in libsyntax crate 2016-03-12 08:23:38 +05:30
bors
f1d6f126ef Auto merge of #32200 - Manishearth:rollup, r=Manishearth
Rollup of 11 pull requests

- Successful merges: #32137, #32158, #32171, #32174, #32178, #32179, #32180, #32181, #32183, #32186, #32197
- Failed merges:
2016-03-11 17:50:45 -08:00
Manish Goregaokar
10e4e9eec9 Rollup merge of #32197 - andoriyu:patch-1, r=alexcrichton
Add FreeBSD amd64 snapshot

Snapshot itself: https://github.com/dhuseby/rust-manual-snapshots/pull/3
2016-03-12 06:47:58 +05:30
Manish Goregaokar
c8578c1f40 Rollup merge of #32186 - srinivasreddy:libcoretest, r=steveklabnik
cleanup int suffixes in libcoretest
2016-03-12 06:47:58 +05:30
Manish Goregaokar
667dcebaf9 Rollup merge of #32183 - bluss:doc-index, r=alexcrichton
Clarify doc for slice slicing (Index impls)

Clarify doc for slice slicing (Index impls)

This is a follow up for PR #32099 and #32057
2016-03-12 06:47:57 +05:30
Manish Goregaokar
249ca83096 Rollup merge of #32181 - srinivasreddy:librustfront, r=steveklabnik
removed suffixes for librustc_front
2016-03-12 06:47:57 +05:30
Manish Goregaokar
7a1df9e8de Rollup merge of #32180 - srinivasreddy:type_check_lib, r=steveklabnik
removed integer suffixes in librustc_typeck crate
2016-03-12 06:47:56 +05:30
Jeffrey Seyfried
e926f281df Comment resolve_item_in_lexical_scope 2016-03-11 23:59:02 +00:00
bors
0d68aadd27 Auto merge of #32132 - arcnmx:cargobuild-std-target, r=alexcrichton
cover more linux targets in libstd cargobuild

libstd/build.rs checked the target name against `"unknown-linux"`... That doesn't necessarily apply to all Linux targets as some toolchains for embedded targets will change that `unknown` field to some vendor name. Some shifting around was needed since Android is also a Linux target.

r? @alexcrichton
2016-03-11 15:25:03 -08:00
Aaron Turon
6265b6bec8 Adjust rustdoc test for new restriction 2016-03-11 15:22:07 -08:00
Manish Goregaokar
744ffed25a Rollup merge of #32178 - naltun:patch-1, r=steveklabnik
Update getting-started.md

In `rustc 1.7.0` the message that is displayed is now `Rust is ready to roll.`
2016-03-12 02:41:26 +05:30