Commit Graph

92711 Commits

Author SHA1 Message Date
Michael Woerister
ff976fe0f1 Fix ignore-logic for sanitizer run-make tests. 2019-04-24 11:14:24 +02:00
bors
bfb443eb1d Auto merge of #60213 - Manishearth:clippyup, r=oli-obk
Update clippy

r? @oli-obk @centril
2019-04-24 06:09:05 +00:00
Eric Huss
882352a279 Update cargo, books 2019-04-23 21:39:27 -07:00
bors
8a44125f55 Auto merge of #60224 - Centril:rollup-lfuhhsk, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #56278 (Future-proof MIR for dedicated debuginfo.)
 - #59739 (Stabilize futures_api)
 - #59822 (Fix dark css rule)
 - #60186 (Temporarily accept [i|u][32|size] suffixes on a tuple index and warn)
 - #60190 (Don't generate unnecessary rmeta files.)

Failed merges:

r? @ghost
2019-04-24 03:16:47 +00:00
Mazdak Farrokhzad
7304e969df
Rollup merge of #60190 - nnethercote:less-metadata-gen, r=alexcrichton
Don't generate unnecessary rmeta files.

As per https://github.com/rust-lang/rust/pull/60006#issuecomment-484284191.

r? @alexcrichton
2019-04-24 05:16:23 +02:00
Mazdak Farrokhzad
eb4860c77c
Rollup merge of #60186 - estebank:accept-suffix, r=nikomatsakis
Temporarily accept [i|u][32|size] suffixes on a tuple index and warn

Fix #60138.

#59553 will need to be kept open to track the change back to rejecting this code a few versions down thee line.
2019-04-24 05:16:22 +02:00
Mazdak Farrokhzad
31a537184c
Rollup merge of #59822 - GuillaumeGomez:fix-dark-theme-css, r=Manishearth
Fix dark css rule

Fixes #59817.

r? @rust-lang/rustdoc
2019-04-24 05:16:20 +02:00
Mazdak Farrokhzad
48cb6bead1
Rollup merge of #59739 - cramertj:stabilize, r=withoutboats
Stabilize futures_api

cc https://github.com/rust-lang/rust/issues/59725.
Based on https://github.com/rust-lang/rust/pull/59733 and https://github.com/rust-lang/rust/pull/59119 -- only the last two commits here are relevant.

r? @withoutboats , @oli-obk for the introduction of `rustc_allow_const_fn_ptr`.
2019-04-24 05:16:18 +02:00
Mazdak Farrokhzad
5f82b5b882
Rollup merge of #56278 - eddyb:mir-debuginfo-proof, r=nikomatsakis
Future-proof MIR for dedicated debuginfo.

This is #56231 without the last commit (the one that actually moves to `VarDebuginfo`).
Nothing should be broken, but it should no longer depend on debuginfo for anything else.

r? @nikomatsakis
2019-04-24 05:16:17 +02:00
bors
0928511d3a Auto merge of #58623 - Amanieu:hashbrown3, r=alexcrichton
Replace HashMap implementation with SwissTable (as an external crate)

This is the same as #56241 except that it imports `hashbrown` as an external crate instead of copying the implementation into libstd.

This includes a few API changes (all unstable):
- `try_reserve` is added to `HashSet`.
- Some trait bounds have been changed in the `raw_entry` API.
- `search_bucket` has been removed from the `raw_entry` API (doesn't work with SwissTable).
2019-04-24 00:20:56 +00:00
Nicholas Nethercote
3fc0936546 Don't generate unnecessary rmeta files. 2019-04-24 09:55:11 +10:00
Taylor Cramer
3f966dcd53 Stabilize futures_api 2019-04-23 16:13:53 -07:00
Taylor Cramer
e617025e96 Add rustc_allow_const_fn_ptr 2019-04-23 15:55:31 -07:00
Amanieu d'Antras
e7f162fdd8 Update hashbrown to 0.3.0 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
ae388773e1 Update hashbrown to 0.2.2 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
41c2f81d57 Remove stabilized alloc feature from rustc-std-workspace-alloc 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
5253366e19 Update hashbrown to 0.2.1 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
e15bf96cb2 Remove broken tests 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
9325451ec9 Fix test 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
cf46bd5037 Replace the robin-hood hash table with hashbrown 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
1fa7a21534 Make libstd depend on the hashbrown crate 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
556fc40a95 Mark HashSet functions with #[inline] 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
a533504ca1 Add try_reserve to HashSet 2019-04-24 06:54:14 +08:00
Amanieu d'Antras
185ed988d2 Remove the Recover trait for HashSet 2019-04-24 06:54:14 +08:00
Esteban Küber
4c015739ea review comment: change linked ticket 2019-04-23 14:31:42 -07:00
Guillaume Gomez
d676386b1e Fix index-page generation 2019-04-23 22:44:27 +02:00
Eduard-Mihai Burtescu
c3ca9a35be rustc_mir: create the let and "remainder" scopes in source order. 2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
9260305c9e rustc_mir: pretty-print all locals into their respective scopes. 2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
d20da13018 rustc_mir: don't rely on mir::LocalDecl visibility_scopes in the MIR borrowck. 2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
1525dc2146 rustc: dissuade compiler developers from misusing upvar debuginfo. 2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
e6ec968485 rustc_codegen_ssa: rename debuginfo_upvar_decls_ops_sequence to debuginfo_upvar_ops_sequence. 2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
2384e980ad rustc_mir: don't use upvar_decls in the miri validity checks. 2019-04-23 23:35:21 +03:00
Eduard-Mihai Burtescu
c1ec45fb96 rustc_mir: don't use upvar_decls in the generator state transform. 2019-04-23 23:35:20 +03:00
Eduard-Mihai Burtescu
82bd7196c2 rustc: don't track var_hir_id or mutability in mir::UpvarDecl. 2019-04-23 23:35:15 +03:00
Manish Goregaokar
20ea70d335 Update clippy 2019-04-23 13:05:45 -07:00
bors
e938c2b9aa Auto merge of #60211 - Centril:rollup-akw4r85, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59823 ([wg-async-await] Drop `async fn` arguments in async block )
 - #59839 (Warn on unused results for operation methods on nums)
 - #60146 (Update fonts used by rustdoc)
 - #60169 (Warn when ignore-tidy-linelength is present, but no lines are too long)
 - #60177 (Promote rust comments to rustdoc)
 - #60191 (Add f16c target_feature)

Failed merges:

r? @ghost
2019-04-23 19:52:05 +00:00
Mazdak Farrokhzad
0353fa5b90
Rollup merge of #60191 - gnzlbg:f16c, r=alexcrichton
Add f16c target_feature

This is requires for Intel 16-bit half-precision float intrinsics: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=fp16&expand=1769 - see companion stdsimd PR: https://github.com/rust-lang-nursery/stdsimd/pull/737.

LLVM, Wikipedia CPUID page, and the Intel Dev Manual all call this CPUID feature "F16C", but the Intel intrinsics guide calls this "FP16C" - this is probably a bug in the intrinsics guide which we are tracking here: https://github.com/rust-lang-nursery/stdsimd/issues/738

r? @alexcrichton
2019-04-23 21:51:00 +02:00
Mazdak Farrokhzad
b16556efa0
Rollup merge of #60177 - rasendubi:rustdoc-comments, r=varkor
Promote rust comments to rustdoc
2019-04-23 21:50:58 +02:00
Mazdak Farrokhzad
d1b2d6d64d
Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytm
Warn when ignore-tidy-linelength is present, but no lines are too long

It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
2019-04-23 21:50:57 +02:00
Mazdak Farrokhzad
88a1dee03c
Rollup merge of #60146 - Manishearth:font-update, r=QuietMisdreavus
Update fonts used by rustdoc

Our version of Source Serif Pro is pretty old and is causing issues on Linux, see https://bugzilla.mozilla.org/show_bug.cgi?id=1545317 . I took this opportunity to update all of the fonts we use.

r? @steveklabnik @QuietMisdreavus
2019-04-23 21:50:55 +02:00
Mazdak Farrokhzad
2deae591a0
Rollup merge of #59839 - KodrAus:must-use-num, r=sfackler
Warn on unused results for operation methods on nums

From a suggestion by @llogiq

Adds a `#[must_use]` attribute to operation methods on integers that take self by value as the first operand and another value as the second. It makes it clear that these methods return the result of the operation instead of mutating `self`, which is the source of a rather embarrassing bug I had in a codebase of mine recently...

As an example:

```rust
struct Int {
   value: i64,
}

impl Int {
    fn add(&mut self, other: i64) {
        self.value.wrapping_add(other);
    }
}
```

Will produce a warning like:

```
warning: unused return value of `core::num::<impl i64>::wrapping_add` that must be used
 --> src/main.rs:7:7
  |
7 |       self.value.wrapping_add(other);
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_must_use)] on by default
  = note: this returns the result of the operation, without modifying the original
```

If this is something we're on board with, we could do something similar for `f32` and `f64` too. There are probably other methods on integers that make sense.
2019-04-23 21:50:54 +02:00
Mazdak Farrokhzad
62d1574876
Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj
[wg-async-await] Drop `async fn` arguments in async block

Fixes #54716.

This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body.

```
async fn foo(<pattern>: <type>) {
  async move {
  }
} // <-- dropped as you "exit" the fn

// ...becomes...
fn foo(__arg0: <ty>) {
  async move {
    let <pattern>: <ty> = __arg0;
  } // <-- dropped as you "exit" the async block
}
```

However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this.

r? @cramertj
cc @nikomatsakis
2019-04-23 21:50:52 +02:00
David Wood
119e67ac6b
Reduce noise and document test case.
This commit introduces a `assert_drop_order_after_poll` helper function
to the test case for this case to reduce repetitive noise and documents
what each function aims to test.
2019-04-23 18:44:41 +01:00
Jethro Beekman
942831eef4 Debug-print error when using rtunwrap 2019-04-23 10:06:27 -07:00
bors
4eff8526a7 Auto merge of #60155 - davidtwco:issue-59819, r=oli-obk
Suggest dereferencing when `Deref` is implemented.

Fixes #59819.

r? @oli-obk
cc @estebank
2019-04-23 15:54:23 +00:00
Eduard-Mihai Burtescu
61fcbfcd59 rustc_mir: don't rely on mir::UpvarDecl in the MIR borrowck. 2019-04-23 17:27:54 +03:00
bors
fe0a415b4b Auto merge of #60152 - stepnivlk:visit_subpats-removal, r=varkor
Remove `visit_subpats` parameter from `check_pat`

The core idea is to keep track of current ID directly in `EllipsisInclusiveRangePatterns` struct and early return in `check_pat` based on it.

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

r? @varkor
2019-04-23 12:27:38 +00:00
varkor
5ab5806c87 Fix regression in line ending test 2019-04-23 11:44:27 +01:00
varkor
5392f44a92 Remove unnecessary tidy ignore directives 2019-04-23 11:42:15 +01:00
varkor
7f7d15dcc9 Check for other unused tidy check directives 2019-04-23 11:42:15 +01:00