Commit Graph

74250 Commits

Author SHA1 Message Date
Guillaume Gomez
f6a6d84031 Update associated constants error message 2018-01-30 18:42:18 +01:00
Santiago Pastorino
b9f756416a Do not ignore lifetime bounds in Copy impls
Closes #29149
2018-01-30 14:00:27 -03:00
Manish Goregaokar
ef4f4864f1 Use dest,src ordering for make_clone_call 2018-01-30 21:09:19 +05:30
Manish Goregaokar
48a7a1f5e9 Document the index used in AggregateKind::Adt 2018-01-30 21:09:18 +05:30
Manish Goregaokar
c6140970f5 Remove AggregateKind argument from tuple_like_shim 2018-01-30 21:09:18 +05:30
Manish Goregaokar
7fd3c27345 Write directly to the RETURN_PLACE in tuple_like_shim 2018-01-30 21:09:18 +05:30
Manish Goregaokar
e07aecde48 Make make_clone_call take a Place argument 2018-01-30 21:09:18 +05:30
penpalperson
deba3890c5 Changed back inline markings. 2018-01-30 05:31:38 -07:00
James Cowgill
d8e4142bd4 rustc_trans: clobber $1 (aka $at) on mips
This copies what clang does. There is a long explanation as to why this
is needed in the clang source (tools/clang/lib/Basic/Targets/Mips.h).
2018-01-30 11:54:52 +00:00
James Cowgill
e9d70417ca std: use more portable error number in from_raw_os_error docs
On MIPS, error number 98 is not EADDRINUSE (it is EPROTOTYPE). To fix the
resulting test failure this causes, use a more portable error number in
the example documentation. EINVAL shold be more reliable because it was
defined in the original Unix as 22 so hopefully most derivatives have
defined it the same way.
2018-01-30 11:53:50 +00:00
John Kåre Alsaker
6c66e11ff8 The static keyword can now begin expressions 2018-01-30 12:50:42 +01:00
John Kåre Alsaker
56473562c5 Force locals to be live after they are borrowed for immovable generators. Fixes #47736 2018-01-30 12:50:42 +01:00
bors
def3269a71 Auto merge of #47870 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests

- Successful merges: #47515, #47603, #47718, #47732, #47760, #47780, #47822, #47826, #47836, #47839, #47853, #47855
- Failed merges:
2018-01-30 11:10:06 +00:00
John Kåre Alsaker
4325c6375e Allow access of the state field before the generator transform. Fixes #47482, #46476 2018-01-30 11:40:39 +01:00
kennytm
393a1994af Rollup merge of #47855 - ollie27:rustdoc_hoedown_link_title, r=QuietMisdreavus
rustdoc: Fix link title rendering with hoedown

The link title needs to be HTML escaped.

It was broken by #47046.

r? @QuietMisdreavus
2018-01-30 17:11:00 +08:00
kennytm
b83fb0f2de Rollup merge of #47853 - rust-lang:increase-nested-groups-test-coverage, r=nikomatsakis
Increase test coverage of use_nested_groups

r? @nikomatsakis
2018-01-30 17:10:59 +08:00
kennytm
95572df8eb Rollup merge of #47839 - frewsxcv:frewsxcv-map-index, r=QuietMisdreavus
Document that `Index` ops can panic on `HashMap` & `BTreeMap`.

Fixes https://github.com/rust-lang/rust/issues/47011.
2018-01-30 17:10:58 +08:00
kennytm
e8868bdc56 Rollup merge of #47836 - Mark-Simulacrum:stage-flags, r=alexcrichton
Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0

Fixes #47658.

r? @alexcrichton
2018-01-30 17:10:57 +08:00
kennytm
16d3fdb752 Rollup merge of #47826 - gnzlbg:patch-2, r=alexcrichton
Whitelist v7 feature for ARM and AARCH64.

Needed for `v7` features in `coresimd`.

See b2f7be24d5/coresimd/src/arm/v7.rs (L40) which used to work but doesn't anymore.

r? alexcrichton
2018-01-30 17:10:56 +08:00
kennytm
003254e105 Rollup merge of #47822 - gnzlbg:patch-1, r=alexcrichton
Whitelist aes x86 feature flag

Required to fix https://github.com/rust-lang-nursery/stdsimd/issues/295 in stdsimd.

Closes #44544 .

r? @alexcrichton
2018-01-30 17:10:55 +08:00
kennytm
44b964147e Rollup merge of #47780 - varkor:cross-file-errors-line-col, r=estebank
Add line numbers and columns to error messages spanning multiple files

If an error message is emitted that spans several files, only the
primary file currently has line and column data attached. This is
useful information, even in files other than the one in which the error
occurs. We can often work out which line and column the error
corresponds to in other files — in this case it is helpful to add them
(in the case of ambiguity, the first relevant line/column is picked,
which is still helpful than none).
2018-01-30 17:10:54 +08:00
kennytm
4dbfc8ddbf Rollup merge of #47760 - little-dude:master, r=alexcrichton
implement Send for process::Command on unix

closes https://github.com/rust-lang/rust/issues/47751
2018-01-30 17:10:53 +08:00
kennytm
f06a391a40 Rollup merge of #47732 - mark-i-m:markim_comments_0001, r=jseyfried
Run rustfmt and add doc comments to libsyntax/ext/tt/macro_parser.rs

Similar to #47603

cc @theotherphil since you reviewed my other PR 😄

And because they are already assigned on #47603:

r? @arielb1
2018-01-30 17:10:52 +08:00
kennytm
fccc85a0ad Rollup merge of #47718 - malbarbo:env-home-dir, r=nikomatsakis
Make run-pass/env-home-dir.rs test more robust

Remove the assumption that home_dir always returns Some.

This allows the test to be executed with [cross](https://github.com/japaric/cross).
2018-01-30 17:10:51 +08:00
kennytm
3e39180706 Rollup merge of #47603 - mark-i-m:markim_comments_0000, r=jseyfried
Run rustfmt and add doc comments to libsyntax/ext/tt/quoted.rs

I was already going to try to understand this code to try to implement rust-lang/rfcs#2298. I figured I would put that knowledge into comments and share... This PR contains _no changes_ to the code itself -- just formatting and comments.

I'm not sure what the best way to do this is. I plan to make more such PR for other files, but I figured it would have fewer conflicts if I do it file by file...
2018-01-30 17:10:49 +08:00
kennytm
19aac099a5 Rollup merge of #47515 - jimmantooth:patch-1, r=QuietMisdreavus
Punctuation and clarity fixes.
2018-01-30 17:10:48 +08:00
bors
fe7e1a45f3 Auto merge of #45294 - petrochenkov:prioplus, r=nikomatsakis
syntax: Lower priority of `+` in `impl Trait`/`dyn Trait`

Now you have to write `Fn() -> (impl A + B)` instead of `Fn() -> impl A + B`, this is consistent with priority of `+` in trait objects (`Fn() -> A + B` means `(Fn() -> A) + B`).

To make this viable I changed the syntax to also permit `+` in return types in function declarations
```
fn f() -> dyn A + B { ... } // OK, don't have to write `-> (dyn A + B)`

// This is acceptable, because `dyn A + B` here is an isolated type and
// not part of a larger type with various operator priorities in play
// like `dyn A + B` in `Fn() -> dyn A + B` despite syntax similarities.
```
but you still have to use `-> (dyn A + B)` in function types and function-like trait object types (see this PR's tests for examples).

This can be a breaking change for code using `impl Trait` on nightly. The thing that is most likely to break is `&impl A + B`, it needs to be rewritten as `&(impl A + B)`.

cc https://github.com/rust-lang/rust/issues/34511 https://github.com/rust-lang/rust/issues/44662 https://github.com/rust-lang/rfcs/pull/438
2018-01-30 08:23:41 +00:00
Aaron Hill
b5f8cd5c20
Fix ref-to-ptr coercions not working with NLL in certain cases
Implicit coercions from references to pointers were lowered to slightly
different Mir than explicit casts (e.g. 'foo as *mut T'). This resulted
in certain uses of self-referential structs compiling correctly when an
explicit cast was used, but not when the implicit coercion was used.

To fix this, this commit adds an outer 'Use' expr when applying a
raw-ptr-borrow adjustment. This makes the lowered Mir for coercions
identical to that of explicit coercions, allowing the original code to
compile regardless of how the raw ptr cast occurs.

Fixes #47722
2018-01-29 23:25:54 -05:00
Christopher Durham
c06c707fbf Fix regression: account for trait methods in arg count mismatch error 2018-01-29 23:08:16 -05:00
Clar Charr
aab712cbc8 Move time::Duration to libcore 2018-01-29 18:16:43 -05:00
Clar Charr
2cab06855a Reworded to avoid fuzziness, mention ! in c_void docs. 2018-01-29 18:15:59 -05:00
Mark Mansi
576294237b fix typos 2018-01-29 17:08:11 -06:00
Clar Charr
853fa5873c Revisions suggested in comments 2018-01-29 17:44:12 -05:00
Clar Charr
1a043533f5 Document std::os::raw. 2018-01-29 17:44:12 -05:00
Mark Mansi
2184400be7 Update comment 2018-01-29 16:37:57 -06:00
bors
90eb44a589 Auto merge of #47837 - eddyb:going-places, r=nikomatsakis
Replace "lvalue" terminology with "place".

See #46425 for the previous PR (which only changed MIR-related code).

r? @nikomatsakis
2018-01-29 19:47:48 +00:00
Oliver Middleton
ae98f4cac5 rustdoc: Fix link title rendering with hoedown
The link title needs to be HTML escaped.
2018-01-29 19:26:31 +00:00
Niko Matsakis
adeb0aeb4a
move comment right onto the line in question 2018-01-29 13:28:23 -05:00
Marco A L Barbosa
898fdcc3ed Make run-pass/env-home-dir.rs test more robust
Remove the assumption that home_dir always returns Some

This allows the test to be executed with
[cross](https://github.com/japaric/cross).
2018-01-29 15:40:27 -02:00
Esteban Küber
08287c1e26 Toggle span highlighting on -Zteach 2018-01-29 08:59:15 -08:00
Pietro Albini
8389b66c18
Increase test coverage of use_nested_groups 2018-01-29 17:11:09 +01:00
varkor
e92bdb9828 Specify output filenames for compatibility with Windows 2018-01-29 14:38:50 +00:00
Mark Simulacrum
e09a8bd70c Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0
Fixes #47658.
2018-01-29 07:02:09 -07:00
varkor
9a2f02df66 Warn when -C extra-filename flag is used with -o 2018-01-29 12:50:36 +00:00
varkor
d97da7d536 Minor refactoring 2018-01-29 11:08:06 +00:00
varkor
ba76092c2e Fix tidy error 2018-01-29 11:08:06 +00:00
varkor
45e962ecc0 Use correct output file paths for error checking 2018-01-29 11:07:27 +00:00
varkor
3d55974be4 Fix quotation mark 2018-01-29 11:05:15 +00:00
varkor
dc274e68a7 Fix tidy error 2018-01-29 11:05:15 +00:00
varkor
df1c61d303 Warn when rustc output conflicts with existing directories
When the compiled executable would conflict with a directory, display a
rustc error instead of a verbose and potentially-confusing linker
error. This is a usability improvement, and doesn’t actually change
behaviour with regards to compilation success. This addresses the
concern in #35887.
2018-01-29 11:05:15 +00:00