Skip to content

ICE when attempting to split error message that contains " found" before "expected" into lines #31173

Closed
@tormol

Description

@tormol

In librustc::session::split_msg_into_multiline().

With the error "type mismatch resolving for<'r> <F2 as core::ops::FnOnce<(&'r mut core::option::Option<T>, found_opts::FoundOpt)>>::Output == core::result::Result<(), collections::string::String>: expected type parameter, found ()",

it finds the " found" in " found_opts::" before " found ()".

Then pos1 becomes (182, 191) and pos2= (91, 97), which makes &msg[pos1.1..pos2.0] at line 360 fail.

Metadata

Metadata

Assignees

Labels

I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions