rust/tests/rustdoc/const-generics/lazy_normalization_consts/const-equate-pred.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
450 B
Rust
Raw Normal View History

2020-07-28 17:00:55 -05:00
#![crate_name = "foo"]
#![feature(generic_const_exprs)]
2020-07-28 17:00:55 -05:00
#![allow(incomplete_features)]
// Checking if `Send` is implemented for `Hasher` requires us to evaluate a `ConstEquate` predicate,
// which previously caused an ICE.
pub struct Hasher<T> {
cv_stack: T,
}
unsafe impl<T: Default> Send for Hasher<T> {}
// @has foo/struct.Foo.html
// @has - '//h3[@class="code-header"]' 'impl Send for Foo'
2020-07-28 17:00:55 -05:00
pub struct Foo {
hasher: Hasher<[u8; 3]>,
}