rust/tests/crashes/118185-2.rs
2024-04-18 18:55:20 +02:00

27 lines
508 B
Rust

//@ known-bug: #118185
fn main() {
let target: Target = create_target();
target.get(0); // correct arguments work
target.get(10.0); // CRASH HERE
}
// must be generic
fn create_target<T>() -> T {
unimplemented!()
}
// unimplemented trait, but contains function with the same name
pub trait RandomTrait {
fn get(&mut self); // but less arguments
}
struct Target;
impl Target {
// correct function with arguments
pub fn get(&self, data: i32) {
unimplemented!()
}
}