summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-08-24ci: bump release channel to stablePietro Albini-1/+1
2020-08-24stage0: use production artifactsPietro Albini-4/+4
2020-08-21Fix fortanix buildMark Rousskov-1/+1
2020-08-20Drop reviewers for toolstate embedded bookMark Rousskov-2/+1
2020-08-20Don't immediately error for cycles during normalizationMatthew Jasper-90/+176
2020-08-20allow escaping bound vars when normalizing `ty::Opaque`Bastian Kauschke-9/+17
2020-08-20Add UI test for issue 74933Gary Guo-0/+38
2020-08-20Fix regionck failure when converting Index to IndexMutGary Guo-13/+24
2020-08-09Auto merge of #74966 - jumbatm:allow-clashing-extern-decl, r=Mark-Simulacrumbors-1/+1
[beta] Make ClashingExternDeclarations Allow by default. As per https://github.com/rust-lang/rust/pull/73990#issuecomment-666457338, this PR changes `clashing_extern_declarations` to allow-by-default to sidestep current false positives & negatives on the beta branch. Note that the changes to fix the issue properly have been merged to master (see #73990), but those changes will have to arrive on the next release train.
2020-08-07typeck: check for infer before type impls traitDavid Wood-0/+22
This commit checks that the target type of the cast (an error related to which is being reported) does not have types to be inferred before checking if it implements the `From` trait. Signed-off-by: David Wood <david@davidtw.co>
2020-08-07improper_ctypes_definitions: allow `Box`David Wood-64/+58
This commit stops linting against `Box` in `extern "C" fn`s for the `improper_ctypes_definitions` lint - boxes are documented to be FFI-safe. Signed-off-by: David Wood <david@davidtw.co>
2020-08-07Don't panic if the lhs of a div by zero is not statically knownOliver Scherer-9/+42
2020-08-07lint: use `transparent_newtype_field` to avoid ICEDavid Wood-16/+30
This commit re-uses the `transparent_newtype_field` function instead of manually calling `is_zst` on normalized fields to determine which field in a transparent type is the non-zero-sized field, thus avoiding an ICE. Signed-off-by: David Wood <david@davidtw.co>
2020-08-07rustbuild: drop tool::should_installMarc-Antoine Perennou-24/+5
Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-08-07Use `ReEmpty(U0)` as the implicit region bound in typeckMatthew Jasper-10/+102
2020-08-07Add the aarch64-apple-darwin targetJake Goulding-1/+35
This is a basic copy-paste-modify from the existing x86_64-apple-darwin target.
2020-08-07ci: disable Azure Pipelines except for macOSPietro Albini-296/+3
2020-08-07ci: upload non-macOS from GHA instead of Azure PipelinesPietro Albini-7/+25
2020-08-07ci: allow RLA to pick the right PR numberPietro Albini-0/+9
2020-08-07rustc_target: Add a target spec option for disabling `--eh-frame-hdr`Vadim Petrochenkov-8/+24
2020-08-07Fix #[track_caller] shims for trait objects.Adam Perry-1/+24
We were missing an Instance::resolve_for_fn_ptr in resolve_for_vtable. Closes #74764.
2020-08-07tweak error messageBastian Kauschke-10/+10
2020-08-07forbid `#[track_caller]` on mainBastian Kauschke-1/+70
2020-08-07Forbid non-derefable types explicitly in unsizing castsYuki Okushi-1/+31
2020-07-31Make ClashingExternDeclarations Allow by default.jumbatm-1/+1
2020-07-22Rollup merge of #74418 - rye:gha-dedup-shell-setting, r=pietroalbiniManish Goregaokar-51/+4
ci: Set `shell: bash` as a default, remove duplicates A follow-up to #74406, this commit merely removes the `shell: bash` lines where they were added in favor of setting defaults for *all* "run" steps in the jobs that run the tests. The changes in #74406 were needed because of an upstream change to the `windows-2019` GitHub Actions image. Previously, the configuration worked fine without specifying `shell: bash`, but for some reason this broke with a new change that was deployed today. The preceding PR was a hotfix to get CI passing, but there was a slightly less duplicative way to specify the default shell for the jobs, which was to set the `defaults.run` option. This change applies to the `pr`, `try`, `auto`, and `auto-fallible` jobs, which are derived from the YAML-anchor `base-ci-job`. I did not apply these changes to the `master`, `try-success`, `try-failure`, `auto-success`, or `auto-failure` jobs because they have only a few steps. cc/r? @Mark-Simulacrum
2020-07-22Rollup merge of #74406 - Mark-Simulacrum:fix-windows-maybe, r=Mark-SimulacrumManish Goregaokar-0/+20
Set shell for github actions CI r? @pietroalbini but because this seems at worst harmless and CI is broken self approving
2020-07-21[beta] Update cargoEric Huss-0/+0
2020-07-15Cherry-pick non-nightly rustfmt fixesMark Rousskov-22/+0
2020-07-14Dummy function to re-add const_transmute feature gateMark Rousskov-1/+5
2020-07-141.46 betaMark Rousskov-6/+6
2020-07-14Auto merge of #73490 - CAD97:range-unchecked-stepping, r=Amanieubors-12/+12
Use step_unchecked more liberally in range iter impls Without these `_unchecked`, these operations on iterators of `char` fail to optimize out the unreachable panicking condition on overflow. cc @cuviper https://github.com/rayon-rs/rayon/pull/771 where this was discovered.
2020-07-13Rollup merge of #74286 - PankajChaudhary5:E0688, r=GuillaumeGomezManish Goregaokar-1/+38
Added detailed error code explanation for issue E0688 in Rust compiler. Added proper error explanation for issue E0688 in the Rust compiler. Error Code E0688 Sub Part of Issue #61137 r? @GuillaumeGomez
2020-07-13Rollup merge of #74285 - wangtheo:issue-71669, r=lcnrManish Goregaokar-0/+146
#71669: add ui, codegen tests for volatile + nearby int intrinsics Added some tests for intrinsics. See https://github.com/rust-lang/rust/issues/71669.
2020-07-13Rollup merge of #74147 - dennis-hamester:fix/issue-74134, r=jyn514Manish Goregaokar-0/+52
rustdoc: Allow linking from private items to private types Fixes #74134 After PR #72771 this would trigger an intra_doc_link_resolution_failure warning when rustdoc is invoked without --document-private-items. Links from private items to private types are however never actually generated in that case and thus shouldn't produce a warning. These links are in fact a very useful tool to document crate internals. Tests are added for all 4 combinations of public/private items and link targets. Test 1 is the case mentioned above and fails without this commit. Tests 2 - 4 passed before already but are added nonetheless to prevent regressions.
2020-07-13Rollup merge of #74123 - GuillaumeGomez:cleanup-e0718, r=pickfireManish Goregaokar-3/+2
clean up E0718 explanation r? @Dylan-DPC
2020-07-13Rollup merge of #74046 - ehuss:deny-warnings-caching, r=Mark-SimulacrumManish Goregaokar-4/+18
Fix caching issue when building tools. This fixes a problem with tool builds not being cached properly. #73297 changed it so that Clippy will participate in the "deny warnings" setting. Unfortunately this causes a problem because Clippy shares the build directory with other tools which do not participate in "deny warnings". Because Cargo does not independently cache artifacts based on different RUSTFLAGS settings, it causes all the shared dependencies to get rebuilt if Clippy ever gets built. The solution here is to stop using RUSTFLAGS, and just sneak the settings in through the rustc wrapper. Cargo won't know about the different settings, so it will not bust the cache. This should be safe since lint settings on dependencies are ignored. This is how things used to work in the past before #64316. Alternate solutions: * Treat Clippy as a "submodule" and don't enforce warnings on it. This was the behavior before #73297. The consequence is that if a warning sneaks into clippy, that the clippy maintainers will need to fix it when they sync clippy back to the clippy repo. * Just deny warnings on all tools (removing the in-tree/submodule distinction). This is tempting, but with some issues (cc #52336): * Adding or changing warnings in rustc can be difficult to land because tools have to be updated if they trip the warning. In practice, this isn't too bad. Cargo (and rustfmt) already runs with `deny(warnings)`, so this has been the de-facto standard already (although they do not use the extra lints like `unused_lifetimes`). * Teach Cargo to add flags to the workspace members, but not dependencies. * Teach Cargo to add flags without fingerprinting them? * Teach Cargo to independently cache different RUSTFLAGS artifacts (this was [reverted](https://github.com/rust-lang/cargo/pull/7417) due to complications). This would also unnecessarily rebuild dependencies, but would avoid cache thrashing. * Teach Cargo about lint settings. Closes #74016
2020-07-13Rollup merge of #73867 - poliorcetics:union-keyword, r=joshtriplettManish Goregaokar-2/+66
Document the union keyword Partial fix of #34601. This documents the `union` keyword by presenting three cases: simply using a union, matching on a union and referencing the fields of a union. @rustbot modify labels: T-doc,C-enhancement
2020-07-13Rollup merge of #73852 - euclio:rustdoc-attr-newlines, r=GuillaumeGomezManish Goregaokar-10/+15
rustdoc: insert newlines between attributes Fixes #73205.
2020-07-13Remove trailing whitespacewangtheo-0/+1
2020-07-13Merge branch 'master' into E0688Pankaj Chaudhary-54860/+240428
2020-07-13Added proper explanation of ErrorCode-E0688PankajChaudhary5-1/+38
2020-07-13Removed trailing whitespaceTeddy_Wang-1/+1
2020-07-13Added ui tests for volatile and nearby intrinsicsTeddy_Wang-0/+72
2020-07-12Added tests for volatile and nearbyint intrinsicsTeddy_Wang-0/+73
2020-07-11Correctly sort const_fn_transmuteManish Goregaokar-1/+1
2020-07-11Rollup merge of #74241 - RalfJung:miri, r=RalfJungManish Goregaokar-8/+8
update miri This incorporates https://github.com/rust-lang/miri/pull/1474. [Last time](https://github.com/rust-lang/rust/pull/74146) that change caused trouble but I fixed xargo since then and [now it should work](https://github.com/rust-lang/rust/pull/74146#issuecomment-657051446). Cc @rust-lang/miri r? @ghost
2020-07-11Rollup merge of #74240 - da-x:fix-74081, r=ManishearthManish Goregaokar-1/+29
Fix #74081 and add the test case from #74236
2020-07-11Rollup merge of #74213 - pickfire:patch-1, r=jonas-schievinkManish Goregaokar-3/+1
Minor refactor for rustc_resolve diagnostics match Use `matches!` instead of old `if let`
2020-07-11Rollup merge of #74197 - estebank:self-sugg, r=petrochenkovManish Goregaokar-5/+5
Reword incorrect `self` token suggestion