Commit Graph

67136 Commits

Author SHA1 Message Date
Josh Stone
b1e8c7215d Fix little-endian assumptions in run-pass/union/union-basic 2017-08-22 12:45:10 -07:00
bors
469a6f9bd9 Auto merge of #44013 - arielb1:coerce-snapshot, r=eddyb
Register fn-ptr coercion obligations out of a snapshot

Fixes #43923.

beta-nominating because regression.
r? @eddyb
2017-08-22 19:14:12 +00:00
Matt Ickstadt
081f32ab67 Clarify windows build instructions in README
The old wording made me think you were supposed to do `python x.py --build=msvc`, which is not the case. Specify that you need to use the target triple.
2017-08-22 13:28:39 -05:00
Ian Douglas Scott
fe2d661931
Simplify code for handling Redox paths 2017-08-22 10:33:49 -07:00
Nathaniel Ringo
c987f30049 Mention null_mut on the pointer primitive docs.
Also adds a few mentions that both `*const` and `*mut` support
functions, when only `*const` was mentioned before.
2017-08-22 12:00:05 -05:00
Jouan Amate
4729f22f8b Fixed changes to .in-band CSS
:target will specifically override .in-band background
2017-08-22 09:24:18 -07:00
Tobias Schaffner
c60fc4bd58 Return L4Re TargetOptions as a Result type instead of panic
If the environment variable L4RE_LIBDIR ist not set an Error will be
returned wrapped in a result type instead of a panic.
2017-08-22 18:05:08 +02:00
Ian Douglas Scott
ab48de8847
Use cfg! instead of #[cfg] 2017-08-22 08:17:05 -07:00
Andy Russell
02e95e508d
remove needless clone 2017-08-22 10:09:54 -05:00
bors
a24e0f25d7 Auto merge of #44033 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

- Successful merges: #43993, #44001, #44010, #44014, #44029
- Failed merges:
2017-08-22 13:59:20 +00:00
Sebastian Humenda
beedf4e7d8 L4Re Target: Add the needed Libraries and locate them
Add the libraries and objects that have to be linked to a get working L4Re
Binary using pre- and post-link-args. Additionaly some ld commands had to
be passed.

* L4Re libraries and objects will be located by an environment variable.
* gcc libraries and objects will be located using a gcc call.

GCC is mandatory for this target, that might need documentation somewhere.
As soon as something mandatory cannot be found, the compiler will panic.
This is intended, because the functions involved don't allow the usage of
a Result type. libgcc_eh is now passed using `-l` and crtbeginT.o and
crtend.o are now located using `gcc -print-filename`.

Co-authored-by: TobiasSchaffner <tobiasschaffner@outlook.com>
2017-08-22 13:54:32 +02:00
Guillaume Gomez
2dfb8d73f7 Rollup merge of #44029 - WiSaGaN:patch-1, r=alexcrichton
Fix typos in 1.20 release notes
2017-08-22 13:36:21 +02:00
Guillaume Gomez
7c856886ad Rollup merge of #44014 - Mark-Simulacrum:update-readme, r=alexcrichton
Update rustbuild README

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

r? @alexcrichton
2017-08-22 13:36:20 +02:00
Guillaume Gomez
6b62f34ecd Rollup merge of #44010 - GuillaumeGomez:read-links, r=frewsxcv
Add missing links for Read trait

r? @rust-lang/docs
2017-08-22 13:36:19 +02:00
Guillaume Gomez
80cc5e51f0 Rollup merge of #44001 - tamird:release-notes-1.16, r=alexcrichton
RELEASES.md: document 1.16 lifetime elision change

Closes #41105.

r? @Mark-Simulacrum cc @nikomatsakis
2017-08-22 13:36:18 +02:00
Guillaume Gomez
16a189863c Rollup merge of #43993 - tamird:better-wording-error, r=arielb1
borrowck: name the correct type in error message

Closes #36407.

r? @Mark-Simulacrum
2017-08-22 13:36:17 +02:00
bors
1177911790 Auto merge of #44008 - RalfJung:staged1, r=alexcrichton
Make sure crates not opting in to staged_api don't use staged_api

This also fixes the problem that with `-Zforce-unstable-if-unmarked` set, crates could not use `#[deprecated]`.

If you prefer, I can instead submit another version which just fixes this problem, but still allows the staged API attributes for all crates when  `-Zforce-unstable-if-unmarked` is set. I have prepared that at <https://github.com/RalfJung/rust/tree/staged2>. As yet another alternative, @alexcrichton suggested to turn this error into a lint, but that seems to be much more work, so is it worth it?

Cc @alexcrichton #43975
2017-08-22 11:15:10 +00:00
Oliver Schneider
be96ad2c85 Update intrinsics.rs 2017-08-22 12:48:20 +02:00
Felix S. Klock II
fbb099edca Fix logic error in test guarding prototype MIR borrowck code.
(This crept in during the shift from a transform to a query; I didn't
notice because my muscle memory was still always passing `-Z
mir-borrowck`, while my test cases *also* had the
`#[rustc_mir_borrowck]` attribute attached to them.)
2017-08-22 12:05:52 +02:00
bors
7e5578da8c Auto merge of #44003 - LukasKalbertodt:patch-1, r=nikomatsakis
Add PartialEq/Eq impls to proc_macro::{Spacing, Delimiter}

I don't see a reason why those two types shouldn't be tested for equality. But I hardly know anything about proc macros, so I'm probably wrong :)
2017-08-22 08:32:14 +00:00
Michael Woerister
8d7c59b1fa incr.comp.: Cache Hir-DepNodeIndices in the HIR map. 2017-08-22 09:31:00 +02:00
Scott McMurray
c4cb2d1f2e Add [T]::swap_with_slice
The safe version of a method from ptr, like [T]::copy_from_slice
2017-08-21 22:20:00 -07:00
Alex Crichton
c74ff320ee More merge conflicts 2017-08-21 22:09:50 -07:00
Alex Crichton
04c66c30a7 Merge remote-tracking branch 'origin/master' into gen 2017-08-21 21:47:07 -07:00
bors
6722996923 Auto merge of #43854 - estebank:missing-cond, r=nikomatsakis
Point out missing if conditional

On a case where an else conditional is missing, point this out
instead of the token immediately after the (incorrect) else block:

```
error: missing condition for `if` statemementt push fork -f

  --> $DIR/issue-13483.rs:16:5
   |
13 |    } else if {
   |             ^ expected if condition here
```

instead of

```
error: expected `{`, found `else`
  --> ../../src/test/ui/issue-13483.rs:14:7
   |
14 |     } else {
   |       ^^^^
```

Fix #13483.
2017-08-22 04:28:49 +00:00
Wangshan Lu
c40ec8199f Fix typos in 1.20 release notes 2017-08-22 11:29:05 +08:00
bors
942711e115 Auto merge of #43690 - scalexm:issue-28229, r=nikomatsakis
Generate builtin impls for `Clone`

This fixes a long-standing ICE and limitation where some builtin types implement `Copy` but not `Clone` (whereas `Clone` is a super trait of `Copy`).

However, this PR has a few side-effects:
* `Clone` is now marked as a lang item.
* `[T; N]` is now `Clone` if `T: Clone` (currently, only if `T: Copy` and for `N <= 32`).
* `fn foo<'a>() where &'a mut (): Clone { }` won't compile anymore because of how bounds for builtin traits are handled (e.g. same thing currently if you replace `Clone` by `Copy` in this example). Of course this function is unusable anyway, an error would pop as soon as it is called.

Hence, I'm wondering wether this PR would need an RFC...
Also, cc-ing @nikomatsakis, @arielb1.

Related issues: #28229, #24000.
2017-08-22 01:34:54 +00:00
bors
8df670b6a6 Auto merge of #43540 - petrochenkov:pathrelax, r=nikomatsakis
syntax: Relax path grammar

TLDR: Accept the disambiguator `::` in "type" paths (`Type::<Args>`), accept the disambiguator `::` before parenthesized generic arguments (`Fn::(Args)`).

The "turbofish" disambiguator `::<>` in expression paths is a necessary evil required for path parsing to be both simple and to give reasonable results.
Since paths in expressions usually refer to values (but not necessarily, e.g. `Struct::<u8> { field: 0 }` is disambiguated, but refers to a type), people often consider `::<>` to be inherent to *values*, and not *expressions* and want to write disambiguated paths for values even in contexts where disambiguation is not strictly necessary, for example when a path is passed to a macro `m!(Vec::<i32>::new)`.
The problem is that currently, if the disambiguator is not *required*, then it's *prohibited*. This results in confusion - see https://github.com/rust-lang/rust/issues/41740, https://internals.rust-lang.org/t/macro-path-uses-novel-syntax/5561.

This PR makes the disambiguator *optional* instead of prohibited in contexts where it's not strictly required, so people can pass paths to macros in whatever form they consider natural (e.g. disambiguated form for value paths).
This PR also accepts the disambiguator in paths with parenthesized arguments (`Fn::(Args)`) for consistency and to simplify testing of stuff like https://github.com/rust-lang/rust/pull/41856#issuecomment-301219194.

Closes https://github.com/rust-lang/rust/issues/41740

cc @rust-lang/lang
r? @nikomatsakis
2017-08-21 23:03:57 +00:00
Alex Crichton
5dc9d71521 Merge remote-tracking branch 'origin/master' into gen 2017-08-21 15:50:00 -07:00
Alex Crichton
35b8dbaef3 Merge remote-tracking branch 'origin/master' into gen 2017-08-21 15:45:40 -07:00
bors
4fdb4bedfd Auto merge of #44009 - pnkfelix:mir-borrowck-as-query, r=arielb1
Mir borrowck as query

Turn the `mir-borrowck` pass (aka "transform") into a query.

(If I had realized how relatively easy this was going to be, I would have made it part of #43108. `let hindsight = 20/20;`)
2017-08-21 20:16:21 +00:00
Alex Crichton
b31998ec93 Merge remote-tracking branch 'origin/master' into gen 2017-08-21 10:41:56 -07:00
bors
80be2f8697 Auto merge of #43971 - alexcrichton:lint-statements, r=michaelwoerister
rustc: Add `Local` to the HIR map of parents

When walking parents for lints we want to be sure to hit `let` statements which
can have attributes, so hook up these statements in the HIR map.

Closes #43910
2017-08-21 17:38:26 +00:00
Steffen
d46660edc9 libproc_macro docs: fix brace and bracket mixup
the documentation indicates that brace is `[` but maps to token::Brace
which (expectedly) is `{`. Just a little confusion in the docs.
2017-08-21 17:17:27 +02:00
Oliver Schneider
1dc3a2b5fa
Add align_offset intrinsic
see https://github.com/rust-lang/rfcs/pull/2043 for details
2017-08-21 15:57:21 +02:00
Mark Simulacrum
1db158d498 Update rustbuild README 2017-08-21 06:22:01 -06:00
Ariel Ben-Yehuda
b47bcc2ee8 fix other cases of registering obligations in a snapshot
No test cases for these ones, but they would all ICE if they ever run
with a non-empty set of obligations.
2017-08-21 14:26:33 +03:00
Ariel Ben-Yehuda
e00263438c register fn-ptr coercion obligations out of a snapshot
Fixes #43923.
2017-08-21 14:11:57 +03:00
Felix S. Klock II
224c6ca2ee Moved support code for rustc_mir::borrow_check query out of mod transform. 2017-08-21 13:10:13 +02:00
Felix S. Klock II
c280afcc1c Remove the rustc_mir::transform entry point for mir-borrowck. 2017-08-21 12:49:18 +02:00
Felix S. Klock II
4da2a88abc Expose mir-borrowck via a query.
(A followup commit removes the mir::transform based entry point.)
2017-08-21 12:49:18 +02:00
Ralf Jung
472e7e3ee2 rustc_plugin: use staged API 2017-08-21 12:46:36 +02:00
Guillaume Gomez
871bd237ee Add missing links for Read trait 2017-08-21 11:45:33 +02:00
bors
757b7ac2ab Auto merge of #43986 - petrochenkov:pubcrate3, r=pnkfelix
rustc: Remove some dead code

Extracted from https://github.com/rust-lang/rust/pull/43192

r? @eddyb
2017-08-21 08:14:17 +00:00
bors
06bf94a129 Auto merge of #43929 - oli-obk:use_placement, r=nrc
Improve placement of `use` suggestions

r? @nrc

cc @estebank @Mark-Simulacrum

fixes #42835
fixes #42548
fixes #43769
2017-08-21 05:18:03 +00:00
bors
cf56cf360e Auto merge of #44004 - frewsxcv:frewsxcv-bors-docs, r=Mark-Simulacrum
Fix broken homu link in CONTRIBUTING.md.

Fixes the docs aspect of https://github.com/rust-lang/rust/issues/43898.
2017-08-21 01:27:00 +00:00
Corey Farwell
c7cd79b58f Fix broken homu link in CONTRIBUTING.md.
Fixes the docs aspect of https://github.com/rust-lang/rust/issues/43898.
2017-08-20 21:24:14 -04:00
Tamir Duberstein
c1ed862bc4
borrowck: name the correct type in error message
Closes #36407.
2017-08-20 18:31:36 -04:00
Lukas Kalbertodt
4ba242b7e0 Add PartialEq/Eq impls to proc_macro::{Spacing, Delimiter}
I don't see a reason why those two types shouldn't be tested for equality.
2017-08-20 23:20:34 +02:00
bors
8c303ed879 Auto merge of #44000 - ids1024:redox-exec-error, r=alexcrichton
redox: Correct error on exec when file is not found

`.raw_os_error()` (called in `spawn()`) returned None, so this produced an incorrect error.
2017-08-20 20:29:08 +00:00