error[E0308]: mismatched types
  --> $DIR/mismatched-types-in-associated-type-87490.rs:10:5
   |
LL | fn follow(_: &str) -> <&str as StreamOnce>::Position {
   |                       ------------------------------ expected `usize` because of return type
LL |     String::new
   |     ^^^^^^^^^^^ expected `usize`, found fn item
   |
   = note: expected type `usize`
           found fn item `fn() -> String {String::new}`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.
