diff options
Diffstat (limited to 'tests/ui/sized-hierarchy/overflow.rs')
| -rw-r--r-- | tests/ui/sized-hierarchy/overflow.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/sized-hierarchy/overflow.rs b/tests/ui/sized-hierarchy/overflow.rs new file mode 100644 index 00000000000..e1af4885e53 --- /dev/null +++ b/tests/ui/sized-hierarchy/overflow.rs @@ -0,0 +1,21 @@ +//@ compile-flags: --crate-type=lib +//@ revisions: current next +//@ ignore-compare-mode-next-solver (explicit revisions) +//@[next] check-pass +//@[next] compile-flags: -Znext-solver + +use std::marker::PhantomData; + +trait ParseTokens { + type Output; +} +impl<T: ParseTokens + ?Sized> ParseTokens for Box<T> { + type Output = (); +} + +struct Element(<Box<Box<Element>> as ParseTokens>::Output); +//[current]~^ ERROR overflow evaluating +impl ParseTokens for Element { +//[current]~^ ERROR overflow evaluating + type Output = (); +} |
