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