Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix auto builds and make sure that we always have at least a single CI job #124739

Closed
wants to merge 118 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3fd8c64
doc note that f16 and f128 hardware support is limited
ultrabear Apr 13, 2024
fc37633
Support Result<T, E> across FFI when niche optimization can be used
MasterAwesome Mar 9, 2024
b3e6d52
We don't need to check for non-exhaustive fields
MasterAwesome Mar 9, 2024
08b85a1
Don't lint niche optimized variants in enums
MasterAwesome Mar 9, 2024
223d5eb
Add tests
MasterAwesome Mar 9, 2024
014ddac
Disallow single-variant enums
MasterAwesome Mar 9, 2024
b3f6511
Add a test against Result<(), ()>
MasterAwesome Mar 19, 2024
764f64f
Reword `is_niche_optimization_candidate` doc
MasterAwesome Mar 19, 2024
437ca26
Remove comment out of RFC's scope
MasterAwesome Mar 19, 2024
ed532cc
Put the RFC behind a feature gate `result_ffi_guarantees`
MasterAwesome Mar 19, 2024
2681edf
josh rustc-pull: check that no new root commits get created
RalfJung Apr 27, 2024
39f7a46
fix: usage of `deprecated` version of `Node.js`
hamirmahal Apr 27, 2024
f5ceb4e
Auto merge of #3519 - hamirmahal:fix/usage-of-deprecated-version-of-n…
bors Apr 27, 2024
45d9394
Auto merge of #3520 - RalfJung:josh-check, r=RalfJung
bors Apr 27, 2024
ee47a8e
Add doc comment to `pack_generic`
eduardosm Apr 27, 2024
b3b1b49
Clarify behavior of AVX2 gather when dest and offsets have different …
eduardosm Apr 27, 2024
b261535
Do not implement x86 SIMD abs with host integers
eduardosm Apr 27, 2024
5c6f95c
Auto merge of #3521 - eduardosm:avx2-2, r=RalfJung
bors Apr 28, 2024
b5482aa
file descriptors: make write take &mut self
RalfJung Apr 28, 2024
bc8ea93
Auto merge of #3524 - RalfJung:fd-write, r=RalfJung
bors Apr 28, 2024
622f697
Use the interpreted program's TZ variable in localtime_r
saethlin Apr 27, 2024
39dc6c1
Fix unwinding on 32-bit watchOS ARM
madsmtm Apr 28, 2024
9bed19e
Refactor UnixEnvVars::get so that it can be reused by getenv
saethlin Apr 28, 2024
7afef08
don't leak UnixEnvVars impl details into get_env_var
RalfJung Apr 29, 2024
1c7e827
Auto merge of #3523 - saethlin:localtime_r-env, r=RalfJung
bors Apr 29, 2024
1cf951e
Don’t print `Preparing a sysroot` when `-q`/`--quiet` is passed
narpfel May 1, 2024
4b42626
fix usage example for `--print-sysroot`
narpfel May 1, 2024
a2b3211
no longer strip `Preparing a sysroot` message from test output
narpfel May 1, 2024
b0bdbcc
Auto merge of #3531 - narpfel:quiet-sysroot, r=RalfJung
bors May 1, 2024
aa986f0
Tree Borrows: first apply transition, then check protector with new '…
RalfJung May 2, 2024
ca3defe
Auto merge of #3532 - RalfJung:tb-protectors, r=RalfJung
bors May 2, 2024
36caaa9
update host-float comments
RalfJung May 2, 2024
f6c0090
Auto merge of #3535 - RalfJung:host-float, r=RalfJung
bors May 2, 2024
c8e2336
Use sum type for `WorkflowRunType`
Kobzol May 2, 2024
92a3052
Parse try build CI job name from commit message
Kobzol May 2, 2024
3efdb4d
Make the regex more robust
Kobzol May 2, 2024
56bb517
Add assign
tiif May 2, 2024
6967d1c
Stabilize exclusive_range
RossSmyth Apr 28, 2024
57f00ce
Update clippy tests for stable exclusive_range
RossSmyth Apr 28, 2024
aeef180
Preparing for merge from rustc
May 3, 2024
3e2164f
Merge from rustc
May 3, 2024
b348e41
update comments and URL
RalfJung May 3, 2024
3c6d194
Auto merge of #3536 - tiif:add_rustbot_feat, r=RalfJung
bors May 3, 2024
4af1ba0
update lockfile
RalfJung May 3, 2024
5ce8532
Auto merge of #3537 - rust-lang:rustup-2024-05-03, r=RalfJung
bors May 3, 2024
fc218f2
Address review comments
Kobzol May 3, 2024
03589bf
run clippy on a Windows host
RalfJung May 3, 2024
8a31014
Auto merge of #3542 - RalfJung:clippy-win, r=RalfJung
bors May 3, 2024
0de07d8
Preparing for merge from rustc
RalfJung May 3, 2024
dcf956c
Auto merge of #3544 - RalfJung:rustup, r=RalfJung
bors May 3, 2024
eaf30ce
./miri run: support -v flag to print what it is doing
RalfJung May 3, 2024
692b769
Auto merge of #3545 - RalfJung:miri-run, r=RalfJung
bors May 3, 2024
aa71f9b
CI: no need to surround if: condition in expansion braces
RalfJung May 3, 2024
74701dc
Auto merge of #3547 - RalfJung:ci, r=RalfJung
bors May 3, 2024
6ce00aa
make many-seeds a mode of ./miri run rather than a separate command
RalfJung May 3, 2024
f7a3aa9
remove a hack that is no longer needed
RalfJung May 4, 2024
38715f7
Auto merge of #3548 - RalfJung:many-seeds, r=RalfJung
bors May 4, 2024
6559342
tls dtors: treat all unixes uniformly
RalfJung May 4, 2024
82456b4
Auto merge of #3550 - RalfJung:unix-tls, r=RalfJung
bors May 4, 2024
07a517a
macos: use getentropy from libc
RalfJung May 4, 2024
705d48c
Auto merge of #3551 - RalfJung:getentropy, r=RalfJung
bors May 4, 2024
459c6ce
Make file descriptors into refcount references
Luv-Ray May 4, 2024
d130eaa
speed up Windows runner: don't run GC_STRESS test
RalfJung May 4, 2024
502ed49
show time taken in run_tests_minimal
RalfJung May 4, 2024
7b57f12
Auto merge of #3533 - Luv-Ray:file-descriptors-to-refcount-references…
bors May 4, 2024
be874a4
move available-parallelism tests into shims/ folder
RalfJung May 4, 2024
57ff16b
rename integer test
RalfJung May 4, 2024
3046dbe
move intrinsics implementations and tests into dedicated folder
RalfJung May 4, 2024
a4355bb
fix grouping of target-specific LLVM shims
RalfJung May 4, 2024
52bf84f
move some minimal targets over to the macOS runner, to even out CI times
RalfJung May 4, 2024
9d4eea1
Auto merge of #3556 - RalfJung:intrinsics, r=RalfJung
bors May 4, 2024
49cd705
Auto merge of #3552 - RalfJung:ci, r=RalfJung
bors May 4, 2024
e1c3d67
Revert "moving out sched_getaffinity interception from linux'shim, Fr…
RalfJung May 4, 2024
8b4b259
update 'unsupported' message
RalfJung May 4, 2024
6df585a
freebsd: test std threadname and fs APIs
RalfJung May 4, 2024
38598e6
document unofficially supported OSes
RalfJung May 4, 2024
05e7850
make some tests not need output (so they work on wasm)
RalfJung May 4, 2024
fd15dc3
Auto merge of #3558 - RalfJung:unsupported, r=RalfJung
bors May 4, 2024
3a6faee
Auto merge of #3554 - RalfJung:freebsd, r=RalfJung
bors May 4, 2024
823e31d
add helper function to declare an extern static for a weak symbol
RalfJung May 4, 2024
19aa8a0
make statx a regular function (so we don't need to support the syscall)
RalfJung May 4, 2024
37537d1
Auto merge of #3559 - RalfJung:weak-extern-static, r=RalfJung
bors May 4, 2024
98bb8ac
sync: better error in invalid synchronization primitive ID
RalfJung May 4, 2024
86d7dff
factor some pthread offset into constants
RalfJung May 4, 2024
9503c41
also test pthread_condattr_getclock
RalfJung May 4, 2024
c3f2701
Auto merge of #3560 - RalfJung:sync-check-id, r=RalfJung
bors May 4, 2024
adb74ae
Preparing for merge from rustc
RalfJung May 4, 2024
0c98929
Merge from rustc
RalfJung May 4, 2024
c6e273c
bless and fmt
RalfJung May 4, 2024
a040df7
remove some dead code
RalfJung May 4, 2024
7eda989
Auto merge of #3557 - RalfJung:getaffinity, r=RalfJung
bors May 4, 2024
d0e7772
Auto merge of #3561 - RalfJung:rustup, r=RalfJung
bors May 4, 2024
43e6600
Implement lldb formattter for "clang encoded" enums (LLDB 18.1+)
Apr 23, 2024
cdf3f3c
only show the 'basic API common for this target' message when this is…
RalfJung May 4, 2024
82a8059
Auto merge of #3562 - RalfJung:unsupported, r=RalfJung
bors May 4, 2024
94f922a
Meta: Enable the triagebot transfer command
fmease May 4, 2024
89e8288
Preparing for merge from rustc
RalfJung May 4, 2024
8db37a3
Merge from rustc
RalfJung May 4, 2024
ef5a574
rustc_pull: explain order of operations
RalfJung May 4, 2024
85e061a
fix/extend some comments
RalfJung May 4, 2024
745e3f2
make ExitProcess Windows-only
RalfJung May 4, 2024
e3fe30d
Auto merge of #3563 - RalfJung:rustup, r=RalfJung
bors May 4, 2024
7ba8144
Implement `edition` method on `Rustdoc` type as well
GuillaumeGomez May 4, 2024
a64ba04
Migrate `run-make/doctests-runtool` to rmake
GuillaumeGomez May 4, 2024
b5051c5
update lockfile
RalfJung May 4, 2024
e30ad6f
Tgross feedback tweaks
ultrabear Apr 14, 2024
3ef2528
Make f16 and f128 docs clearer on platform support
ultrabear Apr 15, 2024
5aa2f9a
Make f128 docs mention lack of any normal platform support
ultrabear May 4, 2024
d9d6315
Auto merge of #124631 - Kobzol:arbitrary-try-build, r=pietroalbini
bors May 5, 2024
654afe3
Auto merge of #122253 - MasterAwesome:master, r=davidtwco
bors May 5, 2024
6e146c0
Auto merge of #124458 - VladimirMakaev:lldb-enum-formatter, r=Mark-Si…
bors May 5, 2024
8994315
Auto merge of #124459 - RossSmyth:stable_range, r=davidtwco
bors May 5, 2024
1867f48
Auto merge of #124494 - madsmtm:fix-32bit-watchos-unwind, r=Mark-Simu…
bors May 5, 2024
8b6f931
Auto merge of #124727 - RalfJung:miri-sync, r=RalfJung
bors May 5, 2024
3fbeedb
Auto merge of #123892 - ultrabear:ultrabear_softfloatdoc, r=workingju…
bors May 5, 2024
2e0982d
Auto merge of #124711 - GuillaumeGomez:migrate-doctests-runtool, r=ji…
bors May 5, 2024
69ffc0d
Auto merge of #124725 - fmease:enable-triagebot-transfer, r=jackh726
bors May 5, 2024
394f21c
CI: fix auto builds and make sure that we always have at least a sing…
Kobzol May 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Put the RFC behind a feature gate result_ffi_guarantees
  • Loading branch information
MasterAwesome committed Apr 24, 2024
commit ed532cc186a651a3e4b848ffbef8c080018f1732
3 changes: 3 additions & 0 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ declare_features! (
(incomplete, repr128, "1.16.0", Some(56071)),
/// Allows `repr(simd)` and importing the various simd intrinsics.
(unstable, repr_simd, "1.4.0", Some(27731)),
/// Allows enums like Result<T, E> to be used across FFI, if T's niche value can
/// be used to describe E or vise-versa.
(unstable, result_ffi_guarantees, "CURRENT_RUSTC_VERSION", Some(110503)),
/// Allows bounding the return type of AFIT/RPITIT.
(incomplete, return_type_notation, "1.70.0", Some(109417)),
/// Allows `extern "rust-cold"`.
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_lint/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,10 @@ pub(crate) fn repr_nullable_ptr<'tcx>(
[var_one, var_two] => match (&var_one.fields.raw[..], &var_two.fields.raw[..]) {
([], [field]) | ([field], []) => field.ty(tcx, args),
([field1], [field2]) => {
if !tcx.features().result_ffi_guarantees {
return None;
}

let ty1 = field1.ty(tcx, args);
let ty2 = field2.ty(tcx, args);

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,7 @@ symbols! {
require,
residual,
result,
result_ffi_guarantees,
resume,
return_position_impl_trait_in_trait,
return_type_notation,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `result_ffi_guarantees`

The tracking issue for this feature is: [#110503]

[#110503]: https://github.com/rust-lang/rust/issues/110503

------------------------

This feature adds the possibility of using `Result<T, E>` in FFI if T's niche
value can be used to describe E or vise-versa.

See [RFC 3391] for more information.

[RFC 3391]: https://github.com/rust-lang/rfcs/blob/master/text/3391-result_ffi_guarantees.md
99 changes: 99 additions & 0 deletions tests/ui/feature-gates/feature-gate-result_ffi_guarantees.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#![allow(dead_code)]
#![deny(improper_ctypes)]
#![feature(ptr_internals)]

use std::num;

enum Z {}

#[repr(transparent)]
struct TransparentStruct<T>(T, std::marker::PhantomData<Z>);

#[repr(transparent)]
enum TransparentEnum<T> {
Variant(T, std::marker::PhantomData<Z>),
}

struct NoField;

extern "C" {
fn result_ref_t(x: Result<&'static u8, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_fn_t(x: Result<extern "C" fn(), ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonnull_t(x: Result<std::ptr::NonNull<u8>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_unique_t(x: Result<std::ptr::Unique<u8>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u8_t(x: Result<num::NonZero<u8>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u16_t(x: Result<num::NonZero<u16>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u32_t(x: Result<num::NonZero<u32>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u64_t(x: Result<num::NonZero<u64>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_usize_t(x: Result<num::NonZero<usize>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i8_t(x: Result<num::NonZero<i8>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i16_t(x: Result<num::NonZero<i16>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i32_t(x: Result<num::NonZero<i32>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i64_t(x: Result<num::NonZero<i64>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_isize_t(x: Result<num::NonZero<isize>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_transparent_struct_t(x: Result<TransparentStruct<num::NonZero<u8>>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_transparent_enum_t(x: Result<TransparentEnum<num::NonZero<u8>>, ()>);
//~^ ERROR `extern` block uses type `Result
fn result_phantom_t(x: Result<num::NonZero<u8>, std::marker::PhantomData<()>>);
//~^ ERROR `extern` block uses type `Result
fn result_1zst_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, Z>);
//~^ ERROR `extern` block uses type `Result
fn result_1zst_exhaustive_no_field_t(x: Result<num::NonZero<u8>, NoField>);
//~^ ERROR `extern` block uses type `Result

fn result_ref_e(x: Result<(), &'static u8>);
//~^ ERROR `extern` block uses type `Result
fn result_fn_e(x: Result<(), extern "C" fn()>);
//~^ ERROR `extern` block uses type `Result
fn result_nonnull_e(x: Result<(), std::ptr::NonNull<u8>>);
//~^ ERROR `extern` block uses type `Result
fn result_unique_e(x: Result<(), std::ptr::Unique<u8>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u8_e(x: Result<(), num::NonZero<u8>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u16_e(x: Result<(), num::NonZero<u16>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u32_e(x: Result<(), num::NonZero<u32>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_u64_e(x: Result<(), num::NonZero<u64>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_usize_e(x: Result<(), num::NonZero<usize>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i8_e(x: Result<(), num::NonZero<i8>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i16_e(x: Result<(), num::NonZero<i16>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i32_e(x: Result<(), num::NonZero<i32>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_i64_e(x: Result<(), num::NonZero<i64>>);
//~^ ERROR `extern` block uses type `Result
fn result_nonzero_isize_e(x: Result<(), num::NonZero<isize>>);
//~^ ERROR `extern` block uses type `Result
fn result_transparent_struct_e(x: Result<(), TransparentStruct<num::NonZero<u8>>>);
//~^ ERROR `extern` block uses type `Result
fn result_transparent_enum_e(x: Result<(), TransparentEnum<num::NonZero<u8>>>);
//~^ ERROR `extern` block uses type `Result
fn result_phantom_e(x: Result<num::NonZero<u8>, std::marker::PhantomData<()>>);
//~^ ERROR `extern` block uses type `Result
fn result_1zst_exhaustive_no_variant_e(x: Result<Z, num::NonZero<u8>>);
//~^ ERROR `extern` block uses type `Result
fn result_1zst_exhaustive_no_field_e(x: Result<NoField, num::NonZero<u8>>);
//~^ ERROR `extern` block uses type `Result
}

pub fn main() {}
Loading
Loading