rust-lang / rust-lang/rust

Regression: overflow evaluating X: MetaSized

Open
#143,830 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

F-sized_hierarchy P-low regression-from-stable-to-stable T-compiler T-types
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

See https://crater-reports.s3.amazonaws.com/beta-1.89-4/beta-2025-07-03/gh/red-lightning123.hwc/log.txt:


[INFO] [stdout] error[E0275]: overflow evaluating the requirement `ElementArray: MetaSized`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/mod.rs:3:48
[INFO] [stdout]     |
[INFO] [stdout] 3   | pub fn parse_file_tokens(tokens : &[Token]) -> Result<File, String> {
[INFO] [stdout]     |                                                ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout] note: required for `Box<ElementArray>` to implement `ParseTokens`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/combinators.rs:5:32
[INFO] [stdout]     |
[INFO] [stdout] 5   | impl<T : ParseTokens + ?Sized> ParseTokens for Box<T> {
[INFO] [stdout]     |      -                         ^^^^^^^^^^^     ^^^^^^
[INFO] [stdout]     |      |
[INFO] [stdout]     |      unsatisfied trait bound introduced here
[INFO] [stdout] note: required because it appears within the type `NestElement`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/nest_element.rs:7:5
[INFO] [stdout]     |
[INFO] [stdout] 7   |     NestElement,
[INFO] [stdout]     |     ^^^^^^^^^^^
[INFO] [stdout] note: required for `combinators::Any<(NestElement, TextElement, EmptyElement)>` to implement `ParseTokens`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/combinators.rs:110:38
[INFO] [stdout]     |
[INFO] [stdout] 110 |           impl<$($T : ParseTokens, )*> ParseTokens for Any<($($T, )*)> {
[INFO] [stdout]     |                                        ^^^^^^^^^^^     ^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 139 | / impl_any_up_to! {
[INFO] [stdout] 140 | |     [AnyVariants8 AnyVariants7 AnyVariants6 AnyVariants5 AnyVariants4 AnyVariants3 AnyVariants2 AnyVariants1]
[INFO] [stdout] 141 | |     [V8 V7 V6 V5 V4 V3 V2 V1]
[INFO] [stdout] 142 | |     [T8 T7 T6 T5 T4 T3 T2 T1]
[INFO] [stdout]     | |                           -- unsatisfied trait bound introduced here
[INFO] [stdout] 143 | | }
[INFO] [stdout]     | |_- in this macro invocation
[INFO] [stdout] note: required because it appears within the type `element::Element`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/element.rs:7:5
[INFO] [stdout]     |
[INFO] [stdout] 7   |     Element,
[INFO] [stdout]     |     ^^^^^^^
[INFO] [stdout] note: required for `Group<(Optional<Whitespace>, element::Element, Optional<Whitespace>)>` to implement `ParseTokens`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/combinators.rs:47:38
[INFO] [stdout]     |
[INFO] [stdout] 47  |         impl<$($T : ParseTokens, )*> ParseTokens for Group<($($T, )*)> {
[INFO] [stdout]     |                                      ^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 59  | impl_group_up_to! { T8 T7 T6 T5 T4 T3 T2 T1 }
[INFO] [stdout]     | ---------------------------------------------
[INFO] [stdout]     | |                                     |
[INFO] [stdout]     | |                                     unsatisfied trait bound introduced here
[INFO] [stdout]     | in this macro invocation
[INFO] [stdout] note: required because it appears within the type `file::File`
[INFO] [stdout]    --> hwc_lang_cbml/src/tags/src/parse/file.rs:7:5
[INFO] [stdout]     |
[INFO] [stdout] 7   |     File,
[INFO] [stdout]     |     ^^^^
[INFO] [stdout] note: required by an implicit `Sized` bound in `Result`
[INFO] [stdout]    --> /rustc/b5e10d8c000a153cae6a14d70372dc4b39439a3f/library/core/src/result.rs:548:1
[INFO] [stdout]     = note: this error originates in the macro `impl_any_traits_up_to` which comes from the expansion of the macro `impl_group_up_to` (in Nightly builds, run with -Z macro-backtrace for more info)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Crater log and trace the reported overflow through hwc_lang_cbml/src/tags/src/parse/mod.rs, parse/combinators.rs, nest_element.rs, element.rs, and file.rs. Reproduce the compiler error if the external report remains available, then identify the regression boundary and verify that the same input no longer overflows without breaking the affected ParseTokens implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.