Commit graph

92744 commits

Author SHA1 Message Date
Matthias Krüger
f9945f58e2 submodules: update clippy from 9897442f to 8c0e038f
Changes:
````
Rustup for https://github.com/rust-lang/rust/pull/59042
Update pulldown_cmark to 0.5
Only run AppVeyor on r+, try and the master branch
Remove approx_constant known problems
Suppress let_and_return if let has attributes
Add test for or_fun_call macro suggestion
UI test cleanup: Extract needless_range_loop tests
Change "if types change" to "if you later change the type"
````
2019-04-25 13:18:44 +02:00
Mazdak Farrokhzad
4bd36ab64c Introduce hir::ExprKind::Use and employ in for loop desugaring.
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the
same way as '{ let _tmp = expr; _tmp }' does.
2019-04-25 11:51:53 +02:00
bors
112f7e9ac5 Auto merge of #60248 - estebank:macro-comma, r=oli-obk
Add guard for missing comma in macro call suggestion

Fix #60233. Follow up to #58796.

r? @oli-obk
2019-04-25 09:22:30 +00:00
bors
3d720d7e61 Auto merge of #60162 - gnzlbg:uss, r=alexcrichton
Breaking update of stdsimd

This commit updates stdsimd and contains two breaking changes:

* https://github.com/rust-lang-nursery/stdsimd/pull/733
* https://github.com/rust-lang-nursery/stdsimd/pull/586

We already did a crater run of 586 but we should do another one here.

r? @alexcrichton
2019-04-25 06:34:07 +00:00
bors
9aea1163df Auto merge of #60250 - Centril:rollup-d9tehhr, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59560 (MIR generation cleanup)
 - #59697 (tweak unresolved label suggestion)
 - #60038 (Add codegen test for PGO instrumentation.)
 - #60160 (Fix #58270, fix off-by-one error in error diagnostics.)
 - #60185 (Reexport IntErrorKind in std)
 - #60243 (Add regression test for #53249.)

Failed merges:

r? @ghost
2019-04-25 03:44:22 +00:00
Mazdak Farrokhzad
1443f3b4e0
Rollup merge of #60243 - davidtwco:issue-53249, r=cramertj
Add regression test for #53249.

Fixes #53249.

r? @cramertj
2019-04-25 03:05:26 +02:00
Mazdak Farrokhzad
3fffcd3314
Rollup merge of #60185 - NieDzejkob:int-error-kind-reexport, r=rkruppe
Reexport IntErrorKind in std

Currently `IntErrorKind` can only be found in `core`. @Centril confirmed on Discord that this is unintentional (should I r? him in this situation?).

Should there be a test for this? As far as this *specific* situation goes, I don't think so, I'll risk it and say that there's no way this regresses. However, it might be a good idea to have some tool detect public items in `core` that are not reexported in `std`. Does this belong in tidy, or should that be a separate tool? Is there some rustc-specific *linter*? Unless that's entirely a dumb idea, this should probably get an issue.

Note: My local build hasn't finished yet, but it's well past the point where I would expect problems.
2019-04-25 03:05:25 +02:00
Mazdak Farrokhzad
a4ef188ab6
Rollup merge of #60160 - xldenis:fix-overlapping-zero-width-annotation, r=estebank
Fix #58270, fix off-by-one error in error diagnostics.

This fixes #58270 by checking if two diagnostics overlap completely when we're calculating the line offset for each message.
2019-04-25 03:05:24 +02:00
Mazdak Farrokhzad
bb892be98e
Rollup merge of #60038 - michaelwoerister:pgo-updates-2, r=alexcrichton
Add codegen test for PGO instrumentation.

This PR adds a codegen test that makes sure that LLVM actually generates instrumentation code when we enable PGO instrumentation in `rustc`.

The second commit updates a test case to the new commandline option syntax introduced in #59874. Without the fix the test still works, but it confusingly creates a directory called `test.profraw`, which usually is the name of the _file_ where profiling data is collected.
2019-04-25 03:05:22 +02:00
Mazdak Farrokhzad
a552bebaf6
Rollup merge of #59697 - euclio:label-fixes, r=zackmdavis
tweak unresolved label suggestion

Only suggest label names in the same hygiene context, and use a
structured suggestion.

Question for reviewer: Is this the right way to check for label hygiene?
2019-04-25 03:05:20 +02:00
Mazdak Farrokhzad
5440cf1cb6
Rollup merge of #59560 - matthewjasper:mir-generation-cleanup, r=oli-obk
MIR generation cleanup

* Handle the case where the body of a constant is a subtype of the type of the constant (see `mir_static_subtype.rs`).
* Move the evaluation of `ExprKind::Use` into `into.rs`, saving an unnecessary copy.
2019-04-25 03:05:19 +02:00
bors
3d21124839 Auto merge of #59042 - ljedrz:HirIdification_rework_map, r=Zoxc
HirIdification: rework Map

The next iteration of HirIdification (#57578).

- remove `NodeId` from `Entry`
- change `Map::map` to an `FxHashMap<HirId, Entry>`
- base the `NodeId` `Map` methods on `HirId` ones (reverses the current state)
- HirIdify `librustdoc` a little bit (some `NodeId` `Map` methods were converted to work on `HirId`s)

The second change might have performance implications, so I'd do a perf run to be sure it's fine; it simplifies the codebase and shouldn't have an impact as long as the `Map` searches are cached (which is now possible thanks to using `HirId`s).

r? @Zoxc
2019-04-25 00:53:28 +00:00
Esteban Küber
0e505d427a Add guard for missing comma in macro call suggestion 2019-04-24 16:45:29 -07:00
John Kåre Alsaker
5d67618d4c Update inferred_outlives_of 2019-04-25 01:38:54 +02:00
Alexey Shmalko
f29e9a5cb8
Handle common assert! misuses 2019-04-25 02:06:38 +03:00
Tyler Mandry
56ab3e70e7 Add builtin impls for int and float inference vars in chalk 2019-04-24 15:57:43 -07:00
Tyler Mandry
c75e0890be chalkify: Add Copy/Clone builtins 2019-04-24 15:57:03 -07:00
Guillaume Gomez
f199627e69 Remove useless code and update index page test 2019-04-24 23:45:18 +02:00
Guillaume Gomez
feb5a53266 Prevent failure in case no space left on device in rustdoc 2019-04-24 22:31:30 +02:00
Guillaume Gomez
459d677bff Add test for rustdoc cfg(test) feature 2019-04-24 22:26:42 +02:00
David Wood
04023dc22d
Add regression test for #53249. 2019-04-24 20:56:18 +01:00
Guillaume Gomez
8ed2292dbe Set test flag when rustdoc is running with --test option 2019-04-24 21:51:57 +02:00
Wim Looman
a0e0849a3b Add Pin::{into_inner,into_inner_unchecked} 2019-04-24 21:19:41 +02:00
sd234678
ef37f38726 Derive Default for EllipsisInclusiveRangePatterns 2019-04-24 19:38:10 +01:00
Matthew Jasper
e9c687b04a Evaluate hair::ExprKind::Use in into
This avoids some unnecessary moves
2019-04-24 19:38:02 +01:00
Matthew Jasper
ff4d4b277f Allow subtyping of the final expression of a constant
Fixes an ICE for the following code:

fn foo(_ : &()) {}
static X: fn(&'static ()) = foo;
2019-04-24 19:37:56 +01:00
Matthew Jasper
eb37c648d7 Remove incorrect debug assertion in interpret
Cast type may be a subtype of the destination type. There is a later
assertion that they have the same layout.
2019-04-24 19:37:13 +01:00
sd234678
64f7cede8b Derive Default instead of new in applicable lint 2019-04-24 19:35:41 +01:00
ljedrz
37954df1a7 doc: some HirIdification 2019-04-24 19:51:25 +02:00
ljedrz
b71107912d hir: make NodeId methods depend on HirId ones 2019-04-24 19:51:25 +02:00
ljedrz
16fd0f47aa hir: remove NodeId from Entry & simplify Map 2019-04-24 19:51:25 +02:00
Mateusz Mikuła
d402415961 Bootstrap x86_64 musl by itself 2019-04-24 18:12:49 +02:00
bors
e305df1846 Auto merge of #60180 - ehuss:update-cargo-books, r=alexcrichton
Update cargo, books

## cargo

5 commits in b6581d383ed596b133e330011658c6f83cf85c2f..6be12653dcefb46ee7b605f063ee75b5e6cba513
2019-04-16 16:02:11 +0000 to 2019-04-19 15:05:03 +0000
- Improved docs for `maintenance` options (rust-lang/cargo#6863)
- publish-lockfile: Various updates (rust-lang/cargo#6840)
- Treat HTTP/2 stream errors as spurious network errors. (rust-lang/cargo#6861)
- Validate registry token before operations that require it. (rust-lang/cargo#6854)
- Cleanups wrt DYLD_FALLBACK_LIBRARY_PATH handling (rust-lang/cargo#6856)

## reference

2 commits in 98f90ff4de8e588f651f0fb493b5c7496551cd59..2a2de9ce095979978ad7b582daecf94e4070b916
2019-04-06 09:29:08 -0700 to 2019-04-22 10:25:52 -0700
- Remove unused link references. (rust-lang-nursery/reference#560)
- Fix attribute redirects. (rust-lang-nursery/reference#562)

## book

22 commits in b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6..db919bc6bb9071566e9c4f05053672133eaac33e
2019-03-26 16:54:10 -0400 to 2019-04-15 20:11:03 -0400
- Link to chapters mentioned in chapter 12
- Split up a long sentence
- Unclear wording 4.3 (rust-lang/book#1907)
- Corrected error for array out of bounds (rust-lang/book#1900)
- Make lifetime explanation clearer (rust-lang/book#1901)
- Replace `T: 'a + Messenger` with `T: Messenger` (rust-lang/book#1831)
- Update range so matches rust-fmt . (rust-lang/book#1890)
- Adding trailing comma (rust-lang/book#1891)
- point 2018 book redirects to existing pages instead of index (rust-lang/book#1919)
- Update ch04-03-slices.md (rust-lang/book#1921)
- Update link for Russian translation. (rust-lang/book#1915)
- Ch7 layout (rust-lang/book#1917)
- Update the version of mdbook we use in-tree to match rust-lang/rust (rust-lang/book#1912)
- Fix spellingz
- Update listings in ch 19-6 for nostarch
- Add a high-level overview of the changes in this version of the book
- Fix Travis CI badge url (rust-lang/book#1893)
- Redo listing numbers in chapter 19 after removals
- Remove Advanced Lifetimes section completely
- Merge branch 'gh1780'
- Merge remote-tracking branch 'origin/master' into gh1567
- remove lifetime subtyping

## rust-by-example

4 commits in f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d..1ff0f8e018838a710ebc0cc1a7bf74ebe73ad9f1
2019-03-12 15:32:12 -0300 to 2019-04-15 08:15:32 -0300
- Fix borrow so it fails in 2018 edition Fixes rust-lang/rust-by-example#1141 (rust-lang/rust-by-example#1152)
- Replace lvalue and rvalue with place and value (rust-lang/rust-by-example#1160)
- Mutate array in iter_mut() example (rust-lang/rust-by-example#1165)
- Fix a typo ("half" -&gt; "halve") (rust-lang/rust-by-example#1172)

## rustc-guide

8 commits in 464cb5b166378dff64619081dd4c42533a1eb989..99e1b1d53656be08654df399fc200584aebb50e4
2019-03-23 18:39:14 -0500 to 2019-04-20 09:57:54 -0500
- Update BodyId description
- Update test-implementation chapter to current code
- update chalk with new organization
- move to subsection
- fix MovePathIndex link
- Update query chapter for the query macro rewrite
- subchapter with information about `--error-format json`
- Update query-evaluation-model-in-detail.md

## edition-guide

1 commits in b56ddb11548450a6df4edd1ed571b2bc304eb9e6..c413d42a207bd082f801ec0137c31b71e4bfed4c
2019-03-10 10:23:16 +0100 to 2019-04-22 01:14:56 +0200
- fix command (rust-lang-nursery/edition-guide#155)

## embedded-book

1 commits in 7989c723607ef5b13b57208022259e6c771e11d0..de3d55f521e657863df45260ebbca1b10527f662
2019-04-04 12:14:37 +0000 to 2019-04-22 12:58:28 +0000
- Minor fixes  (rust-embedded/book#185)

## nomicon

6 commits in c02e0e7754a76886e55b976a3a4fac20100cd35d..fb29b147be4d9a1f8e24aba753a7e1de537abf61
2019-03-25 16:52:56 -0400 to 2019-04-22 19:10:29 -0400
- Fix link to copy_nonoverlapping (rust-lang-nursery/nomicon#134)
- Various unchecked-uninit improvements (rust-lang-nursery/nomicon#130)
- OOM behaviour in `vec-alloc.md` (rust-lang-nursery/nomicon#133)
- Added missing "things". (rust-lang-nursery/nomicon#131)
- Fix number agreement in subtyping chapter (rust-lang-nursery/nomicon#128)
- Minor improvements (rust-lang-nursery/nomicon#129)
2019-04-24 15:19:57 +00:00
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