diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/traits/issue-97695-double-trivial-bound.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/traits/issue-97695-double-trivial-bound.rs b/src/test/ui/traits/issue-97695-double-trivial-bound.rs new file mode 100644 index 000000000..213605b51 --- /dev/null +++ b/src/test/ui/traits/issue-97695-double-trivial-bound.rs @@ -0,0 +1,24 @@ +// compile-flags: -Zinline-mir --emit=mir +// build-pass + +pub trait Associate { + type Associated; +} + +pub struct Wrap<'a> { + pub field: &'a i32, +} + +pub trait Create<T> { + fn create() -> Self; +} + +pub fn oh_no<'a, T>() +where + Wrap<'a>: Associate, + <Wrap<'a> as Associate>::Associated: Create<T>, +{ + <Wrap<'a> as Associate>::Associated::create(); +} + +pub fn main() {} |