about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <ariel.byd@gmail.com>2015-09-13 18:22:05 +0300
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2015-09-13 20:59:40 +0300
commit8478acf695ccd3bf4abe8c65f153dfbc99f3d28c (patch)
treed575d0e69148a2b00e087c73f9932ac9824d08b9 /src/test
parentcfd76b364cd01695517467299618ef63f1c0cc07 (diff)
downloadrust-8478acf695ccd3bf4abe8c65f153dfbc99f3d28c.tar.gz
rust-8478acf695ccd3bf4abe8c65f153dfbc99f3d28c.zip
sort the existential bounds list in tydecode
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.

Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377
Diffstat (limited to 'src/test')
-rw-r--r--src/test/auxiliary/issue-25467.rs20
-rw-r--r--src/test/run-pass/issue-25467.rs20
2 files changed, 40 insertions, 0 deletions
diff --git a/src/test/auxiliary/issue-25467.rs b/src/test/auxiliary/issue-25467.rs
new file mode 100644
index 00000000000..e358cde1573
--- /dev/null
+++ b/src/test/auxiliary/issue-25467.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 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.
+
+#![crate_type="lib"]
+
+pub trait Trait {
+    // the issue is sensitive to interning order - so use names
+    // unlikely to appear in libstd.
+    type Issue25467FooT;
+    type Issue25467BarT;
+}
+
+pub type Object = Option<Box<Trait<Issue25467FooT=(),Issue25467BarT=()>>>;
diff --git a/src/test/run-pass/issue-25467.rs b/src/test/run-pass/issue-25467.rs
new file mode 100644
index 00000000000..47758768269
--- /dev/null
+++ b/src/test/run-pass/issue-25467.rs
@@ -0,0 +1,20 @@
+// Copyright 2014 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.
+
+// aux-build:issue-25467.rs
+
+pub type Issue25467BarT = ();
+pub type Issue25467FooT = ();
+
+extern crate issue_25467 as aux;
+
+fn main() {
+    let o: aux::Object = None;
+}