]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/dont-eagerly-error-in-is-const-evaluatable.rs
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / const-generics / generic_const_exprs / dont-eagerly-error-in-is-const-evaluatable.rs
1 // run-pass
2 #![feature(generic_const_exprs)]
3 #![allow(incomplete_features)]
4
5 // This test is a repro for #82279. It checks that we don't error
6 // when calling is_const_evaluatable on `std::mem::size_of::<T>()`
7 // when looking for candidates that may prove `T: Foo` in `foo`
8
9 trait Foo {}
10
11 #[allow(dead_code)]
12 fn foo<T: Foo>() {}
13
14 impl<T> Foo for T where [(); std::mem::size_of::<T>()]:  {}
15
16 fn main() {}