mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +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.
21 lines
410 B
Rust
21 lines
410 B
Rust
// Need a different module so we try to build the mir for `test`
|
|
// before analyzing `mod foo`.
|
|
|
|
mod foo {
|
|
pub trait Callable {
|
|
fn call();
|
|
}
|
|
|
|
impl<V: ?Sized> Callable for () {
|
|
//~^ ERROR the type parameter `V` is not constrained by the impl trait, self type, or predicates
|
|
fn call() {}
|
|
}
|
|
}
|
|
use foo::*;
|
|
|
|
fn test() -> impl Sized {
|
|
<() as Callable>::call()
|
|
}
|
|
|
|
fn main() {}
|