diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-10 19:45:48 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-10 19:45:48 +1000 |
| commit | 62b406d4b185f28828df3e0df6b1aa1f560145df (patch) | |
| tree | a3720e028c717f4136e1e555311c436c2a84aeb0 /tests/ui/imports | |
| parent | 5955f005e53234b71f77d33040b973e6b9551db3 (diff) | |
| parent | 16765639b30741dde85da0dbcb44c343eb82b1a2 (diff) | |
| download | rust-62b406d4b185f28828df3e0df6b1aa1f560145df.tar.gz rust-62b406d4b185f28828df3e0df6b1aa1f560145df.zip | |
Rollup merge of #144403 - Kivooeo:issue4, r=jieyouxu
`tests/ui/issues/`: The Issues Strike Back [4/N] Some `tests/ui/issues/` housekeeping, to trim down number of tests directly under `tests/ui/issues/`. Part of https://github.com/rust-lang/rust/issues/133895. r? ````````@jieyouxu````````
Diffstat (limited to 'tests/ui/imports')
| -rw-r--r-- | tests/ui/imports/enum-variant-import-path-15774.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/imports/enum-variant-import-path-15774.rs b/tests/ui/imports/enum-variant-import-path-15774.rs new file mode 100644 index 00000000000..583fe4da179 --- /dev/null +++ b/tests/ui/imports/enum-variant-import-path-15774.rs @@ -0,0 +1,27 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/15774 + +//@ edition: 2015 +//@ run-pass + +#![deny(warnings)] +#![allow(unused_imports)] + +pub enum Foo { A } +mod bar { + pub fn normal(x: ::Foo) { + use Foo::A; + match x { + A => {} + } + } + pub fn wrong(x: ::Foo) { + match x { + ::Foo::A => {} + } + } +} + +pub fn main() { + bar::normal(Foo::A); + bar::wrong(Foo::A); +} |
