diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/suggestions/trait-hidden-method.rs | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/trait-hidden-method.rs')
-rw-r--r-- | tests/ui/suggestions/trait-hidden-method.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/suggestions/trait-hidden-method.rs b/tests/ui/suggestions/trait-hidden-method.rs new file mode 100644 index 000000000..ae7ef47e1 --- /dev/null +++ b/tests/ui/suggestions/trait-hidden-method.rs @@ -0,0 +1,11 @@ +// #107983 - testing that `__iterator_get_unchecked` isn't suggested +// HELP included so that compiletest errors on the bad suggestion +pub fn i_can_has_iterator() -> impl Iterator<Item = u32> { + //~^ ERROR expected `Box<dyn Iterator>` + //~| HELP consider constraining the associated type + Box::new(1..=10) as Box<dyn Iterator> + //~^ ERROR the value of the associated type `Item` + //~| HELP specify the associated type +} + +fn main() {} |