| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This reverts commit 448d07683a6defd567996114793a09c9a8aef5df to address
issue 85713 on beta.
|
|
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.
|
|
|
|
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.
|
|
|
|
Test was added in PR #84404.
The intent here is: The `copy`/`copy_overlapping` intrinsics are going through
some flip-flopping now of "are they intrinsics or not". We can achieve the same
effect that the test intended by using `likely`/`unlikely`.
|
|
|
|
This is to address issue 84297.
|
|
[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`
|
|
|
|
remove testing via `-Z thir-unsafeck`, since it is not appropriate for beta branch.
|
|
Apply suggestions from code review:
1. (removing confusing comment from my test, since the comment reflects the bad undesirable behavior that is being fixed here.)
2. test THIR unsafeck too.
Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
|
|
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`.
```
|
|
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.
|
|
Fix #84769, follow up to #84499, #83667.
|
|
|
|
That PR caused multiple test failures when Rust's channel is changed
from nightly to anything else. The commit will have to be landed again
after the test suite is fixed.
|
|
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.
|
|
|
|
|
|
(update: placated tidy)
|
|
|
|
Fixes #84025
|
|
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`
|
|
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`````
|
|
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.
|
|
|
|
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`
|
|
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)
|
|
|
|
|
|
Fix failed tests related to pointer printing when using GDB 10
As mentioned in #79009, there are four failed debuginfo test cases when using GDB 10. This PR fixes two of them, which fail because GDB 10 won't print pointers as string anymore. We can use `printf` as a workaround. It should work regardless of the version of GDB.
Refer this [comment] for more details.
[comment]: https://github.com/rust-lang/rust/issues/79009#issuecomment-826952708
|
|
|
|
|
|
Add some regression tests related to #82494
Closes #75883, closes #80779
r? ````@estebank````
|
|
rustdoc: change aliases attribute to data-aliases
The "aliases" attribute is not listed [on MDN], so it sounds like it's rustdoc-specific. We don't want to conflict with any attributes that are added to the spec in the future.
[on MDN]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
|
|
|
|
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`
|
|
|
|
|
|
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`
|
|
Fix ICE of for-loop mut borrowck where no suggestions are available
Fixes #83309.
|
|
|
|
|
|
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
|
|
Make traits with GATs not object safe
Closes #81823
r? `@nikomatsakis`
|
|
Fix empty dom toggle
Currently, the empty impl blocks have toggles:

So when you expand it, nothing happens:

So now, in case the impl block is empty, we simply don't generate the details/summary wrapping (which also makes DOM lighter, yeay!):

r? `@jsha`
|
|
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`
|
|
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`
|