# internals

**URL:** https://internals.rust-lang.org/c/internals/7.md

[Latest](https://internals.rust-lang.org/latest.md) · [Categories](https://internals.rust-lang.org/categories.md)

---

## [About the internals category](https://internals.rust-lang.org/t/about-the-internals-category/24)

<div class="topic-metadata">

**Author:** [@cmr](https://internals.rust-lang.org/u/cmr)\
**Replies:** 0\
**Last updated:** [July 7, 2014, 11:26pm UTC](https://internals.rust-lang.org/t/about-the-internals-category/24 "2014-07-07T23:26:33Z")

</div>

---

## [pre-RFC: LTS for the Rust Toolchain](https://internals.rust-lang.org/t/pre-rfc-lts-for-the-rust-toolchain/24476)

<div class="topic-metadata">

**Author:** [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Replies:** 165\
**Last updated:** [October 1, 2026, 2:54pm UTC](https://internals.rust-lang.org/t/pre-rfc-lts-for-the-rust-toolchain/24476 "2026-10-01T14:54:16Z")

</div>

Disclaimer: I am proposing this as part of my employment at Canonical\[1\]. I am representing an interest of Canonical, but I am not representing Canonical itself. ▶ Intended Improvements I'm very aware of the volume of dis…

---

## [Process for merging core/alloc/std](https://internals.rust-lang.org/t/process-for-merging-core-alloc-std/24613)

<div class="topic-metadata">

**Author:** [@jhpratt](https://internals.rust-lang.org/u/jhpratt)\
**Replies:** 17\
**Last updated:** [September 25, 2026, 6:23pm UTC](https://internals.rust-lang.org/t/process-for-merging-core-alloc-std/24613 "2026-09-25T18:23:38Z")

</div>

Merging core, alloc, and std is something that has been thrown around on a number of occasions and has clear benefits (such as eliminating coherence hacks in the compiler among other things). What would be the process t…

---

## [Rust-lang/rust LLM policy](https://internals.rust-lang.org/t/rust-lang-rust-llm-policy/24504)

<div class="topic-metadata">

**Author:** [@jyn](https://internals.rust-lang.org/u/jyn)\
**Replies:** 12\
**Last updated:** [August 9, 2026, 8:27am UTC](https://internals.rust-lang.org/t/rust-lang-rust-llm-policy/24504 "2026-08-09T08:27:21Z")

</div>

This is a discussion thread for rust-lang/rust's new LLM policy, which has been merged in rust-forge#1040. You can find more information about that policy in the blog post. Please comment here, not on the Forge or blog P…

---

## [More windowing functions for iterators](https://internals.rust-lang.org/t/more-windowing-functions-for-iterators/24491)

<div class="topic-metadata">

**Author:** [@SpiderUnderUrBed](https://internals.rust-lang.org/u/SpiderUnderUrBed)\
**Replies:** 4\
**Last updated:** [July 26, 2026, 11:07am UTC](https://internals.rust-lang.org/t/more-windowing-functions-for-iterators/24491 "2026-07-26T11:07:02Z")

</div>

There is an ongoing effort to introduce .map\_windows into iterators. However, I was wondering if Iterators would benefit for windowing functions, e.g fold\_windows, like fold it contains an accumulator and current wind…

---

## [Contributor Responsibility and Review Cost in the Age of Code Generation](https://internals.rust-lang.org/t/contributor-responsibility-and-review-cost-in-the-age-of-code-generation/24010)

<div class="topic-metadata">

**Author:** [@atix](https://internals.rust-lang.org/u/atix)\
**Replies:** 18\
**Last updated:** [March 6, 2026, 4:26am UTC](https://internals.rust-lang.org/t/contributor-responsibility-and-review-cost-in-the-age-of-code-generation/24010 "2026-03-06T04:26:12Z")

</div>

hiya! this is my first post here. I’d like to start a discussion about contributor responsibility and review cost in the context of AI-assisted code generation There have been periodic discussions about whether Rust sho…

---

## [Unexpected compiler optimisation: archiving your dependencies](https://internals.rust-lang.org/t/unexpected-compiler-optimisation-archiving-your-dependencies/23918)

<div class="topic-metadata">

**Author:** [@HjVT](https://internals.rust-lang.org/u/HjVT)\
**Replies:** 21\
**Last updated:** [January 18, 2026, 10:43pm UTC](https://internals.rust-lang.org/t/unexpected-compiler-optimisation-archiving-your-dependencies/23918 "2026-01-18T22:43:34Z")

</div>

Stumbled upon this blogpost today, and it immediately made me wonder if applying this to Rust tooling would yield significant benifit to compile times, and more importantly - rust-analyzer startup times. At a glance, …

---

## [Returning a large type into a \`Box\` without copies](https://internals.rust-lang.org/t/returning-a-large-type-into-a-box-without-copies/23224)

<div class="topic-metadata">

**Author:** [@pubfnbar](https://internals.rust-lang.org/u/pubfnbar)\
**Replies:** 17\
**Last updated:** [July 22, 2025, 9:20am UTC](https://internals.rust-lang.org/t/returning-a-large-type-into-a-box-without-copies/23224 "2025-07-22T09:20:05Z")

</div>

I've been under the impression that rustc tends to return large types from functions by allocating the space for it before the function call, passing the address of the allocated memory to the function, and writing the r…

---

## [Question about long-standing issues](https://internals.rust-lang.org/t/question-about-long-standing-issues/23220)

<div class="topic-metadata">

**Author:** [@Evian-Zhang](https://internals.rust-lang.org/u/Evian-Zhang)\
**Replies:** 10\
**Last updated:** [July 17, 2025, 4:37am UTC](https://internals.rust-lang.org/t/question-about-long-standing-issues/23220 "2025-07-17T04:37:48Z")

</div>

First of all, this post is not emotion-driven, and I am fully aware that the developers of Rust project work very hard. I'm not here to push anyone or blame anyone. There are two main types of issues in Rust project tha…

---

## [Wrapping shift operator code doing bitmasking twice](https://internals.rust-lang.org/t/wrapping-shift-operator-code-doing-bitmasking-twice/23167)

<div class="topic-metadata">

**Author:** [@hkBst](https://internals.rust-lang.org/u/hkBst)\
**Replies:** 1\
**Last updated:** [July 7, 2025, 11:50am UTC](https://internals.rust-lang.org/t/wrapping-shift-operator-code-doing-bitmasking-twice/23167 "2025-07-07T11:50:41Z")

</div>

This question starts from this clippy output: warning: suspicious use of \`&\` in \`Shl\` impl --\> library/core/src/num/wrapping.rs:152:53 | 144 | / macro\_rules! sh\_impl\_unsigned { 145 | | ($t:ident, $f:ident) =\> …

---

## [\`Vec::reserve()\` amortization guarantees in loops](https://internals.rust-lang.org/t/vec-reserve-amortization-guarantees-in-loops/23060)

<div class="topic-metadata">

**Author:** [@akazecik](https://internals.rust-lang.org/u/akazecik)\
**Replies:** 1\
**Last updated:** [June 8, 2025, 9:57pm UTC](https://internals.rust-lang.org/t/vec-reserve-amortization-guarantees-in-loops/23060 "2025-06-08T21:57:41Z")

</div>

Hi, please let me know if this question is better suited for https://users.rust-lang.org/. If so, I'll move it there. Generally, in many programming languages, calling collection.reserve\_exact(additional) from within a …

---

## [Optimize generic functions for MIR by the compiler](https://internals.rust-lang.org/t/optimize-generic-functions-for-mir-by-the-compiler/23035)

<div class="topic-metadata">

**Author:** [@AbstractiveNord](https://internals.rust-lang.org/u/AbstractiveNord)\
**Replies:** 1\
**Last updated:** [June 3, 2025, 12:30pm UTC](https://internals.rust-lang.org/t/optimize-generic-functions-for-mir-by-the-compiler/23035 "2025-06-03T12:30:57Z")

</div>

I am not quite sure is it possible for now, but does Rust compiler have all necessary diagnostic to automatically convert generic functions into pairs of generic entry and inner function that do some work?

---

## [Add bit\_len() function](https://internals.rust-lang.org/t/add-bit-len-function/23031)

<div class="topic-metadata">

**Author:** [@Timmmm](https://internals.rust-lang.org/u/Timmmm)\
**Replies:** 3\
**Last updated:** [June 3, 2025, 12:38am UTC](https://internals.rust-lang.org/t/add-bit-len-function/23031 "2025-06-03T00:38:30Z")

</div>

It would be useful to have a function that gets the bit length of unsigned integers. I.e. 0b0 -\> 0 0b101 -\> 3 0b1110 -\> 4 Python has this via 7.bit\_length(). Rust almost has it via 7.ilog2(), but it's actually not the …

---

## [Optimize unnecessary O(n^2) check in \`slice::get\_disjoint\_mut\`](https://internals.rust-lang.org/t/optimize-unnecessary-o-n-2-check-in-slice-get-disjoint-mut/22759)

<div class="topic-metadata">

**Author:** [@yaksher](https://internals.rust-lang.org/u/yaksher)\
**Replies:** 12\
**Last updated:** [April 20, 2025, 9:11pm UTC](https://internals.rust-lang.org/t/optimize-unnecessary-o-n-2-check-in-slice-get-disjoint-mut/22759 "2025-04-20T21:11:08Z")

</div>

The current implementation of slice::get\_disjoint\_mut warns of an O(n^2) check for overlaps between the arguments; while this shouldn't generally be a major issue, it's also an entirely unnecessary one, since the check c…

---

## [Run-time Dynamic type-casting (RTTI), contd](https://internals.rust-lang.org/t/run-time-dynamic-type-casting-rtti-contd/22711)

<div class="topic-metadata">

**Author:** [@fresh\_rooster](https://internals.rust-lang.org/u/fresh_rooster)\
**Replies:** 2\
**Last updated:** [April 8, 2025, 3:07pm UTC](https://internals.rust-lang.org/t/run-time-dynamic-type-casting-rtti-contd/22711 "2025-04-08T15:07:36Z")

</div>

Sry, I'd like to answer to Run-time Dynamic type-casting (RTTI) - #25 by andreytkachenko, but that topic has been closed, hope you don't mind me creating a new one. I tried to map the vtable to symbol name (using dladdr)…

---

## [New data type idea: counter](https://internals.rust-lang.org/t/new-data-type-idea-counter/22476)

<div class="topic-metadata">

**Author:** [@iuabdw](https://internals.rust-lang.org/u/iuabdw)\
**Replies:** 3\
**Last updated:** [February 27, 2025, 10:54pm UTC](https://internals.rust-lang.org/t/new-data-type-idea-counter/22476 "2025-02-27T22:54:55Z")

</div>

A counter is just a binary value that increments up and is to be called locally. Why is this useful? It saves more space than an integer and it's only purpose it to keep track of how many times something has happened, s…

---

## [Optimizing Fallback Algorithms for Float Parsing](https://internals.rust-lang.org/t/optimizing-fallback-algorithms-for-float-parsing/22156)

<div class="topic-metadata">

**Author:** [@Alexhuszagh](https://internals.rust-lang.org/u/Alexhuszagh)\
**Replies:** 6\
**Last updated:** [January 28, 2025, 9:26pm UTC](https://internals.rust-lang.org/t/optimizing-fallback-algorithms-for-float-parsing/22156 "2025-01-28T21:26:24Z")

</div>

After implementing a fast and correct float parsing algorithm, there is one major point of optimization still. This only occurs in rare cases, but would make the core library implementation optimal for every case. I'm th…

---

## [What is the status on the panic-free subset of Rust idea?](https://internals.rust-lang.org/t/what-is-the-status-on-the-panic-free-subset-of-rust-idea/22155)

<div class="topic-metadata">

**Author:** [@Paladynee](https://internals.rust-lang.org/u/Paladynee)\
**Replies:** 21\
**Last updated:** [January 20, 2025, 3:36am UTC](https://internals.rust-lang.org/t/what-is-the-status-on-the-panic-free-subset-of-rust-idea/22155 "2025-01-20T03:36:51Z")

</div>

This idea encapsulates the usage of a custom core library that does not provide panicking functions and instead makes every API return an Option or Result of sorts, or use fallback approaches wherever applicable. I'm tal…

---

## [Type inference breakage in 1.80 has not been handled well](https://internals.rust-lang.org/t/type-inference-breakage-in-1-80-has-not-been-handled-well/21374)

<div class="topic-metadata">

**Author:** [@kornel](https://internals.rust-lang.org/u/kornel)\
**Replies:** 52\
**Last updated:** [December 22, 2024, 4:44pm UTC](https://internals.rust-lang.org/t/type-inference-breakage-in-1-80-has-not-been-handled-well/21374 "2024-12-22T16:44:05Z")

</div>

Rust 1.80 broke builds of almost all versions of the very popular time crate (edit: please don't shoot the messenger in that GitHub thread!!!) Rust has left only a 4-month old version working. That was not enough time f…

---

## [\[BUG\] Rounding error that break the ensurance of f32::div\_euclid](https://internals.rust-lang.org/t/bug-rounding-error-that-break-the-ensurance-of-f32-div-euclid/21917)

<div class="topic-metadata">

**Author:** [@Neutron3529](https://internals.rust-lang.org/u/Neutron3529)\
**Replies:** 25\
**Last updated:** [December 10, 2024, 9:41pm UTC](https://internals.rust-lang.org/t/bug-rounding-error-that-break-the-ensurance-of-f32-div-euclid/21917 "2024-12-10T21:41:20Z")

</div>

Considering the following code: let a = 1.10000001430511474609375\_f32; // equivlent to let a = 1.1f32; but 1.1 is not the exact value. assert\_eq!(a, 1.1); let b = 11f32; let c = b.div\_euclid(a); // expect 9, since 1.100…

---

## [Rust playground stuck without timeout](https://internals.rust-lang.org/t/rust-playground-stuck-without-timeout/21881)

<div class="topic-metadata">

**Author:** [@nisembedded](https://internals.rust-lang.org/u/nisembedded)\
**Replies:** 9\
**Last updated:** [November 23, 2024, 3:13pm UTC](https://internals.rust-lang.org/t/rust-playground-stuck-without-timeout/21881 "2024-11-23T15:13:33Z")

</div>

I create some simple code who accidentally stuck rust playground and no timeout termination for this: use tokio::sync::Mutex; #\[tokio::main\] async fn main() { let mutex = Mutex::new(0); tracing::info!("before"…

---

## [Global-allocator and weird Zephyr issue](https://internals.rust-lang.org/t/global-allocator-and-weird-zephyr-issue/21226)

<div class="topic-metadata">

**Author:** [@d3zd3z](https://internals.rust-lang.org/u/d3zd3z)\
**Replies:** 4\
**Last updated:** [July 29, 2024, 10:00pm UTC](https://internals.rust-lang.org/t/global-allocator-and-weird-zephyr-issue/21226 "2024-07-29T22:00:00Z")

</div>

I am working to add support to Zephyr to make it easy for users of Zephyr to write their apps using Rust. I am running into a rather weird issue with #\[global\_allocator\] and Zephyr's "USERSPACE" feature. I am implementi…

---

## [Any updates on the Rust Trademark?](https://internals.rust-lang.org/t/any-updates-on-the-rust-trademark/21256)

<div class="topic-metadata">

**Author:** [@programmerjake](https://internals.rust-lang.org/u/programmerjake)\
**Replies:** 1\
**Last updated:** [July 26, 2024, 1:37pm UTC](https://internals.rust-lang.org/t/any-updates-on-the-rust-trademark/21256 "2024-07-26T13:37:53Z")

</div>

It's been quite a while since there was last a public update on Rust's progress towards getting a new trademark policy, can someone provide an update on how that going, and maybe an estimated date when the new policy wil…

---

## [Problems porting standard library to my OS](https://internals.rust-lang.org/t/problems-porting-standard-library-to-my-os/20962)

<div class="topic-metadata">

**Author:** [@pjht](https://internals.rust-lang.org/u/pjht)\
**Replies:** 3\
**Last updated:** [June 5, 2024, 5:57pm UTC](https://internals.rust-lang.org/t/problems-porting-standard-library-to-my-os/20962 "2024-06-05T17:57:57Z")

</div>

I'm writing my own OS in rust and recently started trying to port the rust stdlib to it. I've made it far enough to get a program to compile and be loaded by my kernel, but the stdlib initialization code seems to overflo…

---

## [Warn on needless allows](https://internals.rust-lang.org/t/warn-on-needless-allows/20895)

<div class="topic-metadata">

**Author:** [@mr\_rustbot](https://internals.rust-lang.org/u/mr_rustbot)\
**Replies:** 6\
**Last updated:** [May 23, 2024, 12:01am UTC](https://internals.rust-lang.org/t/warn-on-needless-allows/20895 "2024-05-23T00:01:33Z")

</div>

When lints are triggered, people often add an allow instead of fixing them. But later, the lint may go away for some reason - maybe it was a false positive and the bug was fixed, or maybe the dev actually fixed the probl…

---

## [Detect forked process](https://internals.rust-lang.org/t/detect-forked-process/20748)

<div class="topic-metadata">

**Author:** [@correabuscar](https://internals.rust-lang.org/u/correabuscar)\
**Replies:** 1\
**Last updated:** [May 2, 2024, 4:12am UTC](https://internals.rust-lang.org/t/detect-forked-process/20748 "2024-05-02T04:12:49Z")

</div>

Hi, since this is attempting to modify rust internally (in file rustc-1.76.0-src/library/std/src/rt.rs) I thought this might be a better place to ask than urlo. I'm trying to set a bool to true if the current process is…

---

## [High memory usage on random file reads using \`seek\_read\` (Windows)](https://internals.rust-lang.org/t/high-memory-usage-on-random-file-reads-using-seek-read-windows/20396)

<div class="topic-metadata">

**Author:** [@nazar-pc](https://internals.rust-lang.org/u/nazar-pc)\
**Replies:** 14\
**Last updated:** [March 4, 2024, 11:54am UTC](https://internals.rust-lang.org/t/high-memory-usage-on-random-file-reads-using-seek-read-windows/20396 "2024-03-04T11:54:02Z")

</div>

Here is a small app://! \`\`\`cargo //! \[dependencies\] //! libc = "0.2.151" //! rand = "0.8.5" //! //! \[target.'cfg(windows)'.dependencies\] //! winapi = { version = "0.3.9", features = …

---

## [Prohibit the use of unwrap() and increase Panics privacy!](https://internals.rust-lang.org/t/prohibit-the-use-of-unwrap-and-increase-panics-privacy/20263)

<div class="topic-metadata">

**Author:** [@rxdiscovery](https://internals.rust-lang.org/u/rxdiscovery)\
**Replies:** 26\
**Last updated:** [February 13, 2024, 4:13pm UTC](https://internals.rust-lang.org/t/prohibit-the-use-of-unwrap-and-increase-panics-privacy/20263 "2024-02-13T16:13:51Z")

</div>

Hello, is it possible to add a directive prohibiting the use of unwrap() without exception control? like : #!\[forbid(unsafe\_code)\] for example, have something like this: #!\[forbid(unwrap)\] I think unwrap should only b…

---

## [Improve format of Rust RFC, like Python PEP](https://internals.rust-lang.org/t/improve-format-of-rust-rfc-like-python-pep/20180)

<div class="topic-metadata">

**Author:** [@hehaoqian](https://internals.rust-lang.org/u/hehaoqian)\
**Replies:** 6\
**Last updated:** [January 16, 2024, 6:44am UTC](https://internals.rust-lang.org/t/improve-format-of-rust-rfc-like-python-pep/20180 "2024-01-16T06:44:30Z")

</div>

Compare to PEP (Python Enhance Proposal), The format of Rust RFCs is much more informal. Rust RFCs are very unlikely to be updated, while PEPs are updated whenever its status changed (Draft, accepted, Final), with ever…

---

## [Isnt the const f64::MANTISSA\_DIGITS wrongly set as 53 instead of 52?](https://internals.rust-lang.org/t/isnt-the-const-f64-mantissa-digits-wrongly-set-as-53-instead-of-52/19978)

<div class="topic-metadata">

**Author:** [@vri](https://internals.rust-lang.org/u/vri)\
**Replies:** 9\
**Last updated:** [December 6, 2023, 12:19pm UTC](https://internals.rust-lang.org/t/isnt-the-const-f64-mantissa-digits-wrongly-set-as-53-instead-of-52/19978 "2023-12-06T12:19:06Z")

</div>

Hello, Isnt the const f64::MANTISSA\_DIGITS wrong ? . The reason for asking for the above is because Microsoft docs shows it as 52 and even numpy reports it as 52 assert np.finfo('float64').nmant, 52 Before I raise a…

[Next page](https://internals.rust-lang.org/c/internals/7.md?page=1)
