2025-07-01 21:46:28 +05:00
|
|
|
//! Checks that methods with names starting with an underscore (`_`) can be
|
|
|
|
|
//! successfully called directly on integer literals, confirming the correct
|
|
|
|
|
//! parsing of such expressions where the underscore is part of the method identifier.
|
|
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2019-07-27 00:54:25 +03:00
|
|
|
|
2025-07-01 21:46:28 +05:00
|
|
|
trait Tr: Sized {
|
2017-05-12 22:00:06 +09:00
|
|
|
fn _method_on_numbers(self) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Tr for i32 {}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
42._method_on_numbers();
|
|
|
|
|
}
|