The rustc deprecated_where_clause_location lint warns when an associated type's where clause is written before the = (the deprecated position) and suggests moving it after.
gccrs currently parses only the deprecated position and hard-errors on the modern one:
impl Trait for S {
type Assoc where Self: Sized = Self; // accepted by gccrs
// type Assoc = Self where Self: Sized; // gccrs: "expecting `;` but `where` found"
}
Because the corrected form is a parse error, the lint would fire on the only syntax gccrs accepts and have no valid alternative to suggest, so it is not implementable today. Supporting the modern type Assoc = ... where ...; position would both fix a parser gap and unblock the lint.
The rustc
deprecated_where_clause_locationlint warns when an associated type'swhereclause is written before the=(the deprecated position) and suggests moving it after.gccrs currently parses only the deprecated position and hard-errors on the modern one:
Because the corrected form is a parse error, the lint would fire on the only syntax gccrs accepts and have no valid alternative to suggest, so it is not implementable today. Supporting the modern
type Assoc = ... where ...;position would both fix a parser gap and unblock the lint.