about summary refs log tree commit diff
path: root/src/test/ui/consts/const-extern-fn
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-217/+0
2022-07-06update testMiguel Guarniz-6/+6
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-26Revert "add `DefId` to unsafety violations and display function path in E0133"Oli Scherer-5/+6
This reverts commit 8b8f6653cfd54525714f02efe7af0a0f830e185c.
2022-04-24only show a simple description in E0133 span labelEmil Gardström-3/+3
2022-04-24add `DefId` to unsafety violations and display function path in E0133Emil Gardström-8/+8
this enables consumers to access the function definition that was reported to be unsafe
2022-03-26Stablize `const_extern_fn` for "Rust" and "C"Aaron Hill-52/+19
All other ABIs are left unstable for now. cc #64926
2022-03-07Update tests after feature stabilizationEric Holk-23/+3
2022-02-12bless youDeadbeef-4/+8
2021-10-03Practice diagnostic message conventionHirochika Matsumoto-1/+1
2021-09-01Stop sorting bodies by span.Camille GILLOT-6/+6
The definition order is already close to the span order, and only differs in corner cases.
2021-07-10remove const_raw_ptr_to_usize_cast featureRalf Jung-4/+4
2021-05-22Remove some errors in UI testsLeSeulArtichaut-10/+2
As we now need to run THIR unsafeck before MIR build, errors in unsafeck can cause the compilation to be aborted earlier.
2021-05-11Test `-Zthir-unsafeck` for unsafe function callsLeSeulArtichaut-2/+24
2021-01-13Update code to account for extern ABI requirementMark Rousskov-15/+15
2020-09-29Bless outputDylan MacKenzie-3/+13
2020-09-29Bless testsDylan MacKenzie-2/+2
2020-09-27Bless testsDylan MacKenzie-4/+3
2020-09-27Update tests with new feature gateDylan MacKenzie-1/+1
2020-09-25Use proper issue for `const_fn_floating_point_arithmetic`Dylan MacKenzie-1/+1
2020-09-25Bless testsDylan MacKenzie-3/+3
2020-09-22Bless testsDylan MacKenzie-16/+11
2020-08-21Suppress "const" prefix of FnDef in MIR dumpLzu Tao-2/+2
2020-06-30Stabilize casts and coercions to `&[T]` in const fnOliver Scherer-14/+4
2020-02-13parser: fuse free `fn` parsing together.Mazdak Farrokhzad-38/+25
2020-02-09--bless --compare-mode=nllMatthias Prechtl-13/+13
2020-01-09expect `fn` after `const unsafe` / `const extern`Mazdak Farrokhzad-0/+41
2019-12-03Move all intrinsic whitelists into the constness check fileOliver Scherer-4/+4
2019-10-02Add support for 'extern const fn'Aaron Hill-0/+229
This works just as you might expect - an 'extern const fn' is a 'const fn' that is callable from foreign code. Currently, panicking is not allowed in consts. When RFC 2345 is stabilized, then panicking in an 'extern const fn' will produce a compile-time error when invoked at compile time, and an abort when invoked at runtime. Since this is extending the language (we're allowing the `const` keyword in a new context), I believe that this will need an FCP. However, it's a very minor change, so I didn't think that filing an RFC was necessary. This will allow libc (and other FFI crates) to make many functions `const`, without having to give up on making them `extern` as well.