Skip to content

1.100 beta crater regression: ICE "is not an owner" #164084

Open

Description

@theemathas

This regression was discovered in the 1.100 beta crater run.

[INFO] [stdout] warning: trait method `into_iter` will become ambiguous in Rust 2021
[INFO] [stdout]   --> examples/into_iter.rs:17:30
[INFO] [stdout]    |
[INFO] [stdout] 17 |       let flattened: Vec<u8> = vecs_array
[INFO] [stdout]    |  ______________________________^
[INFO] [stdout] 18 | |                                 .into_iter()
[INFO] [stdout]    | |____________________________________________^ help: disambiguate the associated function: `ArrayIntoIter::into_iter(vecs_array)`
[INFO] [stdout]    |
[INFO] [stdout]    = warning: this changes meaning in Rust 2021
[INFO] [stdout]    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html>
[INFO] [stdout]    = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: trait method `into_iter` will become ambiguous in Rust 2021
[INFO] [stdout]    --> tests/basic.rs:170:18
[INFO] [stdout]     |
[INFO] [stdout] 170 |         Vec::from_iter(NUMBERS.into_iter()),
[INFO] [stdout]     |                        ^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `ArrayIntoIter::into_iter(NUMBERS)`
[INFO] [stdout]     |
[INFO] [stdout]     = warning: this changes meaning in Rust 2021
[INFO] [stdout]     = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html>
[INFO] [stdout]     = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default
[INFO] [stdout] error: internal compiler error: /rustc-dev/e3feeb59cd1bdd011a2bfcc0747b55125d9b8527/compiler/rustc_middle/src/hir/map.rs:141:32: DefId(0:7 ~ stackvec[f77c]::prelude::{use#0}::{use#1}) is not an owner
[INFO] [stdout]   --> src/lib.rs:37:9
[INFO] [stdout]    |
[INFO] [stdout] 37 |         ArrayIntoIter,
[INFO] [stdout]    |         ^^^^^^^^^^^^^

https://crater-reports.s3.amazonaws.com/beta-1.100-3/1.100.0-beta.1/reg/stackvec-0.2.1/log.txt

Possibly related to #163374

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    C-bugCategory: This is a bug.
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Oct 10, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 10, 2026
  3. Kuksgauzen commented on Oct 10, 2026

    @Kuksgauzen
    Contributor

    Same ICE as #163374, so this looks like a duplicate. The MCVE there bisects to #161349: #163374 (comment)

    stackvec 0.2.1 (from crates.io; it sets no edition, so 2015) reproduces with cargo +beta build --all-targets (1.100.0-beta.4) and builds fine on 1.99.0. A plain cargo build does not trigger it: the ICE comes from building the tests and examples, as crater does. The backtrace goes through the same trait_path_or_bare_name → hir_expect_item path, and bisecting stackvec on the CI builds around the merge (--start f7575a9da8e4 --end 0d38a842626a) gives the same commit, 0d38a842626a (#161349).

    One difference from the #163374 MCVE: here the lint is array_into_iter, which is warn-by-default, so no attribute is needed. Reduced from stackvec, this ICEs on 1.100.0-beta.4 and nightly-2026-10-10 (32dba69d6) with rustc --edition 2015 or --edition 2018, compiles with a warning on 1.99.0, and also bisects to 0d38a842626a:

    use iter::{ArrayIntoIter};
    mod iter {
        pub trait ArrayIntoIter {
            fn into_iter(self) -> u8;
        }
        impl ArrayIntoIter for [u8; 1] {
            fn into_iter(self) -> u8 { 0 }
        }
    }
    fn main() {
        let _ = [0u8].into_iter();
    }

    With use iter::ArrayIntoIter; (no braces) it compiles fine. So edition 2015/2018 code can hit this with default lint levels: it takes an .into_iter() call on an array plus a same-named trait method imported through a use list.

    @rustbot label -E-needs-bisection -E-needs-mcve +S-has-bisection +S-has-mcve

  4. added
    S-has-bisectionStatus: A bisection has been found for this issue
    S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
    and removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Oct 10, 2026
  5. theemathas commented on Oct 11, 2026

    @theemathas
    ContributorAuthor

    @Kuksgauzen Thank you for contributing! Although, I would like to note our LLM policy. LLM text tends to contain excessive unnecessary information and be overly verbose. Many people find such text unpleasant to read. So, we would prefer that you manually summarize the LLM output. Thanks!

  6. added
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}S-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions