about summary refs log tree commit diff
path: root/tests/ui/parser/integer-literal-method-call-underscore.rs
blob: 9e4abf28cbaa6fc6a16ce1342f508918b0d87742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! 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.

//@ run-pass

trait Tr: Sized {
    fn _method_on_numbers(self) {}
}

impl Tr for i32 {}

fn main() {
    42._method_on_numbers();
}