summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2021-06-14Revert "Allow specifying alignment for functions"Felix S. Klock II-97/+42
This reverts commit 448d07683a6defd567996114793a09c9a8aef5df to address issue 85713 on beta.
2021-06-14Add link to issueMark Rousskov-0/+1
2021-06-14Show nicer error when an 'unstable fingerprints' error occursAaron Hill-7/+12
2021-06-14Soft disable incrementalMark Rousskov-1/+6
This disables incremental (i.e., -Cincremental) taking effect unless an environment variable, RUSTC_FORCE_INCREMENTAL, is set to 1 in the environment of the running rustc. Currently incremental causes errors for many users, and we do not have an expectation of being able to quickly fix these errors in a backportable way - so, for now, disable incremental entirely. The user can still opt-in, but this way the majority of users merely get slower builds, not broken builds.
2021-06-12Auto merge of #86229 - cjgillot:crate-hash-beta, r=Mark-Simulacrumbors-6/+31
Integrate attributes as part of the crate hash Backport of #83901 r? `@Mark-Simulacrum`
2021-06-11Hash attributes for crate_hash.Camille GILLOT-6/+31
2021-06-11Preserve `SyntaxContext` for invalid/dummy spans in crate metadataAaron Hill-45/+45
Fixes #85197 We already preserved the `SyntaxContext` for invalid/dummy spans in the incremental cache, but we weren't doing the same for crate metadata. If an invalid (lo/hi from different files) span is written to the incremental cache, we will decode it with a 'dummy' location, but keep the original `SyntaxContext`. Since the crate metadata encoder was only checking for `DUMMY_SP` (dummy location + root `SyntaxContext`), the metadata encoder would treat it as a normal span, encoding the `SyntaxContext`. As a result, the final span encoded to the metadata would change across sessions, even if the crate itself was unchanged. This PR updates our encoding of spans in the crate metadata to mirror the encoding of spans into the incremental cache. We now always encode a `SyntaxContext`, and encode location information for spans with a non-dummy location.
2021-06-11Fix incorrect gating of nonterminals in key-value attributesAaron Hill-2/+5
Fixes #85432 When processing a `#[derive]` or `#[cfg_eval]` attribute, we need to re-parse our attribute target, which requires flattenting all `Nonterminals`. However, this caused us to incorrectly gate on a (flattented) nonterminal in a key-value attribute, which is supposed to be allowed. Since we already perform this gating during the initial parse, we suppress it in `capture_cfg` mode.
2021-06-11Disable the machine outliner by defaultSimonas Kazlauskas-1/+12
This addresses a codegen-issue that needs to be fixed upstream in LLVM. While we wait for the fix, we can disable it. Verified manually that the outliner is no longer run when `-Copt-level=z` is specified, and also that you can override this with `-Cllvm-args=-enable-machine-outliner` if you need it anyway. A regression test is not really feasible in this instance, given that we do not have any minimal reproducers. Fixes #85351
2021-06-09Auto merge of #86036 - nikic:disable-mutable-noalias, r=Mark-Simulacrumbors-10/+3
[beta] Disable mutable noalias for Rust 1.53 Disable mutable noalias for the upcoming release to give this change more time to bake. I believe that was the consensus, and I wanted to make sure we don't forget :) r? `@Mark-Simulacrum`
2021-06-05Disable mutable noalias for Rust 1.53Nikita Popov-10/+3
2021-06-01Revert portion of PR #83521 that injected issue #85435 (and thus exposed ↵Felix S. Klock II-14/+20
underlying issue #85561).
2021-05-22Disallows `#![feature(no_coverage)]` on stable and betaRich Kadel-45/+5
using allow_internal_unstable (as recommended) Fixes: #84836 ```shell $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc src/test/run-make-fulldeps/coverage/no_cov_crate.rs error[E0554]: `#![feature]` may not be used on the dev release channel --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1 | 2 | #![feature(no_coverage)] | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0554`. ```
2021-05-22Do not ICE on invalid const paramEsteban Küber-1/+19
When encountering a path that can't have generics, do not call `generics_of`. This would happen when writing something like `path::this_is_a_mod<const_val>`. Fix #84831.
2021-05-06Account for unsatisfied bounds in E0599Esteban Küber-1/+5
Fix #84769, follow up to #84499, #83667.
2021-05-06Pick candidate with fewer bound varsJack Huey-5/+5
2021-05-06Deduplicate ParamCandidates with the same value except for bound varsJack Huey-1/+11
2021-05-04Revert PR 81473 to resolve (on beta) issues 81626 and 81658.Felix S. Klock II-21/+0
Revert "Add missing brace" This reverts commit 85ad773049536d7fed9a94ae0ac74f97135c8655. Revert "Simplify base_expr" This reverts commit 899aae465eb4ef295dc1eeb2603f744568e0768c. Revert "Warn write-only fields" This reverts commit d3c69a4c0dd98af2611b7553d1a65afef6a6ccb0.
2021-05-04Remove assert_matches feature attributes.Mara Bos-3/+0
2021-05-04Remove assert_matches usersMark Rousskov-17/+5
2021-04-30Auto merge of #84719 - Mark-Simulacrum:reduce-query-impl, r=davidtwcobors-49/+55
Move iter_results to dyn FnMut rather than a generic This means that we're no longer generating the iteration/locking code for each invocation site of iter_results, rather just once per query (roughly), which seems much better: this is a 15% win in instruction counts when compiling the rustc_query_impl crate. The code where this is used also is pretty cold, I suspect; the old solution didn't fully monomorphize either.
2021-04-30Auto merge of #84401 - crlf0710:impl_main_by_path, r=petrochenkovbors-164/+318
Implement RFC 1260 with feature_name `imported_main`. This is the second extraction part of #84062 plus additional adjustments. This (mostly) implements RFC 1260. However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure. cc https://github.com/rust-lang/rust/issues/28937 r? `@petrochenkov`
2021-04-29Rollup merge of #84705 - lcnr:const_generics-rec, r=joshtriplettJack Huey-12/+21
make feature recommendations optional this is what we're already doing for other feature gates, so it's better to be consistent
2021-04-29Rollup merge of #84682 - jackh726:transitive_bounds_rebind, r=nikomatsakisJack Huey-3/+5
Don't rebind in `transitive_bounds_that_define_assoc_type` Fixes #83737 Fixes #84604 Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445) r? `````@nikomatsakis`````
2021-04-29Move iter_results to dyn FnMut rather than a genericMark Rousskov-49/+55
This means that we're no longer generating the iteration/locking code for each invocation site of iter_results, rather just once per query. This is a 15% win in instruction counts when compiling the rustc_query_impl crate.
2021-04-29Auto merge of #84708 - pnkfelix:revert-77885-everywhere, r=Mark-Simulacrumbors-31/+62
Revert PR 77885 everywhere Change to probe-stack=call (instead of inline-or-call) everywhere again, for now. We had already reverted the change on stable back in PR #83412. Since then, we've had some movement on issue #83139, but not a 100% fix. But also since then, we had bug reported, issue #84667, that looks like outright codegen breakage, rather than problems confined to debuginfo issues. So we are reverting PR #77885 on stable and beta. We'll reland PR #77885 (or some variant) switching back to an LLVM-dependent selection of out-of-line call vs inline-asm, after these other issues have been resolved.
2021-04-29Change to probe-stack=call (instead of inline-or-call) everywhere again, for ↵Felix S. Klock II-31/+62
now. We had already reverted the change on stable back in PR #83412. Since then, we've had some movement on issue #83139, but not a 100% fix. But also since then, we had bug reported, issue #84667, that looks like outright codegen breakage, rather than problems confined to debuginfo issues. So we are reverting PR #77885 on stable and beta. We'll reland PR #77885 (or some variant) switching back to an LLVM-dependent selection of out-of-line call vs inline-asm, after these other issues have been resolved.
2021-04-29make feature recommendations optionallcnr-12/+21
2021-04-29Auto merge of #84556 - RalfJung:const-fn-trait-bound, r=oli-obkbors-11/+2
use correct feature flag for impl-block-level trait bounds on const fn I am not sure what that special hack was needed for, but it doesn't seem needed any more... This removes the last use of the `const_fn` feature flag -- Cc https://github.com/rust-lang/rust/issues/84510 r? `@oli-obk`
2021-04-29Auto merge of #84233 - jyn514:track-path-prefix, r=michaelwoeristerbors-181/+245
Add TRACKED_NO_CRATE_HASH and use it for `--remap-path-prefix` I verified locally that this fixes https://github.com/rust-lang/rust/issues/66955. r? `@Aaron1011` (feel free to reassign)
2021-04-29Use doc-comment instad of comments consistentlyJoshua Nelson-58/+59
This makes the comments show up in the generated docs. - Fix markdown formatting
2021-04-29don't let const_fn feature flag affect impl-block-level trait boundsRalf Jung-11/+2
2021-04-29Auto merge of #84684 - jackh726:rollup-qxc5cos, r=jackh726bors-1/+1
Rollup of 11 pull requests Successful merges: - #84484 (Don't rebuild rustdoc and clippy after checking bootstrap) - #84530 (`test tidy` should ignore alternative `build` dir patterns) - #84531 (Ignore commented out lines when finding features) - #84540 (Build sanitizers for x86_64-unknown-linux-musl) - #84555 (Set `backtrace-on-ice` by default for compiler and codegen profiles) - #84585 (Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`) - #84636 (rustdoc: change aliases attribute to data-aliases) - #84646 (Add some regression tests related to #82494) - #84661 (Remove extra word in `rustc_mir` docs) - #84663 (Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead) - #84668 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-28Rollup merge of #84661 - pierwill:patch-1, r=jackh726Jack Huey-1/+1
Remove extra word in `rustc_mir` docs Changes "is includes" to "includes" in `rustc_mir::borrow_check::type_check::type_check`.
2021-04-29Auto merge of #84614 - RalfJung:daily, r=Mark-Simulacrumbors-1/+0
don't enable parking_lot nightly features Having the compiler itself depend on external libraries that use nightly features can lead to "fun" bootstrap situations. Within the rustc repo we use `cfg(bootstrap)` to resolve those, but that is not a reasonable option for external dependencies. So I propose we stop enabling the "nightly" feature of `parking_lot` here. In my experiments, this then indeed leads to the feature not being enabled (i.e., nothing else enables it), and everything still builds. However, this means parking_lot's `RwLock` will no longer have hardware lock elision for readers -- I hope that is okay to lose in exchange for less bootstrap brain twisting. ;) Cc `@Amanieu`
2021-04-29Implement RFC 1260 with feature_name `imported_main`.Charles Lew-164/+318
2021-04-28Don't rebind in transitive_bounds_that_define_assoc_typeJack Huey-3/+1
2021-04-28Auto merge of #83386 - mark-i-m:stabilize-pat2015, r=nikomatsakisbors-49/+25
Stabilize `:pat_param` and remove `:pat2021` Blocked on #83384 cc `@rust-lang/lang` #79278 If I understand `@nikomatsakis` in https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/or.20patterns/near/231133873, another FCP is not needed. r? `@nikomatsakis`
2021-04-28Remove extra word in `rustc_mir` docspierwill-1/+1
Changes "is includes" to "includes" in `rustc_mir::borrow_check::type_check::type_check`.
2021-04-28Add HAS_RE_LATE_BOUND if there are bound varsJack Huey-0/+4
2021-04-28Auto merge of #84562 - richkadel:issue-83601, r=tmandrybors-1/+66
Adds feature-gated `#[no_coverage]` function attribute, to fix derived Eq `0` coverage issue #83601 Derived Eq no longer shows uncovered The Eq trait has a special hidden function. MIR `InstrumentCoverage` would add this function to the coverage map, but it is never called, so the `Eq` trait would always appear uncovered. Fixes: #83601 The fix required creating a new function attribute `no_coverage` to mark functions that should be ignored by `InstrumentCoverage` and the coverage `mapgen` (during codegen). Adding a `no_coverage` feature gate with tracking issue #84605. r? `@tmandry` cc: `@wesleywiser`
2021-04-28Auto merge of #83401 - fee1-dead:master, r=davidtwcobors-7/+10
Fix ICE of for-loop mut borrowck where no suggestions are available Fixes #83309.
2021-04-28Auto merge of #84644 - JohnTitor:rollup-nzq9rjz, r=JohnTitorbors-5/+30
Rollup of 5 pull requests Successful merges: - #84529 (Improve coverage spans for chained function calls) - #84616 (Fix empty dom toggle) - #84622 (Make traits with GATs not object safe) - #84624 (Make sentence in env::args_os' docs plain and simple) - #84642 (Stabilize vec_extend_from_within) Failed merges: - #84636 (rustdoc: change aliases attribute to data-aliases) r? `@ghost` `@rustbot` modify labels: rollup
2021-04-28Rollup merge of #84622 - jackh726:gats-trait-object, r=nikomatsakisYuki Okushi-4/+19
Make traits with GATs not object safe Closes #81823 r? `@nikomatsakis`
2021-04-28Rollup merge of #84529 - richkadel:issue-84180, r=tmandryYuki Okushi-1/+11
Improve coverage spans for chained function calls Fixes: #84180 For chained function calls separated by the `?` try operator, the function call following the try operator produced a MIR `Call` span that matched the span of the first call. The `?` try operator started a new span, so the second call got no span. It turns out the MIR `Call` terminator has a `func` `Operand` for the `Constant` representing the function name, and the function name's Span can be used to reset the starting position of the span. r? `@tmandry` cc: `@wesleywiser`
2021-04-28Auto merge of #83713 - spastorino:revert-pub-macro-rules, r=nikomatsakisbors-12/+13
Revert "Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis" This reverts commit e2561c58a41023a14e0e583113dcf55e1ecb236a, reversing changes made to 2982ba50fc4bb629b8fe4108a81cb2f9b053510b. As discussed in #83641 this feature is not complete and in particular doesn't work cross macros and given that this is not going to be included in edition 2021 nobody seems to be trying to fix the underlying problem. When can add this again I guess, whenever somebody has the time to make it work cross crates. r? `@nikomatsakis`
2021-04-28Auto merge of #84498 - workingjubilee:update-grab-bag, r=Mark-Simulacrumbors-4/+4
Update grab bag This PR slides a bunch of crate versions forward until suddenly a bunch of deps fall out of the tree! In doing so this mostly picks up a version bump in the `redox_users` crate which makes most of the features default to optional. crossbeam-utils 0.7 => 0.8.3 (where applicable) https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-utils/CHANGELOG.md directories 3.0.1 => 3.0.2 ignore 0.4.16 => 0.4.17 tempfile 3.0.5 => tempfile 3.2 Removes constant_time_eq from deps exceptions Removes arrayref from deps exceptions And also removes: - blake2b_simd - const_fn (the package, not the feature) - constant_time_eq - redox_users 0.3.4 - rust-argon2
2021-04-27remove pat2021mark-33/+10
2021-04-27adds feature gating of `no_coverage` at either crate- or function-levelRich Kadel-3/+48
2021-04-27Make traits with GATs not object safeJack Huey-4/+19