mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
5bbf0a8306
This reverts commit557359f925
, reversing changes made to1e6c09a803
.
19 lines
728 B
Rust
19 lines
728 B
Rust
//~ ERROR cycle detected when computing layout of `core::option::Option<S>`
|
|
//~| NOTE see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
|
|
//~| NOTE ...which requires computing layout of `S`...
|
|
//~| NOTE ...which requires computing layout of `core::option::Option<<S as Mirror>::It>`...
|
|
//~| NOTE ...which again requires computing layout of `core::option::Option<S>`, completing the cycle
|
|
//~| NOTE cycle used when computing layout of `core::option::Option<<S as Mirror>::It>`
|
|
|
|
trait Mirror {
|
|
type It: ?Sized;
|
|
}
|
|
impl<T: ?Sized> Mirror for T {
|
|
type It = Self;
|
|
}
|
|
struct S(Option<<S as Mirror>::It>);
|
|
|
|
fn main() {
|
|
let _s = S(None);
|
|
}
|