From 8bc558197862268f080e5df621e89f519a52950c Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 30 Mar 2021 13:37:30 -0700 Subject: Point at `impl` and type defs introducing requirements on E0277 --- src/test/ui/recursion/recursive-requirements.stderr | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/test/ui/recursion') diff --git a/src/test/ui/recursion/recursive-requirements.stderr b/src/test/ui/recursion/recursive-requirements.stderr index 6c0be0f7f8d..0518cc507b5 100644 --- a/src/test/ui/recursion/recursive-requirements.stderr +++ b/src/test/ui/recursion/recursive-requirements.stderr @@ -8,7 +8,11 @@ LL | let _: AssertSync = unimplemented!(); | ^^^^^^^^^^^^^^^ `*const Bar` cannot be shared between threads safely | = help: within `Foo`, the trait `Sync` is not implemented for `*const Bar` - = note: required because it appears within the type `Foo` +note: required because it appears within the type `Foo` + --> $DIR/recursive-requirements.rs:5:12 + | +LL | pub struct Foo { + | ^^^ error[E0277]: `*const Foo` cannot be shared between threads safely --> $DIR/recursive-requirements.rs:16:12 @@ -20,9 +24,17 @@ LL | let _: AssertSync = unimplemented!(); | ^^^^^^^^^^^^^^^ `*const Foo` cannot be shared between threads safely | = help: within `Foo`, the trait `Sync` is not implemented for `*const Foo` - = note: required because it appears within the type `Bar` +note: required because it appears within the type `Bar` + --> $DIR/recursive-requirements.rs:10:12 + | +LL | pub struct Bar { + | ^^^ = note: required because it appears within the type `PhantomData` - = note: required because it appears within the type `Foo` +note: required because it appears within the type `Foo` + --> $DIR/recursive-requirements.rs:5:12 + | +LL | pub struct Foo { + | ^^^ error: aborting due to 2 previous errors -- cgit 1.4.1-3-g733a5