Skip to content

Beta ICE: ItemLocalIds not assigned densely  #56128

Closed
@matklad

Description

@matklad

Hi! I am seeing an ICE in rust-analyzer, when updating rustc from rustc 1.31.0-beta.14 to rustc 1.31.0-beta.15 (so, seems pretty bad?).

Error message:

   Compiling ra_syntax v0.1.0 (/home/matklad/projects/rust-analyzer/crates/ra_syntax)               
thread 'main' panicked at 'librustc/hir/map/hir_id_validator.rs:31:                                 
ItemLocalIds not assigned densely in ::grammar[0]::expressions[0]::{{?}}[1]. Max ItemLocalId = 4, missing IDs = ["[local_id: 1, node:unknown node (id=28193)]", "[local_id: 2, node:path segment super (id=28192)]"]; seens IDs = ["(NodeId(28191) use grammar::expressions::{{?}} (id=28191))", "(NodeId(28195) path segment atom (id=28195))", "(NodeId(28194) path segment self (id=28194))"]
HirIdValidator: The recorded owner of path segment super (id=28192) is ::grammar[0]::expressions[0]::{{?}}[1] instead of ::grammar[0]::expressions[0]::{{?}}[2]
HirIdValidator: Same HirId ::grammar[0]::expressions[0]::{{?}}[2]/2 assigned for nodes path segment super (id=28192) and path segment atom (id=92512)
HirIdValidator: The recorded owner of path segment super (id=28192) is ::grammar[0]::expressions[0]::{{?}}[1] instead of ::grammar[0]::expressions[0]::{{?}}[3]
HirIdValidator: Same HirId ::grammar[0]::expressions[0]::{{?}}[3]/2 assigned for nodes path segment super (id=28192) and path segment atom (id=92515)', librustc/util/bug.rs:47:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.                                                  
                                                                                                    
error: internal compiler error: unexpected panic                                                    
                                                                                                    
note: the compiler unexpectedly panicked. this is a bug.                                            
                                                                                                    
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
                                                                                                    
note: rustc 1.31.0-beta.15 (4b3a1d911 2018-11-20) running on x86_64-unknown-linux-gnu               
                                                                                                    
note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib                                
                                                                                                    
note: some of the compiler flags provided by cargo are hidden                                       
                                                                                                    
error: Could not compile `ra_syntax`.                                                               
warning: build failed, waiting for other jobs to finish...
thread 'main' panicked at 'librustc/hir/map/hir_id_validator.rs:31:                                 
ItemLocalIds not assigned densely in ::grammar[0]::expressions[0]::{{?}}[1]. Max ItemLocalId = 4, missing IDs = ["[local_id: 1, node:unknown node (id=28200)]", "[local_id: 2, node:path segment super (id=28199)]"]; seens IDs = ["(NodeId(28198) use grammar::expressions::{{?}} (id=28198))", "(NodeId(28202) path segment atom (id=28202))", "(NodeId(28201) path segment self (id=28201))"]
HirIdValidator: The recorded owner of path segment super (id=28199) is ::grammar[0]::expressions[0]::{{?}}[1] instead of ::grammar[0]::expressions[0]::{{?}}[2]
HirIdValidator: Same HirId ::grammar[0]::expressions[0]::{{?}}[2]/2 assigned for nodes path segment super (id=28199) and path segment atom (id=104341)
HirIdValidator: The recorded owner of path segment super (id=28199) is ::grammar[0]::expressions[0]::{{?}}[1] instead of ::grammar[0]::expressions[0]::{{?}}[3]
HirIdValidator: Same HirId ::grammar[0]::expressions[0]::{{?}}[3]/2 assigned for nodes path segment super (id=28199) and path segment atom (id=104344)', librustc/util/bug.rs:47:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.                                                  
                                                                                                    
error: internal compiler error: unexpected panic                                                    
                                                                                                    
note: the compiler unexpectedly panicked. this is a bug.                                            
                                                                                                    
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
                                                                                                    
note: rustc 1.31.0-beta.15 (4b3a1d911 2018-11-20) running on x86_64-unknown-linux-gnu               
                                                                                                    
note: compiler flags: -C debuginfo=2 -C incremental                                                 
                                                                                                    
note: some of the compiler flags provided by cargo are hidden  

Steps to reproduce:

$ git clone [email protected]:rust-analyzer/rust-analyzer.git
$ cd rust-analyzer
$ git reset --hard 049f8df93cca05af395ce873738dc85d5a25f3fc
$ cargo test

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-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