rust/tests/ui/recursion/issue-26548-recursion-via-normalize.rs

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

19 lines
768 B
Rust
Raw Normal View History

2023-06-19 15:29:31 +02:00
//~ ERROR cycle detected when computing layout (naive) of `core::option::Option<S>`
2023-07-12 22:59:01 -04:00
//~| 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
2023-06-19 15:29:31 +02:00
//~| NOTE ...which requires computing layout (naive) of `S`...
//~| NOTE ...which requires computing layout (naive) of `core::option::Option<<S as Mirror>::It>`...
//~| NOTE ...which again requires computing layout (naive) of `core::option::Option<S>`, completing the cycle
//~| NOTE cycle used when computing layout (naive) of `core::option::Option<<S as Mirror>::It>`
2020-05-31 16:11:51 +01:00
trait Mirror {
type It: ?Sized;
}
impl<T: ?Sized> Mirror for T {
type It = Self;
}
struct S(Option<<S as Mirror>::It>);
2020-05-31 16:11:51 +01:00
fn main() {
let _s = S(None);
}