rust-lang / trait-system-refactor-initiative

The Rustc Trait System Refactor Initiative
21 stars 0 forks source link

addr2line fails to relate an opaque type #106

Open lcnr opened 6 months ago

lcnr commented 6 months ago

https://github.com/gimli-rs/addr2line/blob/ade443f2ba6ce26a5dfddde1210f41aa46d96b92/src/lib.rs#L355-L363

results in the following error when building with the new solver

error[E0284]: type annotations needed: cannot satisfy `impl core::iter::Iterator<Item = (SplitDwarfLoad<R>, impl FnOnce(Option<Arc<Dwarf<R>>>) -> Result<(), gimli::Error> + '_)> == _`
   --> src/lib.rs:358:10
    |
358 |       ) -> impl Iterator<
    |  __________^
359 | |         Item = (
360 | |             SplitDwarfLoad<R>,
361 | |             impl FnOnce(Option<Arc<gimli::Dwarf<R>>>) -> Result<(), gimli::Error> + '_,
362 | |         ),
363 | |     > {
    | |_____^ cannot satisfy `impl core::iter::Iterator<Item = (SplitDwarfLoad<R>, impl FnOnce(Option<Arc<Dwarf<R>>>) -> Result<(), gimli::Error> + '_)> == _`

This is blocking bootstrap. I have not yet looked into the underlying reasons for the ambiguity.

lcnr commented 5 months ago

This is caused by well-formedness checking trying to normalize types in the function signature while computing the implied bounds. draft fix in https://github.com/rust-lang/rust/pull/124598