From 0eb364b8d6f6b77f0c43467d81867f7a196a1794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=B3n=20Orell=20Valerian=20Liehr?= Date: Wed, 17 May 2023 19:47:23 +0200 Subject: [PATCH] Exclude inherent projections from some alias ty matches --- tests/ui/issue-111399.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/ui/issue-111399.rs diff --git a/tests/ui/issue-111399.rs b/tests/ui/issue-111399.rs new file mode 100644 index 00000000000..b65e6c7261a --- /dev/null +++ b/tests/ui/issue-111399.rs @@ -0,0 +1,13 @@ +#![feature(inherent_associated_types)] +#![allow(incomplete_features)] + +// Check that rustc doesn't crash on the trait bound `Self::Ty: std::marker::Freeze`. + +pub struct Struct; + +impl Struct { + pub type Ty = usize; + pub const CT: Self::Ty = 42; +} + +fn main() {}