]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-52992.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / nll / issue-52992.rs
CommitLineData
b7449926
XL
1// Regression test for an NLL-related ICE (#52992) -- computing
2// implied bounds was causing outlives relations that were not
3// properly handled.
2c00a5a8 4//
60c5eb7d 5// check-pass
b7449926 6
b7449926
XL
7fn main() {}
8
9fn fail<'a>() -> Struct<'a, Generic<()>> {
10 Struct(&Generic(()))
2c00a5a8 11}
3157f602 12
b7449926
XL
13struct Struct<'a, T>(&'a T) where
14 T: Trait + 'a,
15 T::AT: 'a; // only fails with this bound
16
17struct Generic<T>(T);
18
19trait Trait {
20 type AT;
a7813a04
XL
21}
22
b7449926
XL
23impl<T> Trait for Generic<T> {
24 type AT = T; // only fails with a generic AT
25}