| Age | Commit message (Collapse) | Author | Lines |
|
Add allocation information to undefined behaviour errors.
So far I'm looking on information on whether the error messages are suitable.
Fixes #53325.
|
|
add OR_PATTERNS_BACK_COMPAT lint
close https://github.com/rust-lang/rust/issues/83318
|
|
Rollup of 5 pull requests
Successful merges:
- #83535 (Break when there is a mismatch in the type count)
- #83721 (Add a button to copy the "use statement")
- #83740 (Fix comment typo in once.rs)
- #83745 (Add my new email address to .mailmap)
- #83754 (Add test to ensure search tabs behaviour)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add test to ensure search tabs behaviour
It adds a GUI test for https://github.com/rust-lang/rust/pull/80382.
r? ```@jyn514```
|
|
Break when there is a mismatch in the type count
When other errors are generated, there can be a mismatch between the
amount of input types in MIR, and the amount in the function itself.
Break from the comparative loop if this is the case to prevent
out-of-bounds.
Fixes #83499
|
|
normalize mir::Constant differently from ty::Const in preparation for valtrees
Valtrees are unable to represent many kind of constant values (this is on purpose). For constants that are used at runtime, we do not need a valtree representation and can thus use a different form of evaluation. In order to make this explicit and less fragile, I added a `fold_constant` method to `TypeFolder` and implemented it for normalization. Normalization can now, when it wants to eagerly evaluate a constant, normalize `mir::Constant` directly into a `mir::ConstantKind::Val` instead of relying on the `ty::Const` evaluation.
In the future we can get rid of the `ty::Const` in there entirely and add our own `Unevaluated` variant to `mir::ConstantKind`. This would allow us to remove the `promoted` field from `ty::ConstKind::Unevaluated`, as promoteds can never occur in the type system.
cc `@rust-lang/wg-const-eval`
r? `@lcnr`
|
|
Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]`
Fixes #80936.
"spotlight" is not a very specific or self-explaining name.
Additionally, the dialog that it triggers is called "Notable traits".
So, "notable trait" is a better name.
* Rename `#[doc(spotlight)]` to `#[doc(notable_trait)]`
* Rename `#![feature(doc_spotlight)]` to `#![feature(doc_notable_trait)]`
* Update documentation
* Improve documentation
r? `@Manishearth`
|
|
Fix expected/found order on impl trait projection mismatch error
fixes #68561
This PR adds a new `ObligationCauseCode` used when checking the concrete type of an impl trait satisfies its bounds, and checks for that cause code in the existing test to see if a projection's normalized type should be the "expected" or "found" type.
The second commit adds a `peel_derives` to that test, which appears to be necessary in some cases (see projection-mismatch-in-impl-where-clause.rs, which would still give expected/found in the wrong order otherwise). This caused some other changes in diagnostics not involving impl trait, but they look correct to me.
|
|
AngelicosPhosphoros:simplify_binary_and_to_get_better_asm, r=nagisa
Simplify logical operations CFG
This is basically same commit as e38e954a0d249f88d0a55504f70d6055e865a931 which was reverted later in 676953fde9120cda62e4ef2f75a804af7481d6af
In both cases, this changes weren't benchmarked.
e38e954a0d249f88d0a55504f70d6055e865a931 leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/62993)
676953fde9120cda62e4ef2f75a804af7481d6af leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/83623)
|
|
|
|
|
|
Add a test that has the right input to trigger an out-of-bounds
error when in MIR the local_decls and the normalized_input_tys don't
match in amount.
|
|
Stream the dep-graph to a file instead of storing it in-memory.
This is a reimplementation of #60035.
Instead of storing the dep-graph in-memory, the nodes are encoded as they come
into the a temporary file as they come. At the end of a successful the compilation,
this file is renamed to be the persistent dep-graph, to be decoded during the next
compilation session.
This two-files scheme avoids overwriting the dep-graph on unsuccessful or crashing compilations.
The structure of the file is modified to be the sequence of `(DepNode, Fingerprint, EdgesVec)`.
The deserialization is responsible for going to the more compressed representation.
The `node_count` and `edge_count` are stored in the last 16 bytes of the file,
in order to accurately reserve capacity for the vectors.
At the end of the compilation, the encoder is flushed and dropped.
The graph is not usable after this point: any creation of a node will ICE.
I had to retrofit the debugging options, which is not really pretty.
|
|
This is basically same commit as e38e954a0d249f88d0a55504f70d6055e865a931 which was reverted later in 676953fde9120cda62e4ef2f75a804af7481d6af
In both cases, this changes weren't benchmarked.
e38e954a0d249f88d0a55504f70d6055e865a931 leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/62993)
676953fde9120cda62e4ef2f75a804af7481d6af leads to missed optimization described in [this issue](https://github.com/rust-lang/rust/issues/83623)
Also it changes some src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump* files automatically.
|
|
test: add more cases
test: add comments
refine msg
|
|
|
|
Add a regression test for issue-68830
Closes #68830
|
|
Add regression tests for #79825 and #81555
Closes #79825.
Closes #81555.
`@rustbot` label A-proc-macros T-compiler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove hir::CrateItem.
The crate span is exactly the crate module's inner span. There is no need to store it twice.
|
|
|
|
|
|
Run LLVM coverage instrumentation passes before optimization passes
This matches the behavior of Clang and allows us to remove several
hacks which were needed to ensure functions weren't optimized away
before reaching the instrumentation pass.
Fixes #83429
cc `@richkadel`
r? `@tmandry`
|
|
Add a regression test for issue-75801
Closes #75801
r? ``@Aaron1011``
|
|
Do not emit a suggestion that causes the E0632 error
Fixes #83606
|
|
|
|
Replace tabs in err messages before rendering
This is done in other call sites, but was missing in one place.
Fixes #83638
|
|
Avoid invoking queries inside `check_paths`, since we are holding a lock
to the reconstructed graph.
|
|
Suggest box/pin/arc ing receiver on method calls
_Extracted from https://fasterthanli.me/articles/pin-and-suffering_
|
|
Add a regression test for issue-82865
Closes #82865
r? `@petrochenkov`
|
|
|
|
|
|
When the problem for a method not being found in its receiver is due to
arbitrary self-types, we don't want to mention importing or implementing
the trait, instead we suggest wrapping.
|
|
|
|
This matches the behavior of Clang and allows us to remove several
hacks which were needed to ensure functions weren't optimized away
before reaching the instrumentation pass.
|
|
|
|
Add a regression test for issue-82792
Closes #82792
r? ``@lcnr``
|
|
Lint on unknown intra-doc link disambiguators
|
|
|
|
Riscv64linux Test fixes
Get tests passing again using the riscv64gc-unknown-linux-gnu docker image.
Test with
```
src/ci/docker/run.sh riscv64gc-linux
```
## linkcheck
Linkcheck tests that interdocument links in the documentation are correct. Some interdocument links go between rustc and tools (such as rustdoc and cargo). When cross compiling, rustc is built for the host while some tools are built for the target. This goes for the documentation too. Because of this, links in the rustc documentation reffering to cargo or rustdoc documentation look broken.
This issue is worked around by disabling linkcheck for cross compilation builds.
## run-make tests
#78911 seems to happen because `--target` was not passed to `rustc`, but the target linker was specified, causing the target linker to be called with options intended for the host.
Resolves #78911
In a separate issue, `issue-36710` was trying to run a binary built for the target on the host system. This will not work for any platform using `remote-test-server`/`client` (such as riscv64). I don't know of a way of skipping those platforms specifically, so I set this test to skip only on riscv64 for now.
|
|
This is done in other call sites, but was missing in one place.
Fixes #83638
|
|
|