diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-08-10 11:45:32 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2021-09-20 14:15:36 +0000 |
| commit | 34de78fd8131ac8149caab086c9696899d8d2bed (patch) | |
| tree | b21aef73e7881ac011e0f6a2971b81da110973d3 /src/test | |
| parent | 5fb1a652156d2d4d72d933976632aba7eeb3d614 (diff) | |
| download | rust-34de78fd8131ac8149caab086c9696899d8d2bed.tar.gz rust-34de78fd8131ac8149caab086c9696899d8d2bed.zip | |
Generate inference vars and obligations for projections in opaque types instead of trying to normalize them.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/impl-trait/issue-72911.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/impl-trait/issue-72911.stderr | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/test/ui/impl-trait/issue-72911.rs b/src/test/ui/impl-trait/issue-72911.rs index dee5a41f6de..8761e4cf66a 100644 --- a/src/test/ui/impl-trait/issue-72911.rs +++ b/src/test/ui/impl-trait/issue-72911.rs @@ -16,6 +16,7 @@ fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator<Item = Lint> fn lint_files() -> impl Iterator<Item = foo::MissingItem> { //~^ ERROR: failed to resolve + //~| ERROR: `()` is not an iterator unimplemented!() } diff --git a/src/test/ui/impl-trait/issue-72911.stderr b/src/test/ui/impl-trait/issue-72911.stderr index 17748ae4277..6c6d9cbe23e 100644 --- a/src/test/ui/impl-trait/issue-72911.stderr +++ b/src/test/ui/impl-trait/issue-72911.stderr @@ -28,7 +28,15 @@ LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator<Item = L LL | fn lint_files() -> impl Iterator<Item = foo::MissingItem> { | -------------------------------------- returning this opaque type `FlatMap<impl Iterator, [type error], [closure@$DIR/issue-72911.rs:9:27: 9:51]>` -error: aborting due to 3 previous errors +error[E0277]: `()` is not an iterator + --> $DIR/issue-72911.rs:17:20 + | +LL | fn lint_files() -> impl Iterator<Item = foo::MissingItem> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator + | + = help: the trait `Iterator` is not implemented for `()` + +error: aborting due to 4 previous errors -Some errors have detailed explanations: E0433, E0720. -For more information about an error, try `rustc --explain E0433`. +Some errors have detailed explanations: E0277, E0433, E0720. +For more information about an error, try `rustc --explain E0277`. |
