rust/tests/crashes/118185.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
508 B
Rust
Raw Normal View History

2024-04-16 23:01:07 +00:00
//@ 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!()
}
}