4

Better suggestions when user tries to collect into an unsized `[_]` by compiler-...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/91443
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

compiler-errors commented on Dec 2, 2021

  1. Extend the predicate on rustc_on_unimplemented to support substitutions like note, label, etc (i.e. treat it as a OnUnimplementedFormatString) so we can have slightly more general rustc_on_unimplemented special-cases.
  2. Add a rustc_on_unimplemented if we fail on FromIterator<A> for [A] which happens when we don't explicitly collect into a vec<A>, but then pass the return from a .collect call into something that takes a slice.

Fixes #91423


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK