diff options
| author | bors <bors@rust-lang.org> | 2016-07-18 14:26:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-18 14:26:22 -0700 |
| commit | bbfcb471db0799a7d92d62e66cf44bbd68051675 (patch) | |
| tree | 2c50da9289268c660ceb5bbf4b2c98faedf769c2 /src/test | |
| parent | 9c888980763e8ba16caa67f5f08e13109bbc6fa5 (diff) | |
| parent | 7b2a03f08e930f6eaac419e203630b06e3d491e6 (diff) | |
| download | rust-bbfcb471db0799a7d92d62e66cf44bbd68051675.tar.gz rust-bbfcb471db0799a7d92d62e66cf44bbd68051675.zip | |
Auto merge of #34357 - tbu-:pr_exact_size_is_empty, r=brson
Add `is_empty` function to `ExactSizeIterator` All other types implementing a `len` functions have `is_empty` already.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/method-suggestion-no-duplication.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/compile-fail/method-suggestion-no-duplication.rs b/src/test/compile-fail/method-suggestion-no-duplication.rs index c8c1447fea3..390b8f07b2f 100644 --- a/src/test/compile-fail/method-suggestion-no-duplication.rs +++ b/src/test/compile-fail/method-suggestion-no-duplication.rs @@ -18,7 +18,8 @@ fn foo<F>(f: F) where F: FnMut(Foo) {} fn main() { foo(|s| s.is_empty()); //~^ ERROR no method named `is_empty` found - //~^^ HELP #1: `core::slice::SliceExt` - //~^^^ HELP #2: `core::str::StrExt` - //~^^^^ HELP items from traits can only be used if the trait is implemented and in scope; the following traits define an item `is_empty`, perhaps you need to implement one of them: + //~^^ HELP #1: `std::iter::ExactSizeIterator` + //~^^^ HELP #2: `core::slice::SliceExt` + //~^^^^ HELP #3: `core::str::StrExt` + //~^^^^^ HELP items from traits can only be used if the trait is implemented and in scope; the following traits define an item `is_empty`, perhaps you need to implement one of them: } |
