about summary refs log tree commit diff
path: root/tests/ui/codegen
AgeCommit message (Collapse)AuthorLines
2025-03-26Always emit native-static-libs note, even if it is emptyMads Marquart-0/+16
2025-03-25compiletest: Support matching on diagnostics without a spanVadim Petrochenkov-0/+2
2025-02-06remove `feature(trait_upcasting)` from tests and bless themWaffle Lapkin-1/+0
2025-02-04Rename and Move some UI tests to more suitable subdirsDuskyElf-0/+94
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-3/+3
2024-12-10Adjust `alias-uninit-value.rs`Jieyou Xu-0/+26
- Document and tidy up `alias-uninit-value.rs` - Move `alias-uninit-value.rs` to `tests/ui/codegen/`
2024-12-08Move `assign-assign.rs` to `tests/ui/codegen/assign-expr-unit-type.rs`许杰友 Jieyou Xu (Joe)-0/+39
2024-12-05Normalize target-cpus.rs stdout test for LLVM changesTim Neumann-0/+6
2024-11-27ensure JSON-defined targets are consistentRalf Jung-2/+2
2024-11-26tests: remove `//@ pretty-expanded` usages许杰友 Jieyou Xu (Joe)-1/+0
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
2024-10-21move strict provenance lints to new feature gate, remove old feature gatesRalf Jung-32/+0
2024-09-30Relax a debug assertion in codegenMichael Goulet-0/+8
2024-09-23fix ices on vfe about principal traitLuv-Ray-0/+17
2024-07-19Add a bunch of tests for #107975Pavel Grigorenko-0/+799
2024-07-12Gate the type length limit check behind a nightly flagMichael Goulet-5/+8
2024-07-02Instance::resolve -> Instance::try_resolve, and other nitsMichael Goulet-1/+2
2024-07-02Re-implement a type-size based limitMichael Goulet-8/+4
2024-06-14Deprecate no-op codegen option `-Cinline-threshold=...`Martin Nordholts-1/+1
This deprecates `-Cinline-threshold` since using it has no effect. This has been the case since the new LLVM pass manager started being used, more than 2 years ago.
2024-05-24Don't eagerly monomorphize drop for types that are impossible to instantiateMichael Goulet-0/+18
2024-03-17Update the minimum external LLVM to 17Josh Stone-1/+0
2024-03-11Update test directives for `wasm32-wasip1`Alex Crichton-1/+0
* The WASI targets deal with the `main` symbol a bit differently than native so some `codegen` and `assembly` tests have been ignored. * All `ignore-emscripten` directives have been updated to `ignore-wasm32` to be more clear that all wasm targets are ignored and it's not just Emscripten. * Most `ignore-wasm32-bare` directives are now gone. * Some ignore directives for wasm were switched to `needs-unwind` instead. * Many `ignore-wasm32*` directives are removed as the tests work with WASI as opposed to `wasm32-unknown-unknown`.
2024-03-06compiletest: Add a `//@ needs-threads` directiveAlex Crichton-3/+2
This commit is extracted from #122036 and adds a new directive to the `compiletest` test runner, `//@ needs-threads`. This is intended to capture the need that a target must implement threading to execute a specific test, typically one that uses `std::thread`. This is primarily done for WebAssembly targets which currently do not have threads by default. This enables transitioning a lot of `//@ ignore-wasm*`-style ignores into a more self-documenting `//@ needs-threads` directive. Additionally the `wasm32-wasi-preview1-threads` target, for example, does actually have threads, but isn't tested in CI at this time. This change enables running these tests for that target, but not other wasm targets.
2024-03-05Rollup merge of #121978 - GuillaumeGomez:dylib-duplicated-path, r=bjorn3Matthias Krüger-0/+9
Fix duplicated path in the "not found dylib" error While working on the gcc backend, I couldn't figure out why I had this error: ``` error: couldn't load codegen backend /checkout/compiler/rustc_codegen_gcc/target/release/librustc_codegen_gcc.so/checkout/compiler/rustc_codegen_gcc/target/release/librustc_codegen_gcc.so: cannot open shared object file: No such file or directory ``` As you can see, the path is duplicated for some reason. After investigating a bit more, I realized that `libloading::Error::LoadLibraryExW` starts with the path of the not found dylib, making it appear twice in our error afterward (because we do render it like this: `{path}{err}`, and since the `err` starts with the path...). Thanks to `````@bjorn3````` for linking me to https://github.com/rust-lang/rust/pull/121392. :)
2024-03-04Add regression ui test for duplicated path in dylib errorGuillaume Gomez-0/+9
2024-03-03Move testsCaio-0/+20
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-59/+59
2024-02-14Do not report overflow errors on ConstArgHasType goalsMichael Goulet-0/+39
2024-02-09Move some testsCaio-0/+16
2024-01-27Auto merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleywiserbors-0/+31
llvm: change data layout bug to an error and make it trigger more Fixes #33446. Don't skip the inconsistent data layout check for custom LLVMs or non-built-in targets. With #118708, all targets will have a simple test that would trigger this error if LLVM's data layouts do change - so data layouts would be corrected during the LLVM upgrade. Therefore, with builtin targets, this error won't happen with our LLVM because each target will have been confirmed to work. With non-builtin targets, this error is probably useful to have because you can change the data layout in your target and if it is wrong then that could lead to bugs. When using a custom LLVM, the same justification makes sense for non-builtin targets as with our LLVM, the user can update their target to match their LLVM and that's probably a good thing to do. However, with a custom LLVM, the user cannot change the builtin target data layouts if they don't match - though given that the compiler's data layout is used for layout computation and a bunch of other things - you could get some bugs because of the mismatch and probably want to know about that. I'm not sure if this is something that people do and is okay, but I doubt it? `CFG_LLVM_ROOT` was also always set during local development with `download-ci-llvm` so this bug would never trigger locally. In #33446, two points are raised: - In the issue itself, changing this from a `bug!` to a proper error is what is suggested, by using `isCompatibleDataLayout` from LLVM, but that function still just does the same thing that we do and check for equality, so I've avoided the additional code necessary to do that FFI call. - `@Mark-Simulacrum` suggests a different check is necessary to maintain backwards compatibility with old LLVM versions. I don't know how often this comes up, but we can do that with some simple string manipulation + LLVM version checks as happens already for LLVM 17 just above this diff.
2024-01-22Revert "Auto merge of #118133 - Urgau:stabilize_trait_upcasting, r=WaffleLapkin"Oli Scherer-0/+1
This reverts commit 6d2b84b3ed7848fd91b8d6151d4451b3103ed816, reversing changes made to 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf.
2024-01-18llvm: simplify data layout checkDavid Wood-0/+31
Don't skip the inconsistent data layout check for custom LLVMs. With #118708, all targets will have a simple test that would trigger this check if LLVM's data layouts do change - so data layouts would be corrected during the LLVM upgrade. Therefore, with builtin targets, this check won't trigger with our LLVM because each target will have been confirmed to work. With non-builtin targets, this check is probably useful to have because you can change the data layout in your target and if its wrong then that could lead to bugs. When using a custom LLVM, the same justification makes sense for non-builtin targets as with our LLVM, the user can update their target to match their LLVM and that's probably a good thing to do. However, with a custom LLVM, the user cannot change the builtin target data layouts if they don't match - though given that the compiler's data layout is used for layout computation and a bunch of other things - you could get some bugs because of the mismatch and probably want to know about that. `CFG_LLVM_ROOT` was also always set during local development with `download-ci-llvm` so this bug would never trigger locally. Signed-off-by: David Wood <david@davidtw.co>
2024-01-02Adjust compiler tests for unused_tuple_struct_fields -> dead_codeJake Goulding-1/+1
2023-12-09Use immediate_backend_type when reading from a const allocBen Kimock-0/+15
2023-11-22Stabilize RFC3324 dyn upcasting coercionUrgau-1/+0
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
2023-10-04Fix misuses of a vs ancui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-26Rollup merge of #116099 - eduardosm:issue-79865-regression, r=oli-obkMatthias Krüger-0/+38
Add regression test for issue #79865 Closes https://github.com/rust-lang/rust/issues/79865
2023-09-23Bless tests.Camille GILLOT-1/+0
2023-09-23Add regression test for issue #79865Eduardo Sánchez Muñoz-0/+38
2023-09-11Remove assert that checks type equalityouz-a-0/+49
2023-07-27Update the minimum external LLVM to 15Josh Stone-2/+0
2023-07-20Add ui test of LLVM print-from-C++ changesDavid Tolnay-0/+8
2023-06-19add tests for unsound subtype handlinglcnr-0/+56
2023-04-16Check freeze with right param-envMichael Goulet-0/+31
2023-03-28Erase impl regions when checking for impossible to eagerly monomorphize itemsMichael Goulet-0/+19
2023-03-14Don't codegen impossible to satisfy implsMichael Goulet-0/+13
2023-01-11Move /src/test to /testsAlbert Larsan-0/+348