mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 11:47:13 +00:00

As a temporary measure while a proper fix for `tests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs` is implemented, make `MetaSized` obligations always hold. In effect, temporarily reverting the `sized_hierarchy` feature. This is a small change that can be backported.
24 lines
614 B
Rust
24 lines
614 B
Rust
//@ compile-flags: --crate-type=lib
|
|
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[current] check-pass
|
|
//@[next] check-pass
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
// FIXME(sized_hierarchy): this is expected to fail in the old solver when there
|
|
// isn't a temporary revert of the `sized_hierarchy` feature
|
|
|
|
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);
|
|
impl ParseTokens for Element {
|
|
type Output = ();
|
|
}
|