about summary refs log tree commit diff
path: root/tests/ui/c-variadic
AgeCommit message (Collapse)AuthorLines
2025-06-13variadic functions: remove list of supported ABIs from errorRalf Jung-24/+22
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-8/+14
2025-03-03Change variadic-ffi-2 to use a platform independant ABITamme Dittrich-17/+4
Otherwise this test will include a future incompatibility warning on some targets but not others.
2025-03-03Bless UI testsTamme Dittrich-1/+12
2025-02-24tests: use minicore moreDavid Wood-15/+17
minicore makes it much easier to add new language items to all of the existing `no_core` tests.
2025-02-21More sophisticated span trimmingMichael Goulet-6/+4
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-1/+1
2025-02-14Use underline suggestions for purely 'additive' replacementsMichael Goulet-3/+2
2025-02-12Split out the `extern_system_varargs` featureJubilee Young-33/+8
After the stabilization PR was opened, `extern "system"` functions were added to `extended_varargs_abi_support`. This has a number of questions regarding it that were not discussed and were somewhat surprising. It deserves to be considered as its own feature, separate from `extended_varargs_abi_support`.
2025-02-11Revert "Stabilize `extended_varargs_abi_support`"Jubilee Young-2/+75
This reverts commit 685f189b4307435b83d625fea397ef36dff4e955.
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-6/+9
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-02-06Label mismatched parameters at the def site for foreign functions.Jason Newcomb-2/+2
2025-01-06`best_blame_constraint`: don't filter constraints by sup SCCdianne-3/+3
The SCCs of the region graph are not a reliable heuristic to use for blaming an interesting constraint for diagnostics. For region errors, if the outlived region is `'static`, or the involved types are invariant in their lifetiems, there will be cycles in the constraint graph containing both the target region and the most interesting constraints to blame. To get better diagnostics in these cases, this commit removes that heuristic.
2024-11-30Rollup merge of #133620 - ↵许杰友 Jieyou Xu (Joe)-6/+36
dev-ardi:simplify-hir_typeck_pass_to_variadic_function, r=compiler-errors Simplify hir_typeck_pass_to_variadic_function r? ``@compiler-errors`` This reworks a bit how the diagnostic is generated so that it does the same as #133538 The `help` is useless now so I removed it
2024-11-30Rollup merge of #116161 - Soveu:varargs2, r=cjgillot许杰友 Jieyou Xu (Joe)-75/+2
Stabilize `extended_varargs_abi_support` I think that is everything? If there is any documentation regarding `extern` and/or varargs to correct, let me know, some quick greps suggest that there might be none. Tracking issue: https://github.com/rust-lang/rust/issues/100189
2024-11-29simplify how the `hir_typeck_pass_to_variadic_function` diagnostic is createdOrion Gonzalez-6/+36
2024-11-29bless the tests and add a new oneOrion Gonzalez-4/+41
2024-11-27Stabilize `extended_varargs_abi_support`Soveu-75/+2
2024-09-23Check ABI target compatibility for function pointersTamme Dittrich-10/+29
This check was previously only performed on functions not function pointers. Co-authored-by: Folkert <folkert@folkertdev.nl>
2024-07-14Use ordinal number in argument errorlong-long-float-1/+1
Fix error message Fix tests Format
2024-06-22compiler: Mention C-unwind in C-variadic errorJubilee Young-1/+1
2024-04-16Update TestsVeera-9/+4
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-7/+7
2024-01-13Auto merge of #119088 - George-lewis:glewis/suggest-upgrading-compiler, ↵bors-0/+3
r=Nilstrieb Suggest Upgrading Compiler for Gated Features This PR addresses #117318 I have a few questions: 1. Do we want to specify the current version and release date of the compiler? I have added this in via environment variables, which I found in the code for the rustc cli where it handles the `--version` flag a. How can I handle the changing message in the tests? 3. Do we want to only show this message when the compiler is old? a. How can we determine when the compiler is old? I'll wait until we figure out the message to bless the tests
2024-01-13Bless testsGeorge-lewis-0/+3
Update tests
2024-01-12allow system abi to be variadicbeepster4096-2/+5
2023-12-12Rollup merge of #117914 - estebank:issue-85843, r=wesleywiserMatthias Krüger-1/+10
On borrow return type, suggest borrowing from arg or owned return type When we encounter a function with a return type that has an anonymous lifetime with no argument to borrow from, besides suggesting the `'static` lifetime we now also suggest changing the arguments to be borrows or changing the return type to be an owned type. ``` error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ help: instead, you are more likely to want to change one of the arguments to be borrowed... | LL | x: &usize, | + help: ...or alternatively, to want to return an owned value | LL - ) -> &usize { LL + ) -> usize { | ``` Fix #85843.
2023-11-24Show number in error message even for one errorNilstrieb-5/+5
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-20Tweak wordingEsteban Küber-1/+1
2023-11-20On borrow return type, suggest borrowing from arg or owned return typeEsteban Küber-1/+10
When we encounter a function with a return type that has an anonymous lifetime with no argument to borrow from, besides suggesting the `'static` lifetime we now also suggest changing the arguments to be borrows or changing the return type to be an owned type. ``` error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ help: instead, you are more likely to want to change one of the arguments to be borrowed... | LL | x: &usize, | + help: ...or alternatively, to want to return an owned value | LL - ) -> &usize { LL + ) -> usize { | ``` Fix #85843.
2023-10-30Fix bad-c-variadic error being emitted multiple timesNicholas Bishop-8/+2
If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once.
2023-09-14Enable varargs support for AAPCS calling conventionSoveu-2/+5
This is the default calling convention for ARM - it is used for extern "C", therefore it supports varargs.
2023-08-30Test and note unsafe ctor to fn ptr coercionMichael Goulet-2/+0
Also remove a note that I don't consider to be very useful in context.
2023-01-30Mention fn coercion rules (needs to be expanded)Esteban Küber-0/+2
2023-01-15Tweak E0597Esteban Küber-1/+3
CC #99430
2023-01-13Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplettYuki Okushi-10/+7
Stabilize `abi_efiapi` feature Tracking issue: https://github.com/rust-lang/rust/issues/65815 Closes #65815
2023-01-11Stabilize `abi_efiapi` featureNicholas Bishop-10/+7
Tracking issue: https://github.com/rust-lang/rust/issues/65815
2023-01-11Filter impl and where-clause candidates that reference errorsMichael Goulet-21/+3
2023-01-11Move /src/test to /testsAlbert Larsan-0/+637