about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-06-25Rollup merge of #113023 - GuillaumeGomez:migrate-gui-test-color-17, r=notriddleMatthias Krüger-3/+3
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-06-25Rollup merge of #113007 - ↵Matthias Krüger-1/+27
compiler-errors:dont-structural-resolve-byte-str-pat, r=oli-obk Revert "Structurally resolve correctly in check_pat_lit" This reverts commit 54fb5a48b968b3a329ceeb57226d9ac60f983f04. Also adds a couple of tests, and downgrades the existing `-Ztrait-solver=next` test to a known-bug. Fixes #112993
2023-06-25Migrate GUI colors test to original CSS color formatGuillaume Gomez-3/+3
2023-06-25Rollup merge of #113018 - asquared31415:test_fix, r=TaKO8KiGuillaume Gomez-3/+28
Fix test for #96258 #98644 did not properly test enabling the problematic lint as a warning due to improper use of `compile-flags:` (missing `:`). This makes it use `#![warn]` instead, like in the reproducer. cc #96258
2023-06-25Rollup merge of #112990 - JohnTitor:issue-96699, r=TaKO8KiGuillaume Gomez-0/+87
Add a regression test for #96699 Closes #96699 r? `@BoxyUwU`
2023-06-25Auto merge of #112476 - chenyukang:yukang-fix-109991, r=compiler-errorsbors-0/+99
Do not emit coerce_suggestions for expr from destructuring assignment desugaring Fixes #109991
2023-06-24fix testasquared31415-3/+28
2023-06-25Do not offer any of the suggestions in emit_coerce_suggestions for expr from ↵yukang-0/+99
destructuring assignment desugaring
2023-06-25Rollup merge of #112937 - camelid:align-typenames, r=notriddle,GuillaumeGomezMatthias Krüger-1/+2
rustdoc: Align search results horizontally for easy scanning The recent PR #110688 added info about an item's kind before its name in search results. However, because the kind and name are inline with no alignment, it's now hard to visually scan downward through the search results, looking at item names. This PR fixes that by horizontally aligning search results such that there are now two columns of information. r? `@GuillaumeGomez`
2023-06-24rustdoc: Update GUI testNoah Lev-1/+2
2023-06-24Revert "Structurally resolve correctly in check_pat_lit"Michael Goulet-1/+27
This reverts commit 54fb5a48b968b3a329ceeb57226d9ac60f983f04.
2023-06-24Rollup merge of #112989 - JohnTitor:issue-109141, r=compiler-errorsGuillaume Gomez-0/+39
Add a regression test for #109141 Closes #109141 r? ``@compiler-errors``
2023-06-24Rollup merge of #112854 - bvanjoi:fix-112674, r=NilstriebGuillaume Gomez-3/+59
fix: add cfg diagnostic for unresolved import error Fixes #112674 An easy fix, r? `@Nilstrieb`
2023-06-24Rollup merge of #112703 - aliemjay:next-solver-root-var, r=compiler-errorsGuillaume Gomez-0/+132
[-Ztrait-solver=next, mir-typeck] instantiate hidden types in the root universe Fixes an ICE in the test `member-constraints-in-root-universe`. Main motivation is to make #112691 pass under the new solver. r? ``@compiler-errors``
2023-06-24fix: add cfg diagnostic for unresolved import errorbohan-3/+59
2023-06-24instantiate hidden types in root universeAli MJ Al-Nasrawy-0/+132
2023-06-24Migrate GUI colors test to original CSS color formatGuillaume Gomez-30/+30
2023-06-24Add a regression test for #96699Yuki Okushi-0/+87
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-24Add a regression test for #109141Yuki Okushi-0/+39
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-23Rollup merge of #112983 - spastorino:new-rpitit-23, r=compiler-errorsMichael Goulet-8/+96
Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty This avoid suggesting the associated types generated for RPITITs when the one the code refers to doesn't exist and rustc looks for a suggestion. r? `@compiler-errors`
2023-06-23Rollup merge of #112981 - spastorino:new-rpitit-22, r=compiler-errorsMichael Goulet-24/+286
Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty This just adjust the way we check for RPITITs and uses the new helper method to do the "old" and "new" check at once. r? `@compiler-errors`
2023-06-23Rollup merge of #112973 - compiler-errors:oops-forgot-ftl, r=jyn514Michael Goulet-0/+12
Make sure to include default en-US ftl resources for `rustc_error` crate Fixes #112928
2023-06-23Rollup merge of #112965 - compiler-errors:circular-wf, r=aliemjayMichael Goulet-3/+17
Don't emit same goal as input during `wf::unnormalized_obligations` r? `@aliemjay` cc `@lcnr` I accidentally pruned the logic to handle `WF(?0)` when writing `wf::unnormalized_obligations`. idk if you wanted to construct a test first, but this is an obvious fix. Copied the comment from above. Fixes rust-lang/trait-system-refactor-initiative#36
2023-06-23Rollup merge of #111087 - ibraheemdev:patch-15, r=dtolnayMichael Goulet-79/+59
Implement `Sync` for `mpsc::Sender` `mpsc::Sender` is currently `!Sync` because the previous implementation contained an optimization where the channel started out as single-producer and was dynamically upgraded on the first clone, which relied on a unique reference to the sender. This optimization is one of the main reasons the old implementation was so complex and was removed in #93563. `mpsc::Sender` can now soundly implement `Sync`. Note for any potential confusion, this chance does *not* add MPMC behavior. This only affects the already `Send + Clone` *sender*, not *receiver*. It's technically possible to rely on the `!Sync` behavior in the same way as a `PhantomData<*mut T>`, but that seems very unlikely in practice. Either way, this change is insta-stable and needs an FCP. `@rustbot` label +T-libs-api -T-libs
2023-06-23Auto merge of #112891 - oli-obk:impl_trait_in_assoc_tys_cleanup, ↵bors-45/+254
r=compiler-errors Various impl trait in assoc tys cleanups r? `@compiler-errors` All commits except for the last are pure refactorings. 274dab5bd658c97886a8987340bf50ae57900c39 allows struct fields to participate in deciding whether a function has an opaque in its signature. best reviewed commit by commit
2023-06-23Fix associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-tySantiago Pastorino-8/+96
2023-06-23Auto merge of #112974 - matthiaskrgr:rollup-hnk7ans, r=matthiaskrgrbors-28/+168
Rollup of 8 pull requests Successful merges: - #112616 (Improve tests on targets without unwinding) - #112643 (Always register sized obligation for argument) - #112740 (Add link to rustdoc book search chapter in help popover) - #112810 (Don't ICE on unnormalized struct tail in layout computation) - #112870 (Migrate `item_bounds` to `ty::Clause`) - #112925 (Stop hiding const eval limit in external macros) - #112960 ([tests/rustdoc] Add `@files` command) - #112962 (Fix rustdoc gui tester) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-23Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-tySantiago Pastorino-24/+286
2023-06-23Rollup merge of #112962 - GuillaumeGomez:fix-rustdoc-gui-tester, r=ozkanonurMatthias Krüger-1/+4
Fix rustdoc gui tester Problem was that the `main` was always exiting with `0`, whether or not there was an error. It led to failing GUI tests being ignored in the CI since no one saw them. r? ````@klensy````
2023-06-23Rollup merge of #112960 - GuillaumeGomez:rustdoc-files-check, r=notriddleMatthias Krüger-0/+17
[tests/rustdoc] Add @files command The ``````@!has`````` checks is very problematic as it wouldn't catch if the file scheme is updated and the file is generated again. ``````@files`````` allows to ensure that the given folder contains exactly the provided entries (files and folders). I'm wondering if we should forbid the ``````@!has`````` for files. To be discussed after this PR I suppose. r? `````@notriddle`````
2023-06-23Rollup merge of #112925 - oli-obk:timeout_lint, r=cjgillotMatthias Krüger-0/+40
Stop hiding const eval limit in external macros fixes #112748 We don't emit a hard error if there was a previous deny lint triggering with the same message. If that lint ends up not being emitted, we ICE and don't emit an error either.
2023-06-23Rollup merge of #112810 - compiler-errors:dont-ice-on-bad-layout, r=wesleywiserMatthias Krüger-4/+45
Don't ICE on unnormalized struct tail in layout computation 1. We try to compute a `SizeSkeleton` even if a layout error occurs, but we really only need to do this if we get `LayoutError::Unknown`, since that means our type is too polymorphic to actually compute the full layout. If we have other errors, like `LayoutError::NormalizationError` or `LayoutError::Cycle`, then we can't really make any progress, since this represents an actual error. 2. Avoid using `normalize_erasing_regions` and `struct_tail_erasing_lifetimes` since those ICE on normalization errors, and since we may call `layout_of` in HIR typeck, we don't know for certain that we're on the happy path. Fixes #112736
2023-06-23Rollup merge of #112740 - GuillaumeGomez:link-to-search-chapter, r=notriddleMatthias Krüger-2/+2
Add link to rustdoc book search chapter in help popover One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book. It looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2) r? `@notriddle`
2023-06-23Rollup merge of #112643 - compiler-errors:sized-obl-for-arg, r=wesleywiserMatthias Krüger-18/+56
Always register sized obligation for argument Removes a "hack" that skips registering sized obligations for parameters that are simple identifiers. This doesn't seem to affect diagnostics because we're probably already being smart enough about deduplicating identical error messages anyways. Fixes #112608
2023-06-23Rollup merge of #112616 - ferrocene:pa-more-test-suite-fixes, r=NilstriebMatthias Krüger-3/+4
Improve tests on targets without unwinding This PR makes more miscellaneous changes to tests, to make it work on targets without unwinding support.
2023-06-23Fix GUI test for popoverGuillaume Gomez-2/+2
2023-06-23Make sure to include default en-US ftl resources for rustc_error crateMichael Goulet-0/+12
2023-06-23Auto merge of #109982 - durin42:plt-no-x86_64-only, r=nikicbors-18/+18
rustc_session: default to -Z plt=yes on non-x86_64 Per the discussion in #106380 plt=no isn't a great default, and rust-lang/compiler-team#581 decided that the default should be PLT=yes for everything except x86_64. Not everyone agrees about the x86_64 part of this change, but this at least is an improvement in the state of things without changing the x86_64 situation, so I've attempted making this change in the name of not letting the perfect be the enemy of the good. Please let me know if I've messed this up somehow - I'm not wholly confident I got this right. r? `@nikic`
2023-06-23Resolve vars when reporting WF errorMichael Goulet-6/+6
2023-06-23Don't emit same goal as input during wf obligationsMichael Goulet-1/+15
2023-06-23Fix failing rustdoc GUI testGuillaume Gomez-1/+4
2023-06-23tests: be even more permissive on attributes in one testAugie Fackler-17/+17
2023-06-23Add @files checks in rustdoc testsGuillaume Gomez-0/+17
2023-06-23Rollup merge of #112948 - bkrl:trait-impl-suggestion, r=compiler-errorsMatthias Krüger-4/+4
Avoid guessing unknown trait implementation in suggestions When a trait is used without specifying the implementation (e.g. calling a non-member associated function without fully-qualified syntax) and there are multiple implementations available, use a placeholder comment for the implementation type in the suggestion instead of picking a random implementation. Example: ``` fn main() { let _ = Default::default(); } ``` Previous output: ``` error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> test.rs:2:13 | 2 | let _ = Default::default(); | ^^^^^^^^^^^^^^^^ cannot call associated function of trait | help: use a fully-qualified path to a specific available implementation (273 found) | 2 | let _ = <FileTimes as Default>::default(); | +++++++++++++ + ``` New output: ``` error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> test.rs:2:13 | 2 | let _ = Default::default(); | ^^^^^^^^^^^^^^^^ cannot call associated function of trait | help: use a fully-qualified path to a specific available implementation (273 found) | 2 | let _ = </* self type */ as Default>::default(); | +++++++++++++++++++ + ``` Fixes #112897
2023-06-23Rollup merge of #112941 - tshepang:patch-1, r=lqdMatthias Krüger-1/+1
typo
2023-06-23Rollup merge of #112927 - GuillaumeGomez:where-clause-indent, r=notriddleMatthias Krüger-1/+20
Fix indentation for where clause in rustdoc pages Screenshot of the bug: ![image](https://github.com/rust-lang/rust/assets/3050060/090cfeaa-0edc-46c7-9ea0-e26ac865b2c2) I used this opportunity to clarify the code a bit because some weird things were going on. r? ````@notriddle````
2023-06-22Avoid guessing unknown trait impl in suggestionsAlexander Zhang-4/+4
When a trait is used without specifying the implementation (e.g. calling a non-member associated function without fully-qualified syntax) and there are multiple implementations available, use a placeholder comment for the implementation type in the suggestion instead of picking a random implementation. Example: ``` fn main() { let _ = Default::default(); } ``` Previous output: ``` error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> test.rs:2:13 | 2 | let _ = Default::default(); | ^^^^^^^^^^^^^^^^ cannot call associated function of trait | help: use a fully-qualified path to a specific available implementation (273 found) | 2 | let _ = <FileTimes as Default>::default(); | +++++++++++++ + ``` New output: ``` error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type --> test.rs:2:13 | 2 | let _ = Default::default(); | ^^^^^^^^^^^^^^^^ cannot call associated function of trait | help: use a fully-qualified path to a specific available implementation (273 found) | 2 | let _ = </* self type */ as Default>::default(); | +++++++++++++++++++ + ```
2023-06-22Don't structurally resolve during method ambiguity in probeMichael Goulet-0/+57
2023-06-22tests: be more permissive on attributes in one testAugie Fackler-1/+1
2023-06-22typoTshepang Mbambo-1/+1