Commit Graph

92813 Commits

Author SHA1 Message Date
Matthew Jasper
4e69d377aa Remove unused MIR visitor methods 2019-04-26 21:47:26 +01:00
Matthew Jasper
22226fa7fb Remove region from borrow place contexts 2019-04-26 21:35:10 +01:00
Matthew Jasper
7ab92cde55 Use visit_terminator_kind when possible 2019-04-26 21:35:10 +01:00
Matthew Jasper
0eeab6b9a6 Remove BasicBlock parameter from mir visitor methods 2019-04-26 21:35:10 +01:00
varkor
a3470c6189 Update handling of Tuple 2019-04-26 21:09:32 +01:00
varkor
283ca7616c Replace &'tcx List<Ty<'tcx>> in Tuple with SubstsRef<'tcx> 2019-04-26 20:57:13 +01:00
varkor
728a2db35e Add expect_ty method to Kind 2019-04-26 20:57:13 +01:00
Dmitry Murzin
d2b4f4d452 Make "Implementations on Foreign Types" items in sidebar link to specific impls 2019-04-26 22:39:00 +03:00
John Kåre Alsaker
0e05a9bb85 Update rustc-rayon version 2019-04-26 19:08:36 +02:00
Matthias Geier
be12ab070d Use "capacity" as parameter name in with_capacity() methods
Closes #60271.
2019-04-26 18:43:24 +02:00
Pietro Albini
c1a45889ce
bootstrap: use correct version numbers for llvm-tools and lldb 2019-04-26 18:25:31 +02:00
Ethan Brierley
fa7ba66e6a Add flatten option for Option<Option<T>>
squashed commit
2019-04-26 16:59:12 +01:00
Josh Stone
b4131e297e Limit internalization in LLVM 8 ThinLTO 2019-04-26 08:58:14 -07:00
Pietro Albini
01334eab17
update release notes for 1.34.1 2019-04-26 16:52:46 +02:00
Michael Woerister
4dc3b99b27 PGO: Add a run-make test that makes sure that PGO profiling data is used by the compiler during optimizations. 2019-04-26 16:52:04 +02:00
Michael Woerister
68b6924363 compiletest: Make the LLVM FileCheck tool available to run-make tests. 2019-04-26 16:52:04 +02:00
Ralf Jung
3280b72bf6 include rustc-std-workspace-alloc in rust-src 2019-04-26 16:19:53 +02:00
bors
597f432489 Auto merge of #60303 - CryZe:patch-6, r=Centril
Stabilize pointer::align_offset

Closes #44488
2019-04-26 12:49:11 +00:00
Christopher Serr
cf9d6672b7 Remove feature gates from std and tests 2019-04-26 12:33:42 +02:00
Christopher Serr
3b1f1a6446
Stabilize pointer::align_offset
Closes #44488
2019-04-26 12:15:12 +02:00
bors
3ee9363786 Auto merge of #60240 - mati865:musl_toolchain, r=alexcrichton
Bootstrap x86_64 musl by itself

It should slightly reduce build time and prepares ground for musl native tests.

NOTE: I haven't tested artifacts yet (only the build).

Can I have double try?

r? @alexcrichton
2019-04-26 07:32:34 +00:00
bors
e8310a7714 Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasper
Add a tidy check for files with over 3,000 lines

Files with a large number of lines can cause issues in GitHub (e.g. https://github.com/rust-lang/rust/issues/60015) and also tend to be indicative of opportunities to refactor into less monolithic structures.

This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in https://github.com/rust-lang/rust/issues/60015#issuecomment-483868594. (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with `// ignore-tidy-filelength`.

Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in https://github.com/rust-lang/rust/issues/60015).
2019-04-26 04:42:10 +00:00
bors
180edc21ee Auto merge of #60296 - Centril:rollup-qh9la7k, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #59734 (Prevent failure in case no space left on device in rustdoc)
 - #59940 (Set cfg(test) when rustdoc is running with --test option)
 - #60134 (Fix index-page generation)
 - #60165 (Add Pin::{into_inner,into_inner_unchecked})
 - #60183 (Chalkify: Add builtin Copy/Clone)
 - #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.)
 - #60247 (Implement Debug for Place using Place::iterate)
 - #60259 (Derive Default instead of new in applicable lint)
 - #60267 (Add feature-gate for f16c target feature)
 - #60284 (Do not allow const generics to depend on type parameters)
 - #60285 (Do not ICE when checking types against foreign fn)
 - #60289 (Make `-Z allow-features` work for stdlib features)

Failed merges:

r? @ghost
2019-04-26 01:51:05 +00:00
Mazdak Farrokhzad
a133caab36
Rollup merge of #60289 - tmandry:allow-features-include-std, r=cramertj
Make `-Z allow-features` work for stdlib features

r? @cramertj
2019-04-26 03:50:26 +02:00
Mazdak Farrokhzad
66645340ed
Rollup merge of #60285 - estebank:icent, r=varkor
Do not ICE when checking types against foreign fn

Fix #60275.
2019-04-26 03:50:25 +02:00
Mazdak Farrokhzad
3a907cee97
Rollup merge of #60284 - varkor:const-param-of-type-param, r=cramertj
Do not allow const generics to depend on type parameters

Fixes https://github.com/rust-lang/rust/issues/60264. In b534cf992d (diff-aeb0880081a991f34aef2ab889e1fb7a), it was suggested that there might be a better place for this error, but as this bug already affects stable, it's probably worth merging this now, and refactoring afterwards (I can open an issue for this).
2019-04-26 03:50:24 +02:00
Mazdak Farrokhzad
4387f99fc5
Rollup merge of #60267 - gnzlbg:f16c_target_feature, r=alexcrichton
Add feature-gate for f16c target feature

r? @alexcrichton
2019-04-26 03:50:22 +02:00
Mazdak Farrokhzad
1738273ac3
Rollup merge of #60259 - sd234678:60181-derive-default-lints, r=Centril
Derive Default instead of new in applicable lint

Closes #60181

As far as I can see, at least within the `src/librustc_lint` directory this is the only place this is applicable.
2019-04-26 03:50:21 +02:00
Mazdak Farrokhzad
4d9d84999e
Rollup merge of #60247 - spastorino:place2_3, r=oli-obk
Implement Debug for Place using Place::iterate

r? @oli-obk
2019-04-26 03:50:20 +02:00
Mazdak Farrokhzad
7560c158f6
Rollup merge of #60225 - Centril:hir-exprkind-use-in-for-loops, r=oli-obk
Introduce hir::ExprKind::Use and employ in for loop desugaring.

In the `for $pat in $expr $block` desugaring we end with a `{ let _result = $match_expr; _result }` construct which makes `for` loops into a terminating scope and affects drop order. The construct was introduced in year 2015 by @pnkfelix in https://github.com/rust-lang/rust/pull/21984.

This PR replaces the construct with `hir::ExprKind::Use(P<hir::Expr>)` which is equivalent semantically but should hopefully be less costly in terms of compile time performance (to be determined).

This is extracted out of 91b0abdfb2 from https://github.com/rust-lang/rust/pull/59288 for easier review and so that the perf implications wrt. `for`-loops can be measured.

r? @oli-obk
2019-04-26 03:50:18 +02:00
Mazdak Farrokhzad
77c5f557cc
Rollup merge of #60183 - tmandry:chalk-builtin-copy-clone, r=scalexm
Chalkify: Add builtin Copy/Clone

r? @nikomatsakis
2019-04-26 03:50:17 +02:00
Mazdak Farrokhzad
8bdb91d9ff
Rollup merge of #60165 - Nemo157:pin-into-inner, r=cramertj
Add Pin::{into_inner,into_inner_unchecked}

These functions are useful for unsafe code that needs to temporarily pull smart pointers out of the `Pin`, e.g. [the change that inspired them](b4361780fa (diff-1a4e0ba4d1b539412ca576411ec6c7c2R258)) is taking a `Pin<Box<dyn Future>>`, turning it into a `*mut dyn Future` via `Box::into_raw(unsafe { Pin::into_inner_unchecked(pin) })` then later dropping this via `drop(Pin::from(Box::from_raw(ptr)))`. This can be accomplished today via `{ let ptr = unsafe { Pin::get_unchecked_mut(pin.as_mut()) } as *mut dyn Future; mem::forget(pin); ptr }`, but this is far more complicated and loses out on the symmetry of using `Box::into_raw` and `Box::from_raw`.

I'll extend the documentation on what guarantees `into_inner_unchecked` needs to uphold once I get some feedback on whether this API is wanted or not.

r? @withoutboats
2019-04-26 03:50:16 +02:00
Mazdak Farrokhzad
878a7d6ea5
Rollup merge of #60134 - GuillaumeGomez:fix-index-page, r=Manishearth
Fix index-page generation

Fixes #60096.

The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons.

r? @rust-lang/rustdoc
2019-04-26 03:50:14 +02:00
Mazdak Farrokhzad
09a7051d28
Rollup merge of #59940 - GuillaumeGomez:rustdoc-test, r=ollie27
Set cfg(test) when rustdoc is running with --test option

Following a [discussion on twitter](https://twitter.com/burntsushi5/status/1117091914199785473), I proposed this change. What do you think about it?

r? @QuietMisdreavus

cc @BurntSushi
2019-04-26 03:50:13 +02:00
Mazdak Farrokhzad
294e89d5fa
Rollup merge of #59734 - GuillaumeGomez:improve-rustdoc-failure, r=ollie27
Prevent failure in case no space left on device in rustdoc

Fixes #59703.

r? @QuietMisdreavus
2019-04-26 03:50:11 +02:00
Nicholas Nethercote
91d5b764ea Remove some unused return values. 2019-04-26 09:48:52 +10:00
Nicholas Nethercote
68f5101cd5 Remove unused DiagnosticOutput::Emitter variant. 2019-04-26 09:48:52 +10:00
varkor
6d7c7940b5 Add comment explaining restriction 2019-04-25 23:29:58 +01:00
varkor
8f78736fee Fix error code description 2019-04-25 23:19:36 +01:00
varkor
7261bd88ac Update existing usages 2019-04-25 22:05:04 +01:00
varkor
2c20c44c92 Split CommonTypes into CommonTypes and CommonLifetimes 2019-04-25 22:04:51 +01:00
Tyler Mandry
0a26789af9 Make -Z allow-features work for stdlib features 2019-04-25 14:03:45 -07:00
varkor
8c3068784c Fix false position on style.rs itself 2019-04-25 21:54:09 +01:00
varkor
b759c2d714 Advise the user on how to suppress the file length tidy error 2019-04-25 21:39:09 +01:00
varkor
aa388f1d11 ignore-tidy-filelength on all files with greater than 3000 lines 2019-04-25 21:39:09 +01:00
varkor
949658345c Add a tidy test for line count 2019-04-25 21:38:47 +01:00
John Kåre Alsaker
d2ff829433 Update variances_of 2019-04-25 22:29:29 +02:00
bors
3991285f55 Auto merge of #59111 - gilescope:generator-better-errors, r=nikomatsakis
Improved error message when type must be bound due to generator.

Fixes #58930.

Keen to get some feedback - is this as minimal as we can get it or is there an existing visitor I could repurpose?
2019-04-25 20:27:16 +00:00
Esteban Küber
6b190d6de5 Do not ICE when checking types against foreign fn 2019-04-25 13:16:21 -07:00
varkor
908a6399bc Add a test for const parameters with type parameters as types 2019-04-25 21:12:17 +01:00