-
Notifications
You must be signed in to change notification settings - Fork 13.7k
cg_llvm: Replace the llvm::Bool
typedef with a proper newtype
#145817
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
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
Some changes occurred in compiler/rustc_codegen_llvm/src/builder/autodiff.rs cc @ZuseZ4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, except please clarify the behavior of non-standard values (those greater than 1, and smaller than 0).
This avoids the need for `#![allow(non_upper_case_globals)]`.
Added a comment explaining the handling of boolean values that aren't 0 or 1 (diff). Note that technically this is a change from the pre-existing behaviour (which tends to compare against |
@bors r+ rollup |
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype This should be nicer and more type-safe than the old typedef for `c_int`/`i32`. Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype This should be nicer and more type-safe than the old typedef for `c_int`/`i32`. Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
Rollup of 6 pull requests Successful merges: - #135761 (Dial down detail of B-tree description) - #144373 (remove deprecated Error::description in impls) - #145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts) - #145783 (add span to struct pattern rest (..)) - #145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype) - #145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`) r? `@ghost` `@rustbot` modify labels: rollup
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype This should be nicer and more type-safe than the old typedef for `c_int`/`i32`. Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
Rollup of 5 pull requests Successful merges: - #135761 (Dial down detail of B-tree description) - #144373 (remove deprecated Error::description in impls) - #145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts) - #145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype) - #145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`) r? `@ghost` `@rustbot` modify labels: rollup
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype This should be nicer and more type-safe than the old typedef for `c_int`/`i32`. Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype try-job: dist-various-2
This comment has been minimized.
This comment has been minimized.
Rollup of 10 pull requests Successful merges: - #135761 (Dial down detail of B-tree description) - #145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts) - #145788 (Fix attribute target checking for macro calls) - #145794 (bootstrap.py: Improve CPU detection on NetBSD) - #145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype) - #145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`) - #145828 (Update `bitflags` to 2.9.3.) - #145830 (Remove the lifetime from `ExpTokenPair`/`SeqSep`.) - #145836 (Remove outdated bug comments) - #145842 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #145817 - Zalathar:llvm-bool, r=workingjubilee cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype This should be nicer and more type-safe than the old typedef for `c_int`/`i32`. Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
This should be nicer and more type-safe than the old typedef for
c_int
/i32
.Using
#[repr(transparent)]
should ensure that it's still ABI-compatible.