about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorSteven <smmalis37@gmail.com>2023-12-16 19:29:45 -0500
committerSteven <smmalis37@gmail.com>2024-02-16 23:52:33 +0000
commit40719384e1da64776d0ee67a84ffdfacc67816b0 (patch)
treef3b65fbe97b61a25910fab32ef376036895bec88 /compiler/rustc_codegen_llvm/src/errors.rs
parentbccb9bbb418a30aeb332052e721beb6ebc6b1ce7 (diff)
downloadrust-40719384e1da64776d0ee67a84ffdfacc67816b0.tar.gz
rust-40719384e1da64776d0ee67a84ffdfacc67816b0.zip
Use a hardcoded constant instead of calling OpenProcessToken.
Now that Win 7 support is dropped, we can resurrect #90144.

GetCurrentProcessToken is defined in processthreadsapi.h as:

FORCEINLINE
HANDLE
GetCurrentProcessToken (
    VOID
    )
{
    return (HANDLE)(LONG_PTR) -4;
}

Since it's very unlikely that this constant will ever change, let's just use it instead of making calls to get the same information.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions