about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/declare.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-26 17:25:33 +0200
committerGitHub <noreply@github.com>2024-08-26 17:25:33 +0200
commitb9dfb4d6f8bc15b4c2e918f490021735a9261c36 (patch)
tree31069120dcc6f2e60d0ceb8f72e4f994c5a8f1f7 /compiler/rustc_codegen_llvm/src/declare.rs
parentd0b3c3a110816f0bfe609f59407b7ee9d8b13be2 (diff)
parent4f3ef2ac90d957c5b36e1d7e662dba1f7b533db8 (diff)
downloadrust-b9dfb4d6f8bc15b4c2e918f490021735a9261c36.tar.gz
rust-b9dfb4d6f8bc15b4c2e918f490021735a9261c36.zip
Rollup merge of #129592 - saethlin:core-cfg-test, r=tgross35
Remove cfg(test) from library/core

The diff here is very small with the ignore whitespace option.

`core` doesn't/can't have unit tests. All of its tests are just modules under `tests/`, so it has no use for `cfg(test)`, because the entire contents of `library/core/src` are only ever compiled with that cfg off, and the entire contents of `library/core/tests` are only ever compiled with that cfg on.

You can tell this is what's happening because we had `#[cfg(test)]` on a module declaration that has no source file.

I also deleted the extra `mod tests {` layer of nesting; there's no need to mention again in the module path that this is a module of tests. This exposes a name collision between the `u128` module of tests and `core::u128`. Fixed that by using `<u128>::MAX` like is done in the `check!` macro, which is what avoids this name ambiguity for the other types.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/declare.rs')
0 files changed, 0 insertions, 0 deletions