Closed
Description
Minified example (Playground)
pub struct VectorizerOptions {
pub tokenizer: &'static (Fn(&str) -> Vec<&str>),
}
pub fn main() {
let opts = VectorizerOptions {
tokenizer: &str::split
};
}
Tested working as expected on stable and beta:
error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
--> src/main.rs:7:20
|
7 | tokenizer: &str::split
| ^^^^^^^^^^^ expected function that takes 1 argument
|
= note: required for the cast to the object type `for<'r> std::ops::Fn(&'r str) -> std::vec::Vec<&'r str>`
error: aborting due to previous error
Nightly on 2018-02-05 and 2018-02-06 throw the following ICE:
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: internal compiler error: unexpected panic