Files
rust/tests/ui/resolve/struct-function-same-name-2550.rs
2026-02-01 04:09:25 +00:00

20 lines
247 B
Rust

//! Regression test for https://github.com/rust-lang/rust/issues/2550
//@ run-pass
#![allow(dead_code)]
#![allow(non_snake_case)]
struct C {
x: usize,
}
fn C(x: usize) -> C {
C { x }
}
fn f<T>(_x: T) {}
pub fn main() {
f(C(1));
}