diff options
| author | bors <bors@rust-lang.org> | 2018-05-25 18:30:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-25 18:30:06 +0000 |
| commit | 827013a31b88e536e85b8e6ceb5b9988042ec335 (patch) | |
| tree | 2f4527603327f3996eb42813cae163caa0296f70 /src/test/run-pass/impl-trait/issue-49376.rs | |
| parent | a7756804103447ea4e68a71ccf071e7ad8f7a03e (diff) | |
| parent | b3785a31cdae1c164504db6da9c0f8fe6834d4c3 (diff) | |
| download | rust-1.26.1.tar.gz rust-1.26.1.zip | |
Auto merge of #51045 - Mark-Simulacrum:stable-point, r=alexcrichton 1.26.1
Stable point release (1.26.1) This includes all items on [the wishlist](https://github.com/rust-lang/rust/issues/50756), plus https://github.com/rust-lang/rust/pull/50694, which backported cleanly. The target date is May 29th, Tuesday next week. cc @rust-lang/compiler @oli-obk @eddyb -- I backported https://github.com/rust-lang/rust/pull/50812, but it wasn't a clean patch so review would be appreciated.
Diffstat (limited to 'src/test/run-pass/impl-trait/issue-49376.rs')
| -rw-r--r-- | src/test/run-pass/impl-trait/issue-49376.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/run-pass/impl-trait/issue-49376.rs b/src/test/run-pass/impl-trait/issue-49376.rs new file mode 100644 index 00000000000..b687b485fce --- /dev/null +++ b/src/test/run-pass/impl-trait/issue-49376.rs @@ -0,0 +1,29 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Tests for nested self-reference which caused a stack overflow. + +use std::fmt::Debug; +use std::ops::*; + +fn gen() -> impl PartialOrd + PartialEq + Debug { } + +struct Bar {} +trait Foo<T = Self> {} +impl Foo for Bar {} + +fn foo() -> impl Foo { + Bar {} +} + +fn test_impl_ops() -> impl Add + Sub + Mul + Div { 1 } +fn test_impl_assign_ops() -> impl AddAssign + SubAssign + MulAssign + DivAssign { 1 } + +fn main() {} |
