about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2019-04-26Stabilize pointer::align_offsetChristopher Serr-4/+2
Closes #44488
2019-04-26Auto merge of #60240 - mati865:musl_toolchain, r=alexcrichtonbors-10/+9
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-26Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasperbors-3/+76
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-26Auto merge of #60296 - Centril:rollup-qh9la7k, r=Centrilbors-218/+640
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-26Rollup merge of #60289 - tmandry:allow-features-include-std, r=cramertjMazdak Farrokhzad-19/+35
Make `-Z allow-features` work for stdlib features r? @cramertj
2019-04-26Rollup merge of #60285 - estebank:icent, r=varkorMazdak Farrokhzad-5/+11
Do not ICE when checking types against foreign fn Fix #60275.
2019-04-26Rollup merge of #60284 - varkor:const-param-of-type-param, r=cramertjMazdak Farrokhzad-2/+117
Do not allow const generics to depend on type parameters Fixes https://github.com/rust-lang/rust/issues/60264. In https://github.com/rust-lang/rust/pull/58191/files/b534cf992d0189032207f395c27ed092c89b40c7#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-26Rollup merge of #60267 - gnzlbg:f16c_target_feature, r=alexcrichtonMazdak Farrokhzad-1/+3
Add feature-gate for f16c target feature r? @alexcrichton
2019-04-26Rollup merge of #60259 - sd234678:60181-derive-default-lints, r=CentrilMazdak Farrokhzad-16/+4
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-26Rollup merge of #60247 - spastorino:place2_3, r=oli-obkMazdak Farrokhzad-52/+86
Implement Debug for Place using Place::iterate r? @oli-obk
2019-04-26Rollup merge of #60225 - Centril:hir-exprkind-use-in-for-loops, r=oli-obkMazdak Farrokhzad-52/+92
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 https://github.com/rust-lang/rust/pull/59288/commits/91b0abdfb23f980d2e5d5c30bc65ed8e95b04788 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-26Rollup merge of #60183 - tmandry:chalk-builtin-copy-clone, r=scalexmMazdak Farrokhzad-38/+208
Chalkify: Add builtin Copy/Clone r? @nikomatsakis
2019-04-26Rollup merge of #60165 - Nemo157:pin-into-inner, r=cramertjMazdak Farrokhzad-0/+34
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](https://github.com/Nemo157/futures-rs/commit/b4361780faf764c7cb046ed75f863a6fcfd44800#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-26Rollup merge of #60134 - GuillaumeGomez:fix-index-page, r=ManishearthMazdak Farrokhzad-30/+18
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-26Rollup merge of #59940 - GuillaumeGomez:rustdoc-test, r=ollie27Mazdak Farrokhzad-0/+28
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-26Rollup merge of #59734 - GuillaumeGomez:improve-rustdoc-failure, r=ollie27Mazdak Farrokhzad-3/+4
Prevent failure in case no space left on device in rustdoc Fixes #59703. r? @QuietMisdreavus
2019-04-25Add comment explaining restrictionvarkor-4/+10
2019-04-25Fix error code descriptionvarkor-2/+5
2019-04-25Make `-Z allow-features` work for stdlib featuresTyler Mandry-19/+35
2019-04-25Fix false position on style.rs itselfvarkor-8/+11
2019-04-25Advise the user on how to suppress the file length tidy errorvarkor-1/+7
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+52
2019-04-25Add a tidy test for line countvarkor-3/+15
2019-04-25Auto merge of #59111 - gilescope:generator-better-errors, r=nikomatsakisbors-35/+135
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-25Do not ICE when checking types against foreign fnEsteban Küber-5/+11
2019-04-25Add a test for const parameters with type parameters as typesvarkor-0/+31
2019-04-25Make sure const params with type params don't cause errors without a feature ↵varkor-0/+25
gate
2019-04-25Prevent const parameters having type parameters as typesvarkor-2/+52
2019-04-25Auto merge of #60192 - t-rapp:tr-saturating-funcs, r=alexcrichtonbors-0/+83
Implement saturating_abs() and saturating_neg() functions for signed integer types Similar to wrapping_abs() / wrapping_neg() functions but saturating at the numeric bounds instead of wrapping around. Complements the existing set of functions with saturation mechanics. cc #59983
2019-04-25Update trait queriesJohn Kåre Alsaker-36/+69
2019-04-25Update trait_impls_ofJohn Kåre Alsaker-4/+4
2019-04-25Update mir_const_qualifJohn Kåre Alsaker-9/+7
2019-04-25Update rvalue_promotable_mapJohn Kåre Alsaker-9/+7
2019-04-25Update region_scope_treeJohn Kåre Alsaker-14/+10
2019-04-25rustc: Flag metadata compatible with multiple CGUsAlex Crichton-3/+2
It looks like the `OutputType::Metadata` kind in the compiler was misclassified in #38571 long ago by accident as incompatible with codegen units and a single output file. This means that if you emit both a linkable artifact and metadata it silently turns off multiple codegen units unintentionally! This commit corrects the situation to ensure that if `--emit metadata` is used it doesn't implicitly disable multiple codegen units. This will ensure we don't accidentally regress compiler performance when striving to implement pipelined compilation!
2019-04-25Improved error message when type must be bound due to generator.Giles Cope-35/+135
Error now mentions type var name and span is highlighted.
2019-04-25Add tests for saturating_abs() and saturating_neg functionsTobias Rapp-0/+27
2019-04-25Add saturating_abs() and saturating_neg() functions to signed integer typesTobias Rapp-0/+56
Similar to wrapping_abs() / wrapping_neg() functions but saturating at the numeric bounds instead of wrapping around. Complements the existing set of functions with saturation mechanics.
2019-04-25Auto merge of #60257 - matthiaskrgr:submodule_upd, r=oli-obkbors-20/+17
submodules: update clippy from 9897442f to 8c0e038f Should fix clippy/rls toolstate breakage 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" ```` r? @oli-obk
2019-04-25Add feature-gate for f16c target featuregnzlbg-1/+3
2019-04-25Implement Debug for Place using Place::iterateSantiago Pastorino-52/+86
2019-04-25Improvement comment explanationsGuillaume Gomez-2/+5
2019-04-25submodules: update clippy from 9897442f to 8c0e038fMatthias Krüger-20/+17
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-25Introduce hir::ExprKind::Use and employ in for loop desugaring.Mazdak Farrokhzad-52/+92
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the same way as '{ let _tmp = expr; _tmp }' does.
2019-04-25Auto merge of #60248 - estebank:macro-comma, r=oli-obkbors-9/+27
Add guard for missing comma in macro call suggestion Fix #60233. Follow up to #58796. r? @oli-obk
2019-04-25Auto merge of #60162 - gnzlbg:uss, r=alexcrichtonbors-0/+0
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-25Auto merge of #60250 - Centril:rollup-d9tehhr, r=Centrilbors-101/+245
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-25Rollup merge of #60243 - davidtwco:issue-53249, r=cramertjMazdak Farrokhzad-0/+47
Add regression test for #53249. Fixes #53249. r? @cramertj
2019-04-25Rollup merge of #60185 - NieDzejkob:int-error-kind-reexport, r=rkruppeMazdak Farrokhzad-0/+7
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-25Rollup merge of #60160 - xldenis:fix-overlapping-zero-width-annotation, ↵Mazdak Farrokhzad-18/+19
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.