about summary refs log tree commit diff
path: root/tests/ui/codegen
AgeCommit message (Collapse)AuthorLines
2025-07-14tests: Fix duplicated-path-in-error fail with muslJens Reidel-0/+9
musl's dlopen returns a different error than glibc, which contains the name of the file. This would cause the test to fail, since the filename would appear twice in the output (once in the error from rustc, once in the error message from musl). Split the expected test outputs for the different libc implementations. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-07-11Rollup merge of #143303 - Kivooeo:tf28, r=tgross35Matthias Krüger-0/+23
`tests/ui`: A New Order [28/28] FINAL PART > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? ``@tgross35``
2025-07-10Rollup merge of #143298 - Kivooeo:tf23, r=tgross35Trevor Gross-0/+155
`tests/ui`: A New Order [23/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? ``@tgross35``
2025-07-05cleaned up some testsKivooeo-39/+63
2025-07-01moved testsKivooeo-0/+23
2025-07-01moved testsKivooeo-0/+131
2025-06-30Rollup merge of #143195 - Kivooeo:tf17, r=tgross35dianqk-0/+74
`tests/ui`: A New Order [17/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-06-30cleaned up some testsKivooeo-5/+7
2025-06-30cleaned up some testsKivooeo-26/+34
2025-06-29moved testsKivooeo-0/+66
2025-06-28moved testsKivooeo-0/+10
2025-06-16tests: `{Meta,Pointee}Sized` in non-minicore testsDavid Wood-1/+7
As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
2025-06-04cleaned up some testsKivooeo-0/+13
2025-05-15Auto merge of #136264 - GuillaumeGomez:optimize-integers-to-string, r=Amanieubors-6/+6
Optimize `ToString` implementation for integers Part of https://github.com/rust-lang/rust/issues/135543. Follow-up of https://github.com/rust-lang/rust/pull/133247 and https://github.com/rust-lang/rust/pull/128204. The benchmark results are: | name| 1.87.0-nightly (3ea711f17 2025-03-09) | With this PR | diff | |-|-|-|-| | bench_i16 | 32.06 ns/iter (+/- 0.12) | 17.62 ns/iter (+/- 0.03) | -45% | | bench_i32 | 31.61 ns/iter (+/- 0.04) | 15.10 ns/iter (+/- 0.06) | -52% | | bench_i64 | 31.71 ns/iter (+/- 0.07) | 15.02 ns/iter (+/- 0.20) | -52% | | bench_i8 | 13.21 ns/iter (+/- 0.14) | 14.93 ns/iter (+/- 0.16) | +13% | | bench_u16 | 31.20 ns/iter (+/- 0.06) | 16.14 ns/iter (+/- 0.11) | -48% | | bench_u32 | 33.27 ns/iter (+/- 0.05) | 16.18 ns/iter (+/- 0.10) | -51% | | bench_u64 | 31.44 ns/iter (+/- 0.06) | 16.62 ns/iter (+/- 0.21) | -47% | | bench_u8 | 10.57 ns/iter (+/- 0.30) | 13.00 ns/iter (+/- 0.43) | +22% | More information about it in [the original comment](https://github.com/rust-lang/rust/pull/136264#discussion_r1987542954). r? `@workingjubilee`
2025-05-02Remove fragile equal-pointers-unequal tests.Mara Bos-201/+0
These randomly break when i change the implementation of format_args!().
2025-04-30Rollup merge of #140465 - mejrs:test2, r=jieyouxuMatthias Krüger-0/+6
chore: edit and move tests I deleted `ui/non-copyable-void.rs`: added in https://github.com/rust-lang/rust/commit/ab4105d9e8b7c0719343aa2e4edd15cae0b7c947 to test that "nonconstructable" enums are "noncopyable", but these properties are not correlated anymore. Second commit is kinda messy because I moved/edited/renamed some files at the same time, but I deleted nothing there.
2025-04-30error when using no_mangle on language itemsAlexandru RADOVICI-0/+56
add suggestion on how to add a panic breakpoint Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com> delete no_mangle from ui/panic-handler/panic-handler-wrong-location test issue an error for the usage of #[no_mangle] on internal language items delete the comments add newline rephrase note Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> update error not to leak implementation details delete no_mangle_span Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> delete commented code
2025-04-29Move tests from /ui directorymejrs-0/+6
2025-04-19Cleaned up 4 tests in `tests/ui/issues`Spencer-0/+54
2025-04-14Auto merge of #139577 - davidtwco:sizedness-go-vroom, r=oli-obkbors-2/+2
re-use `Sized` fast-path There's an existing fast path for the `type_op_prove_predicate` predicate, checking for trivially `Sized` types, which can be re-used when evaluating obligations within queries. This should improve performance and was found to be beneficial in #137944. r? types
2025-04-13UI tests: migrate remaining compile time `error-pattern`s to line annotationsVadim Petrochenkov-1/+3
when possible.
2025-04-12Update weirdly failing ui testsGuillaume Gomez-6/+6
2025-04-09re-use sized fast pathDavid Wood-2/+2
There's an existing fast path for the `type_op_prove_predicate` predicate, checking for trivially `Sized` types, which can be re-used when evaluating obligations within queries. This should improve performance, particularly in anticipation of new sizedness traits being added which can take advantage of this.
2025-04-05Fix ProvenVia for global where clausesMichael Goulet-0/+3
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-1/+2
2025-03-31Remove fragile equal-pointers-unequal/*/print3.rs tests.Mara Bos-73/+0
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