about summary refs log tree commit diff
path: root/tests/codegen/integer-overflow.rs
diff options
context:
space:
mode:
authorSasha Pourcelot <sasha.pourcelot@protonmail.com>2025-06-13 12:47:53 +0200
committerSasha Pourcelot <sasha.pourcelot@protonmail.com>2025-06-13 14:58:28 +0200
commit527f35a28f2661e40b1b6824103861312f3a188d (patch)
tree07d30e5f207825b171cae01d7fc60432e7777d82 /tests/codegen/integer-overflow.rs
parent6c8138de8f1c96b2f66adbbc0e37c73525444750 (diff)
downloadrust-527f35a28f2661e40b1b6824103861312f3a188d.tar.gz
rust-527f35a28f2661e40b1b6824103861312f3a188d.zip
doc: mention that intrinsics should not be called in user code
Intrinsic functions declared in `std::intrinsics` are an implementation
detail and should not be called directly by the user. The compiler
explicitly warns against their use in user code:

```
warning: the feature `core_intrinsics` is internal to the compiler or standard library
 --> src/lib.rs:1:12
  |
1 | #![feature(core_intrinsics)]
  |            ^^^^^^^^^^^^^^^
  |
  = note: using it is strongly discouraged
  = note: `#[warn(internal_features)]` on by default
```

[**Playground link**]

This PR documents what the compiler warning says: these intrinsics should
not be called outside the standard library.

[**Playground link**]: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=1c893b0698291f550bbdde0151fd221b
Diffstat (limited to 'tests/codegen/integer-overflow.rs')
0 files changed, 0 insertions, 0 deletions