Files
rust/tests/ui/sized-hierarchy/overflow.rs

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

23 lines
531 B
Rust
Raw Normal View History

//@ compile-flags: --crate-type=lib
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[current] check-fail
//@[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
impl ParseTokens for Element {
//[current]~^ ERROR: overflow
type Output = ();
}