about summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issues
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/issues')
-rw-r--r--src/test/ui/impl-trait/issues/issue-70877.rs2
-rw-r--r--src/test/ui/impl-trait/issues/issue-70877.stderr11
2 files changed, 4 insertions, 9 deletions
diff --git a/src/test/ui/impl-trait/issues/issue-70877.rs b/src/test/ui/impl-trait/issues/issue-70877.rs
index 9cbe33aef5b..1a86fa00ed1 100644
--- a/src/test/ui/impl-trait/issues/issue-70877.rs
+++ b/src/test/ui/impl-trait/issues/issue-70877.rs
@@ -28,7 +28,7 @@ fn ham() -> Foo {
 fn oof() -> impl std::fmt::Debug {
     let mut bar = ham();
     let func = bar.next().unwrap();
-    return func(&"oof"); //~^^^ ERROR opaque type's hidden type cannot be another opaque type
+    return func(&"oof"); //~ ERROR opaque type's hidden type cannot be another opaque type
 }
 
 fn main() {
diff --git a/src/test/ui/impl-trait/issues/issue-70877.stderr b/src/test/ui/impl-trait/issues/issue-70877.stderr
index 2610a198186..7cbd58bdabf 100644
--- a/src/test/ui/impl-trait/issues/issue-70877.stderr
+++ b/src/test/ui/impl-trait/issues/issue-70877.stderr
@@ -13,15 +13,10 @@ LL |         Some(Box::new(quux))
               found enum `Option<Box<for<'r> fn(&'r (dyn ToString + 'r)) -> FooRet {quux}>>`
 
 error: opaque type's hidden type cannot be another opaque type from the same scope
-  --> $DIR/issue-70877.rs:28:34
+  --> $DIR/issue-70877.rs:31:12
    |
-LL |   fn oof() -> impl std::fmt::Debug {
-   |  __________________________________^
-LL | |     let mut bar = ham();
-LL | |     let func = bar.next().unwrap();
-LL | |     return func(&"oof");
-LL | | }
-   | |_^ one of the two opaque types used here has to be outside its defining scope
+LL |     return func(&"oof");
+   |            ^^^^^^^^^^^^ one of the two opaque types used here has to be outside its defining scope
    |
 note: opaque type whose hidden type is being assigned
   --> $DIR/issue-70877.rs:28:13