mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
27 lines
508 B
Rust
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!()
|
|
}
|
|
}
|