X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_typeck%2Fcheck%2Fmethod%2Fprobe.rs;h=0934e2cdb0c9c28362cbc1bdc7dca022d7613f6d;hb=2ac5f7d249e29ee48737359e0e6dd9e59701a568;hp=881fc7a137095b0d01a92ec2d7b024e88cb9d073;hpb=16268a88fc0cfe3657439139c63913ffb904b2fa;p=rust.git diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index 881fc7a1370..0934e2cdb0c 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -1013,7 +1013,7 @@ fn pick(mut self) -> PickResult<'tcx> { }; if let Some(def) = private_candidate { - return Err(MethodError::PrivateMatch(def)); + return Err(MethodError::PrivateMatch(def, out_of_scope_traits)); } Err(MethodError::NoMatch(NoMatchData::new(static_candidates,