about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-06-20rustdoc: generate implementors for all auto traitsSimonas Kazlauskas-83/+24
Previously we would only generate a list of synthetic implementations for two well known traits – Send and Sync. With this patch all the auto traits known to rustc are considered. This includes such traits like Unpin and user’s own traits. Sadly the implementation still iterates through the list of crate items and checks them against the traits, which for non-std crates containing their own auto-traits will still not include types defined in std/core. It is an improvement nontheless.
2019-06-20Rollup merge of #61968 - eddyb:hir-noclone, r=petrochenkovMazdak Farrokhzad-576/+567
rustc: disallow cloning HIR nodes. Besides being inefficient, cloning also risks creating broken HIR (without properly recreating all the IDs and whatnot, in which case you might as well reconstruct the entire node without ever `Clone`-ing anything). We detect *some* detrimental situations (based on the occurrence of `HirId`s, I believe?), but it's better to statically disallow it, IMO. One of the examples that is fixed by this PR is `tcx.hir().fn_decl{,_by_hir_id}`, which was cloning an entire `hir::FnDecl` *every single time it was called*. r? @petrochenkov cc @rust-lang/compiler
2019-06-20Rollup merge of #61782 - Electron-libre:suggest_tuple_struct_syntax, r=estebankMazdak Farrokhzad-34/+63
suggest tuple struct syntax refs #57242
2019-06-20Rollup merge of #60772 - timvermeulen:slice_iter_nth_back, r=scottmcmMazdak Farrokhzad-21/+68
Implement nth_back for slice::{Iter, IterMut} Part of #54054. I implemented `nth_back` as straightforwardly as I could, and then slightly changed `nth` to match `nth_back`. I believe I did so correctly, but please double-check 🙂 I also added the helper methods `zst_shrink`, `next_unchecked`, and `next_back_unchecked` to get rid of some duplicated code. These changes hopefully make this code easier to understand for new contributors like me. I noticed the `is_empty!` and `len!` macros which sole purpose seems to be inlining, according to the comment right above them, but the `is_empty` and `len` methods are already marked with `#[inline(always)]`. Does that mean we could replace these macros with method calls, without affecting anything? I'd love to get rid of them.
2019-06-20Rollup merge of #60454 - acrrd:issues/54054_skip, r=scottmcmMazdak Farrokhzad-0/+48
Add custom nth_back to Skip Implementation of nth_back for Skip. Part of #54054
2019-06-20Auto merge of #60341 - mtak-:macos-tlv-workaround, r=alexcrichtonbors-237/+196
macos tlv workaround fixes: #60141 Includes: * remove dead code: `requires_move_before_drop`. This hasn't been needed for a while now (oops I should have removed it in #57655) * redox had a copy of `fast::Key` (not sure why?). That has been removed. * Perform a `read_volatile` on OSX to reduce `tlv_get_addr` calls per `__getit` from (4-2 depending on context) to 1. `tlv_get_addr` is relatively expensive (~1.5ns on my machine). Previously, in contexts where `__getit` was inlined, 4 calls to `tlv_get_addr` were performed per lookup. For some reason when `__getit` is not inlined this is reduced to 2x - and performance improves to match. After this PR, I have only ever seen 1x call to `tlv_get_addr` per `__getit`, and macos now benefits from situations where `__getit` is inlined. I'm not sure if the `read_volatile(&&__KEY)` trick is working around an LLVM bug, or a rustc bug, or neither. r? @alexcrichton
2019-06-19Auto merge of #61947 - estebank:ice-ice-revolution, r=matthewjasperbors-1/+34
Fix ICE involving mut references Fix #61623, fix #61944, fix #61751.
2019-06-19Auto merge of #61967 - lzutao:clippy-update, r=oli-obkbors-7/+7
submodules: Update clippy from 868f168c to 149a988 r? @oli-obk
2019-06-19fix compile-fail test for targets without thread localstyler-4/+3
2019-06-19rustc: disallow cloning HIR nodes.Eduard-Mihai Burtescu-474/+476
2019-06-19rustc: replace `GenericArgs::with_generic_args` hack with a plain getter.Eduard-Mihai Burtescu-102/+91
2019-06-19fix indentationCedric-4/+4
2019-06-19Update clippy from 868f168c to 149a988Lzu Tao-7/+7
2019-06-19review commentEsteban Küber-1/+1
2019-06-19Rollup merge of #61940 - spastorino:place-ty-iterate, r=oli-obkMazdak Farrokhzad-7/+19
Make Place::ty iterate r? @oli-obk Related to Place 2.0
2019-06-19Rollup merge of #61861 - topecongiro:rustfmt-1.3.0, r=topecongiroMazdak Farrokhzad-5/+21
Update rustfmt and rls This PR bumps the version of rustfmt to 1.3.0.
2019-06-19Rollup merge of #61547 - petrochenkov:cfgen, r=CentrilMazdak Farrokhzad-106/+111
Support `cfg` and `cfg_attr` on generic parameters `cfg` attributes are supported in all other positions where attributes are accepted at all. They were previously prohibited in https://github.com/rust-lang/rust/pull/51283 because they weren't implemented correctly before that and were simply ignored.
2019-06-19Rollup merge of #60667 - oli-obk:raw_from_raw_parts, r=sfacklerMazdak Farrokhzad-16/+50
Add functions for building raw slices to libcore implement https://github.com/rust-lang/rust/issues/36925
2019-06-19Update rustfmt and rlstopecongiro-5/+21
Update rustfmt to 1.3.0.
2019-06-19Auto merge of #61172 - matthewjasper:cleanup-implied-bounds-lint, r=varkorbors-548/+3429
Improve the explicit_outlives_requirements lint * Don't use Strings to compare parameters * Extend the lint to lifetime bounds * Extend the lint to enums and unions * Use the correct span for where clauses in tuple structs * Try to early-out where possible * Remove unnecessary bounds in rustc crates
2019-06-19Auto merge of #58351 - oli-obk:double_check_const_eval, r=RalfJungbors-197/+758
Refactor interning to properly mark memory as mutable or immutable r? @RalfJung This implementation is incomplete out of multiple reasons * [ ] add `-Zunleash_the_miri_inside_of_you` tests * [ ] report an error if there's an `UnsafeCell` behind a reference in a constant * [ ] make validity checks actually test whether the mutability of their allocations match what they see in the type
2019-06-19packed -> repr(packed)Oliver Scherer-1/+1
2019-06-19Fix comment about alignmentsOliver Scherer-2/+2
2019-06-19provide variant definition on tuple struct unknow field errorCedric-3/+11
2019-06-19Remove now-unnecessary lifetimeOliver Scherer-1/+1
2019-06-19adt hint pointing to adt spanCedric-10/+9
2019-06-19More FIXMEsOliver Scherer-0/+1
2019-06-19Support `cfg` and `cfg_attr` on generic parametersVadim Petrochenkov-106/+111
2019-06-19Explain existance of `Align` fieldOliver Scherer-1/+4
2019-06-19Weave the alignment through `ByRef`Oliver Scherer-42/+41
2019-06-19Outright ignore any alignment in `const_field`Oliver Scherer-8/+4
2019-06-19Update ui test outputOliver Scherer-1/+1
2019-06-19Elaborate some more on what mutability field means whatOliver Scherer-0/+8
2019-06-19Update to `TyCtxt` lifetime changesOliver Scherer-10/+10
2019-06-19Fix typoOliver Scherer-1/+1
2019-06-19The future is nowOliver Scherer-4/+0
2019-06-19s/intern/intern_shallow/Oliver Scherer-4/+5
2019-06-19Add and update more testsOliver Scherer-1/+28
2019-06-19Elaborate on a commentOliver Scherer-0/+2
2019-06-19Merge `StaticMut` and `Static` logicOliver Scherer-6/+6
2019-06-19Fix rebase falloutOliver Scherer-8/+8
2019-06-19Elaborate on why we don't look at frozennessOliver Scherer-0/+2
2019-06-19Don't ICE when pattern matching packed structsOliver Scherer-2/+24
2019-06-19Prevent cyclic locks of `alloc_map`Oliver Scherer-1/+4
2019-06-19Make interning explicitly care about types and the mutability of memoryOliver Scherer-172/+668
2019-06-19Fixmes and style fixesOliver Scherer-0/+5
2019-06-19Add functions to build raw slicesOliver Scherer-16/+50
2019-06-19Auto merge of #61945 - Centril:rollup-xdqo2mn, r=Centrilbors-923/+966
Rollup of 11 pull requests Successful merges: - #61505 (Only show methods that appear in `impl` blocks in the Implementors sections of trait doc pages) - #61701 (move stray run-pass const tests into const/ folder) - #61748 (Tweak transparent enums and unions diagnostic spans) - #61802 (Make MaybeUninit #[repr(transparent)]) - #61839 (ci: Add a script for generating CPU usage graphs) - #61842 (Remove unnecessary lift calls) - #61843 (Turn down the myriad-closures test) - #61896 (rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.) - #61898 (syntax: Factor out common fields from `SyntaxExtension` variants) - #61938 (create an issue for miri even in status test-fail) - #61941 (Preserve generator and yield source for error messages) Failed merges: r? @ghost
2019-06-18Fix ICE involving mut referencesEsteban Küber-1/+34
2019-06-19Rollup merge of #61941 - cramertj:no-more-yield-errors, r=centrilMazdak Farrokhzad-129/+222
Preserve generator and yield source for error messages Previously, error messages after HIR lowering all referred to generators and yield, regardless of whether the original source was a generator or an async/await body. This change tracks the kind of each generator and yield source in order to provide appropriately tailored error messages. Fixes #60615.