diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-26095.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-26095.rs b/src/test/ui/issues/issue-26095.rs new file mode 100644 index 000000000..638f8f571 --- /dev/null +++ b/src/test/ui/issues/issue-26095.rs @@ -0,0 +1,23 @@ +// check-pass +#![allow(dead_code)] +#![allow(non_upper_case_globals)] + + +trait HasNumber<T> { + const Number: usize; +} + +enum One {} +enum Two {} + +enum Foo {} + +impl<T> HasNumber<T> for One { + const Number: usize = 1; +} + +impl<T> HasNumber<T> for Two { + const Number: usize = 2; +} + +fn main() {} |