]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-21520.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / issues / issue-21520.rs
CommitLineData
60c5eb7d 1// check-pass
0bf4aa26 2#![allow(dead_code)]
85aaf69f
SL
3// Test that the requirement (in `Bar`) that `T::Bar : 'static` does
4// not wind up propagating to `T`.
223e47cc 5
c34b1796
AL
6// pretty-expanded FIXME #23616
7
85aaf69f
SL
8pub trait Foo {
9 type Bar;
1a4d82fc 10
85aaf69f
SL
11 fn foo(&self) -> Self;
12}
13
14pub struct Static<T:'static>(T);
15
16struct Bar<T:Foo>
17 where T::Bar : 'static
18{
19 x: Static<Option<T::Bar>>
20}
223e47cc
LB
21
22fn main() { }