Skip to content

Commit 49944c3

Browse files
Rollup merge of rust-lang#143056 - fmease:mv-ace-test-out-of-gci-dir, r=BoxyUwU
Move an ACE test out of the GCI directory In rust-lang#122988, a test pertaining to `associated_const_equality` was placed into the directory meant for `generic_const_items`. Let's move it where it belongs. While at it, I took the time to further minimize the test and to add a description. You can use 1.67.1 (as reported in rust-lang#108220) to verify that I didn't butcher it. For additional context, the issue was likely fixed in rust-lang#112718 (but I'm also cc'ing rust-lang#140467 which further fixed things up and has more context). I only performed quick and dirty git/GitHub archeology, so I don't have the full picture here. For one, I'm not even sure if this regression test is worth it. Anyway, I just want it gone from the GCI dir :)
2 parents 4a32934 + 169e81c commit 49944c3

File tree

2 files changed

+17
-35
lines changed

2 files changed

+17
-35
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// The impl of lint `const_evaluatable_unchecked` used to wrongly assume and `assert!` that
2+
// successfully evaluating a type-system constant that has non-region args had to be an anon const.
3+
// In the case below however we have a type-system assoc const (here: `<() as TraitA<T>>::K`).
4+
//
5+
// issue: <https://github.com/rust-lang/rust/issues/108220>
6+
//@ check-pass
7+
#![feature(associated_const_equality)]
8+
9+
pub trait TraitA<T> { const K: u8 = 0; }
10+
pub trait TraitB<T> {}
11+
12+
impl<T> TraitA<T> for () {}
13+
impl<T> TraitB<T> for () where (): TraitA<T, K = 0> {}
14+
15+
fn check<T>() where (): TraitB<T> {}
16+
17+
fn main() {}

tests/ui/generic-const-items/assoc-const-AnonConst-ice-108220.rs

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy