about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2021-04-02Auto merge of #76881 - hameerabbasi:issue-53325, r=oli-obkbors-158/+1870
Add allocation information to undefined behaviour errors. So far I'm looking on information on whether the error messages are suitable. Fixes #53325.
2021-04-02Auto merge of #83468 - hi-rustin:rustin-patch-lint, r=nikomatsakisbors-0/+84
add OR_PATTERNS_BACK_COMPAT lint close https://github.com/rust-lang/rust/issues/83318
2021-04-02Auto merge of #83781 - JohnTitor:rollup-1vm3dxo, r=JohnTitorbors-0/+52
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
2021-04-02Rollup merge of #83754 - GuillaumeGomez:search-tab-behaviour, r=jyn514Yuki Okushi-0/+21
Add test to ensure search tabs behaviour It adds a GUI test for https://github.com/rust-lang/rust/pull/80382. r? ```@jyn514```
2021-04-02Rollup merge of #83535 - MidasLamb:mir-type-count-mismatch, r=nikomatsakisYuki Okushi-0/+31
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
2021-04-02Auto merge of #83207 - oli-obk:valtree2, r=lcnrbors-25/+25
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`
2021-04-02Auto merge of #80965 - camelid:rename-doc-spotlight, r=jyn514bors-21/+55
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`
2021-04-02Auto merge of #80828 - SNCPlay42:opaque-projections, r=estebankbors-37/+70
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.
2021-04-02Auto merge of #83663 - ↵bors-288/+334
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)
2021-04-02address commentshi-rustin-12/+12
2021-04-01Add test to ensure search tabs behaviourGuillaume Gomez-0/+21
2021-04-01Add a test that triggers the out-of-bounds ICE.Midas Lambrichts-0/+31
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.
2021-04-01Auto merge of #82780 - cjgillot:dep-stream, r=michaelwoeristerbors-9/+9
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.
2021-04-01Simplify logical operations CFGAngelicosPhosphoros-288/+334
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.
2021-04-01add OR_PATTERNS_BACK_COMPAT linthi-rustin-0/+84
test: add more cases test: add comments refine msg
2021-04-01Limit the problematic tests to x86_64.Hameer Abbasi-63/+2
2021-04-01Rollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPCDylan DPC-0/+32
Add a regression test for issue-68830 Closes #68830
2021-04-01Rollup merge of #83015 - hyd-dev:test-79825-81555, r=Aaron1011Dylan DPC-0/+39
Add regression tests for #79825 and #81555 Closes #79825. Closes #81555. `@rustbot` label A-proc-macros T-compiler
2021-03-31Fix tests and AstConv -> dyn AstConvJack Huey-20/+19
2021-03-31Fmt and test revertJack Huey-32/+31
2021-03-31Add var to BoundRegion. Add query to get bound vars for applicable items.Jack Huey-23/+96
2021-03-31Track bound varsJack Huey-36/+57
2021-03-31Revert testsOli Scherer-12/+9
2021-03-31Add a new normalization query just for mir constantsOli Scherer-22/+14
2021-03-31Add a regression test for issue-68830JohnTitor-0/+32
2021-03-31Add 32bit.stderr files.Hameer Abbasi-1/+1443
2021-03-31Make unevaluated DefId rendering deterministicOli Scherer-22/+22
2021-03-31Auto merge of #83684 - cjgillot:csp, r=petrochenkovbors-2/+2
Remove hir::CrateItem. The crate span is exactly the crate module's inner span. There is no need to store it twice.
2021-03-31Rename stderr->64bit.stderr where needed.Hameer Abbasi-155/+178
2021-03-31Add allocation information to undefined behaviour errors.Hameer Abbasi-33/+341
2021-03-31Auto merge of #83666 - Amanieu:instrprof-order, r=tmandrybors-34/+17
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`
2021-03-31Rollup merge of #83671 - JohnTitor:issue-75801-test, r=Dylan-DPCDylan DPC-0/+44
Add a regression test for issue-75801 Closes #75801 r? ``@Aaron1011``
2021-03-31Rollup merge of #83654 - JohnTitor:issue-83606, r=estebankDylan DPC-0/+21
Do not emit a suggestion that causes the E0632 error Fixes #83606
2021-03-30Fix fulldeps tests.Camille GILLOT-2/+2
2021-03-30Auto merge of #83639 - osa1:issue83638, r=estebankbors-0/+14
Replace tabs in err messages before rendering This is done in other call sites, but was missing in one place. Fixes #83638
2021-03-30Fix tests.Camille GILLOT-9/+9
Avoid invoking queries inside `check_paths`, since we are holding a lock to the reconstructed graph.
2021-03-30Rollup merge of #83667 - estebank:cool-bears-hot-tip, r=lcnrDylan DPC-91/+79
Suggest box/pin/arc ing receiver on method calls _Extracted from https://fasterthanli.me/articles/pin-and-suffering_
2021-03-30Rollup merge of #83656 - JohnTitor:resolve-test, r=petrochenkovDylan DPC-0/+34
Add a regression test for issue-82865 Closes #82865 r? `@petrochenkov`
2021-03-30Add a regression test for issue-75801JohnTitor-0/+44
2021-03-30Apply review feedbackAmanieu d'Antras-77/+89
2021-03-29Hide unnecessary reference to traitEsteban Küber-3/+0
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.
2021-03-29Suggest box/pin/arc ing receiver on method callsEsteban Küber-91/+82
2021-03-30Run LLVM coverage instrumentation passes before optimization passesAmanieu d'Antras-113/+84
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.
2021-03-30Add a regression test for issue-82865JohnTitor-0/+34
2021-03-30Rollup merge of #83636 - JohnTitor:const-generics-defualts-regg-test, r=lcnrDylan DPC-52/+66
Add a regression test for issue-82792 Closes #82792 r? ``@lcnr``
2021-03-30Rollup merge of #83543 - camelid:lint-unknown-disambiguator, r=jyn514Dylan DPC-0/+58
Lint on unknown intra-doc link disambiguators
2021-03-30Do not emit a suggestion that causes the E0632 errorJohnTitor-0/+21
2021-03-29Auto merge of #80839 - tblah:riscv64linux_links, r=Mark-Simulacrumbors-13/+20
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.
2021-03-29Replace tabs in err messages before renderingÖmer Sinan Ağacan-0/+14
This is done in other call sites, but was missing in one place. Fixes #83638
2021-03-29Prefer 4 spacesJohnTitor-52/+52