Closed
Description
The following code causes an error
impl<'b, B: Ty<'b>, I: SIterator, F> SIterator for FilterMap<I, F> where
F: FnMut(<I as Ty>::V) -> Option<<B as Ty>::V>
{}
pub trait SIterator: for<'a> Ty<'a> {}
pub trait Ty<'a> {
type V;
}
Errors:
Compiling playground v0.0.1 (/playground)
error[E0465]: multiple rlib candidates for `debug_unreachable` found
|
= note: candidate #1: /playground/target/debug/deps/libdebug_unreachable-53cbbc8451f8a571.rlib
= note: candidate #2: /playground/target/debug/deps/libdebug_unreachable-9f86ee3a7179ede7.rlib
error[E0412]: cannot find type `FilterMap` in this scope
--> src/lib.rs:1:52
|
1 | impl<'b, B: Ty<'b>, I: SIterator, F> SIterator for FilterMap<I, F> where
| ^^^^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
|
1 | use core::iter::FilterMap;
|
1 | use futures::stream::FilterMap;
|
1 | use itertools::__std_iter::FilterMap;
|
1 | use rayon::iter::FilterMap;
|
and 2 other candidates
error: internal compiler error: src/librustc_typeck/astconv.rs:1097: anonymous bound region BrAnon(0) in binding but not trait ref
--> src/lib.rs:2:31
|
2 | F: FnMut(<I as Ty>::V) -> Option<<B as Ty>::V>
| ^^^^^^^^^^^^^^^^^^^^
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:578:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0412`.
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.37.0-nightly (b25ee6449 2019-06-17) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `playground`.
To learn more, run the command again with --verbose.