about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-07-05Auto merge of #113370 - compiler-errors:rollup-8gvyy8e, r=compiler-errorsbors-25/+392
Rollup of 8 pull requests Successful merges: - #113010 (rust-installer & rls: remove exclusion from rustfmt & tidy ) - #113317 ( -Ztrait-solver=next: stop depending on old solver) - #113319 (`TypeParameterDefinition` always require a `DefId`) - #113320 (Add some extra information to opaque type cycle errors) - #113321 (Move `ty::ConstKind` to `rustc_type_ir`) - #113337 (Winnow specialized impls during selection in new solver) - #113355 (Move most coverage code out of `rustc_codegen_ssa`) - #113356 (Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-05Rollup merge of #113337 - compiler-errors:next-solver-winnow-specializing, ↵Michael Goulet-0/+22
r=lcnr Winnow specialized impls during selection in new solver We need to be able to winnow impls that are specialized by more specific impls in order for codegen to be able to proceed. r? ``@lcnr``
2023-07-05Rollup merge of #113321 - BoxyUwU:move_constkind_to_typeir, r=oli-obkMichael Goulet-1/+1
Move `ty::ConstKind` to `rustc_type_ir` Needed this in another PR for custom debug impls, and this will also be required to move the new solver into a separate crate that does not use `TyCtxt` so that r-a and friends can depend on the trait solver. Rebased on top of #113325, only the second and third commits needs reviewing
2023-07-05Rollup merge of #113320 - oli-obk:eval_obligation_query, r=petrochenkov,BoxyUwUMichael Goulet-24/+369
Add some extra information to opaque type cycle errors Plus a bunch of cleanups. This should help users debug query cycles due to auto trait checking. We'll probably want to fix cycle errors in most (or all?) cases by looking at the current item's hidden types (new solver does this), and by delaying the auto trait checks to after typeck.
2023-07-05Auto merge of #113210 - fee1-dead-contrib:effects-mvp, r=oli-obkbors-0/+29
Effects/keyword generics MVP This adds `feature(effects)`, which adds `const host: bool` to the generics of const functions, const traits and const impls. This will be used to replace the current logic around const traits. r? `@oli-obk`
2023-07-05Deal with falloutBoxy-1/+1
2023-07-05Test that you can't circumvent the `Sized` bound checkOli Scherer-0/+73
2023-07-05Make `unused_associated_type_bounds`'s lint level changeableOli Scherer-0/+3
2023-07-05Add more testsOli Scherer-0/+59
2023-07-05Add some extra information to opaque type cycle errorsOli Scherer-15/+360
2023-07-05Fix some tests to *only* test their main issue and not have secondary failuresOli Scherer-9/+9
2023-07-05Lint now-unnecessary associated type boundsOli Scherer-0/+41
2023-07-05Don't require associated types with `Self: Sized` bounds in `dyn Trait` objectsOli Scherer-13/+3
2023-07-05Winnow specializing implsMichael Goulet-0/+22
2023-07-04Rollup merge of #113324 - lcnr:const-evaluatable-goal, r=BoxyUwUMatthias Krüger-3/+33
implement `ConstEvaluatable` goals in new solver this only supports stable const generics. `feature(generic_const_exprs)` needs to extend that function is non-trivial ways. Leaving this for someone else or some later date. r? `@BoxyUwU`
2023-07-04implement `ConstEvaluatable` goals in new solverlcnr-3/+33
we don't yet handle `generic_const_exprs`, someone else can do that :3
2023-07-04Auto merge of #113309 - chenyukang:yukang-fix-89640-space, r=Nilstriebbors-0/+16
Detect extra space in keyword for better hint Fixes #89640 r? `@Nilstrieb` I met the same issue, then found out this old issue :)
2023-07-04add testDeadbeef-0/+29
2023-07-04Detect extra space in keyword for better hintyukang-0/+16
2023-07-04Auto merge of #113303 - compiler-errors:yeet-chalk, r=lcnrbors-799/+3
Remove chalk support from the compiler Removes chalk (`-Ztrait-solver=chalk`) from the compiler and prunes any dead code resulting from this, mainly: * Remove the chalk compatibility layer in `compiler/rustc_traits/src/chalk` * Remove the chalk flag `-Ztrait-solver=chalk` and its `TraitEngine` implementation * Remove `TypeWellFormedFromEnv` (and its many `bug!()` match arms) * Remove the chalk migration mode from compiletest * Remove the `chalkify` UI tests (do we want to keep any of these, but migrate them to `-Ztrait-solver=next`??) Fulfills rust-lang/types-team#93. r? `@jackh726`
2023-07-04Auto merge of #113304 - cuviper:indexmap-2, r=Mark-Simulacrumbors-10/+2
Upgrade to indexmap 2.0.0 The new version was already added to the tree as an indirect dependency in #113046, but now our direct dependents are using it too.
2023-07-04Auto merge of #113215 - compiler-errors:rpitit-predicates-tweaks, r=spastorinobors-15/+52
Make RPITITs assume/require their parent method's predicates Removes a FIXME from the `param_env` query where we were manually adding the parent function's predicates to the RPITIT's assumptions. r? `@spastorino`
2023-07-04Auto merge of #112917 - chenyukang:yukang-fix-112590, r=estebankbors-9/+110
Suggest importing for partial mod path matching in name resolving Fixes #112590
2023-07-03Remove compare modeMichael Goulet-3/+0
2023-07-03Remove chalk from the compilerMichael Goulet-796/+3
2023-07-03Bless ui-fulldeps/missing-rustc-driver-errorJosh Stone-10/+2
The specific crates have changed, but the expected "help" remains.
2023-07-03Auto merge of #108611 - ↵bors-1/+178
davidtwco:issue-94223-external-abi-fn-ptr-in-internal-abi-fn, r=jackh726 lint/ctypes: ext. abi fn-ptr in internal abi fn Fixes #94223. - In the improper ctypes lint, instead of skipping functions with internal ABIs, check that the signature doesn't contain any fn-ptr types with external ABIs that aren't FFI-safe. - When computing the ABI for fn-ptr types, remove an `unwrap` that assumed FFI-safe types in foreign fn-ptr types. - I'm not certain that this is the correct approach.
2023-07-03Rollup merge of #113286 - fmease:iat-dont-select-if-not-enabled, ↵Guillaume Gomez-41/+90
r=compiler-errors Don't perform selection if inherent associated types are not enabled Fixes #113265. As discussed r? `@compiler-errors`
2023-07-03Rollup merge of #113285 - GuillaumeGomez:display-long-inline-cfg, r=notriddleGuillaume Gomez-1/+20
[rustdoc] Fix display of long inline cfg labels Fixes #87957. Fixes #112880. Before: ![Screenshot from 2023-07-03 13-25-47](https://github.com/rust-lang/rust/assets/3050060/401e2c6b-2cfd-4ae3-9d15-b5e1dfec4201) After: ![Screenshot from 2023-07-03 13-24-49](https://github.com/rust-lang/rust/assets/3050060/e42a34a8-bf60-409d-8a0c-1669d09e7e1e) r? `@notriddle`
2023-07-03lint/ctypes: check other types for ext. fn-ptr tyDavid Wood-1/+127
Extend previous checks for external ABI fn-ptrs to use in internal statics, constants, type aliases and algebraic data types. Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03lint/ctypes: multiple external fn-ptrs in tyDavid Wood-1/+23
Extend previous commit's support for checking for external fn-ptrs in internal fn types to report errors for multiple found fn-ptrs. Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03abi: avoid ice for non-ffi-safe fn ptrsDavid Wood-0/+8
Remove an `unwrap` that assumed FFI-safe types in foreign fn-ptr types. Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03lint/ctypes: ext. abi fn-ptr in internal abi fnDavid Wood-1/+22
Instead of skipping functions with internal ABIs, check that the signature doesn't contain any fn-ptr types with external ABIs that aren't FFI-safe. Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03Don't perform selection if IATs are not enabledLeón Orell Valerian Liehr-41/+90
2023-07-03Add GUI test for long inline cfg labels displayGuillaume Gomez-1/+20
2023-07-03Auto merge of #113086 - lcnr:rust8, r=compiler-errorsbors-191/+366
implement deep normalization via the new solver together with #112869 this should remove all uses of the old solver with `-Ztrait-solver=next`. see https://hackmd.io/V0qsUB_fTxexfQO_pcOcrg for a description of this PR. Will move that doc to the `rustc-dev-guide` after merging this. r? `@compiler-errors`
2023-07-03update testslcnr-191/+366
2023-07-02Rollup merge of #113258 - GuillaumeGomez:migrate-gui-test-color-19, r=notriddleMatthias Krüger-15/+15
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-07-02Auto merge of #108537 - ↵bors-115/+252
GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle rustdoc: Allow whitespace as path separator like double colon Fixes https://github.com/rust-lang/rust/issues/108447. I think it makes sense since it allows more common cases, however it also makes the syntax heavier. Not sure what the rest of the team thinks about it. In any case we'll need to go through FCP. Full explanation for the changes is available [here](https://github.com/rust-lang/rust/pull/108537#issuecomment-1589480564). r? `@notriddle`
2023-07-02Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiaskobors-0/+18
Add `-Zremark-dir` unstable flag to write LLVM optimization remarks to YAML This PR adds an option for `rustc` to emit LLVM optimization remarks to a set of YAML files, which can then be digested by existing tools, like https://github.com/OfekShilon/optview2. When `-Cremark-dir` is passed, and remarks are enabled (`-Cremark=all`), the remarks will be now written to the specified directory, **instead** of being printed to standard error output. The files are named based on the CGU from which they are being generated. Currently, the remarks are written using the LLVM streaming machinery, directly in the diagnostics handler. It seemed easier than going back to Rust and then form there back to C++ to use the streamer from the diagnostics handler. But there are many ways to implement this, of course, so I'm open to suggestions :) I included some comments with questions into the code. Also, I'm not sure how to test this. r? `@tmiasko`
2023-07-02Add `rustc` option to output LLVM optimization remarks to YAML filesJakub Beránek-0/+18
2023-07-02Migrate GUI colors test to original CSS color formatGuillaume Gomez-15/+15
2023-07-02Rollup merge of #113231 - Urgau:fix_false_positive_drop_copy, r=NilstriebMatthias Krüger-0/+38
Fix `dropping_copy_types` lint from linting in match-arm with side-effects This PR fixes an issue with the `dropping_copy_types` and `dropping_references` lints when not all patterns that can have side-effects were detected and ignored. Nearly _fixes_ https://github.com/rust-lang/rust/issues/112653 (will need beta-backport to completely fix the issue) r? ``@Nilstrieb``
2023-07-02Rollup merge of #113228 - GuillaumeGomez:migrate-gui-test-color-18, r=notriddleMatthias Krüger-9/+9
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? ``@notriddle``
2023-07-02add testcase for 112590yukang-55/+88
2023-07-02Auto merge of #112910 - lqd:mcp510, r=petrochenkovbors-5/+21
Implement most of MCP510 This implements most of what remains to be done for MCP510: - turns `-C link-self-contained` into a `+`/`-` list of components, like `-C link-self-contained=+linker,+crto,+libc,+unwind,+sanitizers,+mingw`. The scaffolding is present for all these expected components to be implemented and stabilized in the future on their own time. This PR only handles the `-Zgcc-ld=lld` subset of these link-self-contained components as `-Clink-self-contained=+linker` - handles `-C link-self-contained=y|n` as-is today, for compatibility with `rustc_codegen_ssa::back::link::self_contained`'s [explicit opt-in and opt-out](https://github.com/lqd/rust/blob/9eee230cd0a56bfba3ce65121798d9f9f4341cdd/compiler/rustc_codegen_ssa/src/back/link.rs#L1671-L1676). - therefore supports our plan to opt out of `rust-lld` (when it's enabled by default) even for current `-Clink-self-contained` users, with e.g. `-Clink-self-contained -Clink-self-contained=-linker` - turns `add_gcc_ld_path` into its expected final form, by using the `-C link-self-contained=+linker` CLI flag, and whether the `LinkerFlavor` has the expected `Cc::Yes` and `Lld::Yes` shape (this is not yet the case in practice for any CLI linker flavor) - makes the [new clean linker flavors](https://github.com/rust-lang/rust/pull/96827#issuecomment-1208441595) selectable in the CLI in addition to the legacy ones, in order to opt-in to using `cc` and `lld` to emulate `-Zgcc-ld=lld` - ensure the new `-C link-self-contained` components, and `-C linker-flavor`s are unstable, and require `-Z unstable-options` to be used The up-to-date set of flags for the future stable CLI version of `-Zgcc-ld=lld` is currently: `-Clink-self-contained=+linker -Clinker-flavor=gnu-lld-cc -Zunstable-options`. It's possible we'll also need to do something for distros that don't ship `rust-lld`, but maybe there are already no tool search paths to be added to `cc` in this situation anyways. r? `@petrochenkov`
2023-07-01Fix dropping_copy_types lint from linting in match-arm with side-effectsUrgau-0/+38
2023-07-01Rollup merge of #113182 - compiler-errors:rpit-stricter-captures, r=oli-obkMatthias Krüger-24/+167
Error when RPITITs' hidden types capture more lifetimes than their trait definitions This implements a stricter set of captures rules for RPITITs. They now may only capture: 1. Lifetimes from the impl header (both the self type and any trait substs -- we may want to restrict just to the self type's lifetimes, but the PR makes that easy to do, too) 2. Lifetimes mentioned by the `impl Trait` in the trait method's definition. Namely, they may not mention lifetimes from the method (early or late) that are not mentioned in the `impl Trait`. cc #105258 which I think was trying to do this too, though I'm not super familiar with what exactly differs from that or why that one was broken. cc #112194 (doesn't fix this issue per se, because it's still an open question, but I think this is objectively better than the status quo, and gets us closer to resolving that issue.) Technically is a fix for the ICE in #108580, but it turns that issue into an error now. We can decide separately whether or not nested RPITITs should capture lifetimes from their parents. r? ``@oli-obk``
2023-07-01Rollup merge of #113174 - chenyukang:yukang-fix-102972-loop-next, ↵Matthias Krüger-0/+49
r=compiler-errors Better messages for next on a iterator inside for loops Fixes #102972
2023-07-01Rollup merge of #113168 - bvanjoi:fix-85992, r=petrochenkovMatthias Krüger-0/+27
fix(resolve): skip assertion judgment when NonModule is dummy Fixes #85992 ## Why #85992 panic During `resolve_imports`, the `path_res` of the import `issue_85992_extern_2::Outcome` is pointing to `external::issue_85992_extern_2` instead of `crate::issue_85992_extern_2`. As a result `import.imported_module.set` had been executed. Attached 1: the state of `early_resolve_ident_in_lexical_scope` during the `resolve_imports` for `use issue_85992_extern_2::Outcome` is as follows: |iter in `visit_scopes` | `scope` | `result.binding` | | - | - | - | | init | - | - | | 0 | `CrateRoot` | Err(Determined) | | 1 | `ExternPrelude` | pointing to the `issue_85992_extern_2`(external) | However, during finalization for `issue_85992_extern_2::Outcome`, the `innermost_result` was pointed to `crate::issue_85992_extern_2` and no ambiguity was generated, leading to a panic. Attached 2: the state of `early_resolve_ident_in_lexical_scope` during the `finalize_import` for `use issue_85992_extern_2::Outcome` is as follows: |iter in `visit_scopes` | `scope` | `result.binding` | `innermost_result` | | - | - | - | - | | init | - | - | `None` | | 0 | `CrateRoot` | pointing to `use crate::issue_85992_extern_2` **(introdcued by dummy)** | same as `result` but with a `Some` wapper| | 1 | `ExternPrelude` | pointing to the `issue_85992_extern_2`(external) | smae as above | ## Try to solve Skip assertion judgment when `NonModule` is dummy r? `@petrochenkov`