From 7df032738c9d9b9f5a9ea30aa66138e8548d4a3a Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Mon, 19 Jul 2021 07:24:07 +0200 Subject: [PATCH 1/2] add testcase for 87076 using https://github.com/rust-lang/rust/issues/87076#issuecomment-878090143 as testcase --- .../ui/const-generics/issues/issue-87076.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/ui/const-generics/issues/issue-87076.rs diff --git a/src/test/ui/const-generics/issues/issue-87076.rs b/src/test/ui/const-generics/issues/issue-87076.rs new file mode 100644 index 0000000000000..5dfda943bf69c --- /dev/null +++ b/src/test/ui/const-generics/issues/issue-87076.rs @@ -0,0 +1,20 @@ +// build-pass + +#![feature(const_generics)] +#![allow(incomplete_features)] + +#[derive(PartialEq, Eq)] +pub struct UnitDims { + pub time: u8, + pub length: u8, +} + +pub struct UnitValue; + +impl UnitValue { + fn crash() {} +} + +fn main() { + UnitValue::<{ UnitDims { time: 1, length: 2 } }>::crash(); +} From 05217d5e70cb27067eda4e9a8d13f6bed081e240 Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Mon, 19 Jul 2021 07:25:27 +0200 Subject: [PATCH 2/2] move const-generic issues into seperate directory --- src/test/ui/const-generics/{ => issues}/auxiliary/impl-const.rs | 0 .../{ => issues}/issue-61522-array-len-succ.full.stderr | 0 .../{ => issues}/issue-61522-array-len-succ.min.stderr | 0 .../ui/const-generics/{ => issues}/issue-61522-array-len-succ.rs | 0 .../issue-66596-impl-trait-for-str-const-arg.min.stderr | 0 .../{ => issues}/issue-66596-impl-trait-for-str-const-arg.rs | 0 src/test/ui/const-generics/{ => issues}/issue-67375.full.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67375.min.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67375.rs | 0 src/test/ui/const-generics/{ => issues}/issue-67945-1.full.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67945-1.min.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67945-1.rs | 0 src/test/ui/const-generics/{ => issues}/issue-67945-2.full.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67945-2.min.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67945-2.rs | 0 src/test/ui/const-generics/{ => issues}/issue-67945-3.full.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67945-3.min.stderr | 0 src/test/ui/const-generics/{ => issues}/issue-67945-3.rs | 0 .../{ => issues}/issue-68104-print-stack-overflow.rs | 0 .../ui/const-generics/{ => issues}/issue-70180-1-stalled_on.rs | 0 .../ui/const-generics/{ => issues}/issue-70180-2-stalled_on.rs | 0 src/test/ui/const-generics/{ => issues}/issue-71202.rs | 0 src/test/ui/const-generics/{ => issues}/issue-71986.rs | 0 src/test/ui/const-generics/{ => issues}/issue-73899.rs | 0 src/test/ui/const-generics/{ => issues}/issue-74906.rs | 0 src/test/ui/const-generics/{ => issues}/issue-75763.rs | 0 .../issue-79518-default_trait_method_normalization.rs | 0 .../issue-79518-default_trait_method_normalization.stderr | 0 .../{ => issues}/issue-80561-incorrect-param-env.rs | 0 src/test/ui/const-generics/{ => issues}/issue-86820.rs | 0 src/test/ui/const-generics/{ => issues}/issue-86820.stderr | 0 31 files changed, 0 insertions(+), 0 deletions(-) rename src/test/ui/const-generics/{ => issues}/auxiliary/impl-const.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-61522-array-len-succ.full.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-61522-array-len-succ.min.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-61522-array-len-succ.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-66596-impl-trait-for-str-const-arg.min.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-66596-impl-trait-for-str-const-arg.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-67375.full.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67375.min.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67375.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-1.full.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-1.min.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-1.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-2.full.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-2.min.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-2.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-3.full.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-3.min.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-67945-3.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-68104-print-stack-overflow.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-70180-1-stalled_on.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-70180-2-stalled_on.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-71202.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-71986.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-73899.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-74906.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-75763.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-79518-default_trait_method_normalization.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-79518-default_trait_method_normalization.stderr (100%) rename src/test/ui/const-generics/{ => issues}/issue-80561-incorrect-param-env.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-86820.rs (100%) rename src/test/ui/const-generics/{ => issues}/issue-86820.stderr (100%) diff --git a/src/test/ui/const-generics/auxiliary/impl-const.rs b/src/test/ui/const-generics/issues/auxiliary/impl-const.rs similarity index 100% rename from src/test/ui/const-generics/auxiliary/impl-const.rs rename to src/test/ui/const-generics/issues/auxiliary/impl-const.rs diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.full.stderr b/src/test/ui/const-generics/issues/issue-61522-array-len-succ.full.stderr similarity index 100% rename from src/test/ui/const-generics/issue-61522-array-len-succ.full.stderr rename to src/test/ui/const-generics/issues/issue-61522-array-len-succ.full.stderr diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr b/src/test/ui/const-generics/issues/issue-61522-array-len-succ.min.stderr similarity index 100% rename from src/test/ui/const-generics/issue-61522-array-len-succ.min.stderr rename to src/test/ui/const-generics/issues/issue-61522-array-len-succ.min.stderr diff --git a/src/test/ui/const-generics/issue-61522-array-len-succ.rs b/src/test/ui/const-generics/issues/issue-61522-array-len-succ.rs similarity index 100% rename from src/test/ui/const-generics/issue-61522-array-len-succ.rs rename to src/test/ui/const-generics/issues/issue-61522-array-len-succ.rs diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.min.stderr b/src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.min.stderr similarity index 100% rename from src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.min.stderr rename to src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.min.stderr diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs b/src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs similarity index 100% rename from src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs rename to src/test/ui/const-generics/issues/issue-66596-impl-trait-for-str-const-arg.rs diff --git a/src/test/ui/const-generics/issue-67375.full.stderr b/src/test/ui/const-generics/issues/issue-67375.full.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67375.full.stderr rename to src/test/ui/const-generics/issues/issue-67375.full.stderr diff --git a/src/test/ui/const-generics/issue-67375.min.stderr b/src/test/ui/const-generics/issues/issue-67375.min.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67375.min.stderr rename to src/test/ui/const-generics/issues/issue-67375.min.stderr diff --git a/src/test/ui/const-generics/issue-67375.rs b/src/test/ui/const-generics/issues/issue-67375.rs similarity index 100% rename from src/test/ui/const-generics/issue-67375.rs rename to src/test/ui/const-generics/issues/issue-67375.rs diff --git a/src/test/ui/const-generics/issue-67945-1.full.stderr b/src/test/ui/const-generics/issues/issue-67945-1.full.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67945-1.full.stderr rename to src/test/ui/const-generics/issues/issue-67945-1.full.stderr diff --git a/src/test/ui/const-generics/issue-67945-1.min.stderr b/src/test/ui/const-generics/issues/issue-67945-1.min.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67945-1.min.stderr rename to src/test/ui/const-generics/issues/issue-67945-1.min.stderr diff --git a/src/test/ui/const-generics/issue-67945-1.rs b/src/test/ui/const-generics/issues/issue-67945-1.rs similarity index 100% rename from src/test/ui/const-generics/issue-67945-1.rs rename to src/test/ui/const-generics/issues/issue-67945-1.rs diff --git a/src/test/ui/const-generics/issue-67945-2.full.stderr b/src/test/ui/const-generics/issues/issue-67945-2.full.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67945-2.full.stderr rename to src/test/ui/const-generics/issues/issue-67945-2.full.stderr diff --git a/src/test/ui/const-generics/issue-67945-2.min.stderr b/src/test/ui/const-generics/issues/issue-67945-2.min.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67945-2.min.stderr rename to src/test/ui/const-generics/issues/issue-67945-2.min.stderr diff --git a/src/test/ui/const-generics/issue-67945-2.rs b/src/test/ui/const-generics/issues/issue-67945-2.rs similarity index 100% rename from src/test/ui/const-generics/issue-67945-2.rs rename to src/test/ui/const-generics/issues/issue-67945-2.rs diff --git a/src/test/ui/const-generics/issue-67945-3.full.stderr b/src/test/ui/const-generics/issues/issue-67945-3.full.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67945-3.full.stderr rename to src/test/ui/const-generics/issues/issue-67945-3.full.stderr diff --git a/src/test/ui/const-generics/issue-67945-3.min.stderr b/src/test/ui/const-generics/issues/issue-67945-3.min.stderr similarity index 100% rename from src/test/ui/const-generics/issue-67945-3.min.stderr rename to src/test/ui/const-generics/issues/issue-67945-3.min.stderr diff --git a/src/test/ui/const-generics/issue-67945-3.rs b/src/test/ui/const-generics/issues/issue-67945-3.rs similarity index 100% rename from src/test/ui/const-generics/issue-67945-3.rs rename to src/test/ui/const-generics/issues/issue-67945-3.rs diff --git a/src/test/ui/const-generics/issue-68104-print-stack-overflow.rs b/src/test/ui/const-generics/issues/issue-68104-print-stack-overflow.rs similarity index 100% rename from src/test/ui/const-generics/issue-68104-print-stack-overflow.rs rename to src/test/ui/const-generics/issues/issue-68104-print-stack-overflow.rs diff --git a/src/test/ui/const-generics/issue-70180-1-stalled_on.rs b/src/test/ui/const-generics/issues/issue-70180-1-stalled_on.rs similarity index 100% rename from src/test/ui/const-generics/issue-70180-1-stalled_on.rs rename to src/test/ui/const-generics/issues/issue-70180-1-stalled_on.rs diff --git a/src/test/ui/const-generics/issue-70180-2-stalled_on.rs b/src/test/ui/const-generics/issues/issue-70180-2-stalled_on.rs similarity index 100% rename from src/test/ui/const-generics/issue-70180-2-stalled_on.rs rename to src/test/ui/const-generics/issues/issue-70180-2-stalled_on.rs diff --git a/src/test/ui/const-generics/issue-71202.rs b/src/test/ui/const-generics/issues/issue-71202.rs similarity index 100% rename from src/test/ui/const-generics/issue-71202.rs rename to src/test/ui/const-generics/issues/issue-71202.rs diff --git a/src/test/ui/const-generics/issue-71986.rs b/src/test/ui/const-generics/issues/issue-71986.rs similarity index 100% rename from src/test/ui/const-generics/issue-71986.rs rename to src/test/ui/const-generics/issues/issue-71986.rs diff --git a/src/test/ui/const-generics/issue-73899.rs b/src/test/ui/const-generics/issues/issue-73899.rs similarity index 100% rename from src/test/ui/const-generics/issue-73899.rs rename to src/test/ui/const-generics/issues/issue-73899.rs diff --git a/src/test/ui/const-generics/issue-74906.rs b/src/test/ui/const-generics/issues/issue-74906.rs similarity index 100% rename from src/test/ui/const-generics/issue-74906.rs rename to src/test/ui/const-generics/issues/issue-74906.rs diff --git a/src/test/ui/const-generics/issue-75763.rs b/src/test/ui/const-generics/issues/issue-75763.rs similarity index 100% rename from src/test/ui/const-generics/issue-75763.rs rename to src/test/ui/const-generics/issues/issue-75763.rs diff --git a/src/test/ui/const-generics/issue-79518-default_trait_method_normalization.rs b/src/test/ui/const-generics/issues/issue-79518-default_trait_method_normalization.rs similarity index 100% rename from src/test/ui/const-generics/issue-79518-default_trait_method_normalization.rs rename to src/test/ui/const-generics/issues/issue-79518-default_trait_method_normalization.rs diff --git a/src/test/ui/const-generics/issue-79518-default_trait_method_normalization.stderr b/src/test/ui/const-generics/issues/issue-79518-default_trait_method_normalization.stderr similarity index 100% rename from src/test/ui/const-generics/issue-79518-default_trait_method_normalization.stderr rename to src/test/ui/const-generics/issues/issue-79518-default_trait_method_normalization.stderr diff --git a/src/test/ui/const-generics/issue-80561-incorrect-param-env.rs b/src/test/ui/const-generics/issues/issue-80561-incorrect-param-env.rs similarity index 100% rename from src/test/ui/const-generics/issue-80561-incorrect-param-env.rs rename to src/test/ui/const-generics/issues/issue-80561-incorrect-param-env.rs diff --git a/src/test/ui/const-generics/issue-86820.rs b/src/test/ui/const-generics/issues/issue-86820.rs similarity index 100% rename from src/test/ui/const-generics/issue-86820.rs rename to src/test/ui/const-generics/issues/issue-86820.rs diff --git a/src/test/ui/const-generics/issue-86820.stderr b/src/test/ui/const-generics/issues/issue-86820.stderr similarity index 100% rename from src/test/ui/const-generics/issue-86820.stderr rename to src/test/ui/const-generics/issues/issue-86820.stderr