Skip to content

hang in parser::diagnostics::expected_one_of_not_found() #124897

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

I tried this code:

trait TraitA<'a, 'b, 'c> { type AsA; }
trait TraitB<'a, 'b> { type AsB; }
trait TraitC<'a, 'b, 'c> {}
struct X;
struct Y;
struct Z;

fn foo<T>() where for<const N: u8 = { T::<0>::A as u8 + TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>::B as u8 }> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>> {}

fn main() {}

on stable 1.78.0, this checks in 0.02 seconds.
on beta 1.79.0-beta.3, this hangs somewhere in parser::diagnostics::expected_one_of_not_found(), I killed it after 5 minutes of no progress.

Metadata

Metadata

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.regression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions