diff options
| author | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2016-07-02 02:11:00 +0300 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2016-07-02 02:20:45 +0300 |
| commit | 201cdd33df63f378ed6c7e9cf55458e1c382cd97 (patch) | |
| tree | e3d7f3dfbf8acf5029b7e29b19bed35061ef2900 /src/test | |
| parent | ea0dc9297283daff6486807f43e190b4eb561412 (diff) | |
| download | rust-201cdd33df63f378ed6c7e9cf55458e1c382cd97.tar.gz rust-201cdd33df63f378ed6c7e9cf55458e1c382cd97.zip | |
fail obligations that depend on erroring obligations
Fix a bug where an obligation that depend on an erroring obligation would be regarded as successful, leading to global cache pollution and random lossage. Fixes #33723. Fixes #34503.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-34503.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-34503.rs b/src/test/run-pass/issue-34503.rs new file mode 100644 index 00000000000..e6217243eeb --- /dev/null +++ b/src/test/run-pass/issue-34503.rs @@ -0,0 +1,20 @@ +// Copyright 2016 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. + +fn main() { + struct X; + trait Foo<T> { + fn foo(&self) where (T, Option<T>): Ord {} + fn bar(&self, x: &Option<T>) -> bool + where Option<T>: Ord { *x < *x } + } + impl Foo<X> for () {} + let _ = &() as &Foo<X>; +} |
