rust/tests/ui/issues/issue-6936.rs
Lukas Wirth eae7fe1bdb Use non-2015 edition paths in tests that do not test for their resolution
This allows for testing these tests on editions other than 2015
2025-06-03 13:35:31 +02:00

35 lines
553 B
Rust

struct T;
mod t1 {
type Foo = crate::T;
mod Foo {} //~ ERROR the name `Foo` is defined multiple times
}
mod t2 {
type Foo = crate::T;
struct Foo; //~ ERROR the name `Foo` is defined multiple times
}
mod t3 {
type Foo = crate::T;
enum Foo {} //~ ERROR the name `Foo` is defined multiple times
}
mod t4 {
type Foo = crate::T;
fn Foo() {} // ok
}
mod t5 {
type Bar<T> = T;
mod Bar {} //~ ERROR the name `Bar` is defined multiple times
}
mod t6 {
type Foo = crate::T;
impl Foo {} // ok
}
fn main() {}