about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <ariel.byd@gmail.com>2017-08-15 13:41:54 +0300
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2017-08-29 14:34:43 +0300
commit9be155d88e44c1e4cdacfc640448fc9305151ab2 (patch)
tree3033245d1b0cc6a67dbaf17afb57986dad6be931 /src/test
parentfceab9fb348becb62f404d0d9381a49446beac7a (diff)
downloadrust-9be155d88e44c1e4cdacfc640448fc9305151ab2.tar.gz
rust-9be155d88e44c1e4cdacfc640448fc9305151ab2.zip
remove the hacky selection impl in `method::probe`
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/unboxed-closures-infer-explicit-call-early.rs (renamed from src/test/compile-fail/unboxed-closures-infer-explicit-call-too-early.rs)8
-rw-r--r--src/test/ui/impl-trait/no-method-suggested-traits.stderr4
-rw-r--r--src/test/ui/mismatched_types/issue-36053-2.stderr2
3 files changed, 10 insertions, 4 deletions
diff --git a/src/test/compile-fail/unboxed-closures-infer-explicit-call-too-early.rs b/src/test/run-pass/unboxed-closures-infer-explicit-call-early.rs
index 62f6ee56ca5..028f2e9375b 100644
--- a/src/test/compile-fail/unboxed-closures-infer-explicit-call-too-early.rs
+++ b/src/test/run-pass/unboxed-closures-infer-explicit-call-early.rs
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(fn_traits)]
+
 fn main() {
-    let mut zero = || {};
-    let () = zero.call_mut(());
-    //~^ ERROR we have not yet inferred what kind of closure it is
+    let mut zero = || 0;
+    let x = zero.call_mut(());
+    assert_eq!(x, 0);
 }
diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr
index fc441f94842..23f115858cd 100644
--- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr
+++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr
@@ -8,6 +8,8 @@ error[E0599]: no method named `method` found for type `u32` in the current scope
    = note: the following traits are implemented but not in scope, perhaps add a `use` for one of them:
            candidate #1: `use foo::Bar;`
            candidate #2: `use no_method_suggested_traits::foo::PubPub;`
+           candidate #3: `use no_method_suggested_traits::qux::PrivPub;`
+           candidate #4: `use no_method_suggested_traits::Reexported;`
 
 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope
   --> $DIR/no-method-suggested-traits.rs:38:44
@@ -19,6 +21,8 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box
    = note: the following traits are implemented but not in scope, perhaps add a `use` for one of them:
            candidate #1: `use foo::Bar;`
            candidate #2: `use no_method_suggested_traits::foo::PubPub;`
+           candidate #3: `use no_method_suggested_traits::qux::PrivPub;`
+           candidate #4: `use no_method_suggested_traits::Reexported;`
 
 error[E0599]: no method named `method` found for type `char` in the current scope
   --> $DIR/no-method-suggested-traits.rs:44:9
diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr
index 174f7dfa0d0..e2e2019307f 100644
--- a/src/test/ui/mismatched_types/issue-36053-2.stderr
+++ b/src/test/ui/mismatched_types/issue-36053-2.stderr
@@ -5,8 +5,8 @@ error[E0599]: no method named `count` found for type `std::iter::Filter<std::ite
    |                                                       ^^^^^
    |
    = note: the method `count` exists but the following trait bounds were not satisfied:
-           `[closure@$DIR/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`
            `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`
+           `&mut std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`
 
 error[E0281]: type mismatch: `[closure@$DIR/issue-36053-2.rs:17:39: 17:53]` implements the trait `for<'r> std::ops::FnMut<(&'r str,)>`, but the trait `for<'r> std::ops::FnMut<(&'r &str,)>` is required
   --> $DIR/issue-36053-2.rs:17:32