about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorMark-Simulacrum <mark.simulacrum@gmail.com>2016-11-03 14:55:35 -0600
committerMark-Simulacrum <mark.simulacrum@gmail.com>2016-11-03 15:27:29 -0600
commitd5f72d21afffcda4cc71945f12477136774aa604 (patch)
tree5f62c806f6708207e2c1107c92186a1cf35901b7 /src/test/compile-fail
parentac919fcd9d4a958baf99b2f2ed5c3d38a2ebf9d0 (diff)
downloadrust-d5f72d21afffcda4cc71945f12477136774aa604.tar.gz
rust-d5f72d21afffcda4cc71945f12477136774aa604.zip
Fix ICE when querying DefId on Def::Err.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/issue-37534.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-37534.rs b/src/test/compile-fail/issue-37534.rs
new file mode 100644
index 00000000000..eb676601e89
--- /dev/null
+++ b/src/test/compile-fail/issue-37534.rs
@@ -0,0 +1,16 @@
+// 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.
+
+struct Foo<T: ?Hash> { }
+//~^ ERROR trait `Hash` is not in scope [E0405]
+//~^^ ERROR parameter `T` is never used [E0392]
+//~^^^ WARN default bound relaxed for a type parameter, but this does nothing
+
+fn main() { }