about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-25 02:46:18 -0700
committerGitHub <noreply@github.com>2016-09-25 02:46:18 -0700
commit2d1d4d199471dbdf0828acbc06cfe452463569af (patch)
treea47bd199ae274b83d199a6f331368bf76296eb79 /src/test
parentd6dc33907ab7d86d492eec8e79d0890bdbc8a2a8 (diff)
parent47b918d59aec86f0baf17b8de4bc0a86f7d77038 (diff)
downloadrust-2d1d4d199471dbdf0828acbc06cfe452463569af.tar.gz
rust-2d1d4d199471dbdf0828acbc06cfe452463569af.zip
Auto merge of #36713 - TimNN:fix-36708, r=arielb1
don't unwrap non-local span

Fixes #36708.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/auxiliary/issue-36708.rs15
-rw-r--r--src/test/compile-fail/issue-36708.rs23
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/compile-fail/auxiliary/issue-36708.rs b/src/test/compile-fail/auxiliary/issue-36708.rs
new file mode 100644
index 00000000000..e64e63a2139
--- /dev/null
+++ b/src/test/compile-fail/auxiliary/issue-36708.rs
@@ -0,0 +1,15 @@
+// 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.
+
+#![crate_type = "lib"]
+
+pub trait Foo {
+    fn foo();
+}
diff --git a/src/test/compile-fail/issue-36708.rs b/src/test/compile-fail/issue-36708.rs
new file mode 100644
index 00000000000..6146258fa8d
--- /dev/null
+++ b/src/test/compile-fail/issue-36708.rs
@@ -0,0 +1,23 @@
+// 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.
+
+// aux-build:issue-36708.rs
+
+extern crate issue_36708 as lib;
+
+struct Bar;
+
+impl lib::Foo for Bar {
+    fn foo<T>() {}
+    //~^ ERROR E0049
+    //~| NOTE found 1 type parameter, expected 0
+}
+
+fn main() {}