Change:
|     ^^^^^^^^^^^ warning: type `Priv1` is more private than the item `aliases_priv::f1` <del> --> $DIR/private-in-public.rs:133:5 </del> <ins> --> $DIR/private-in-public.rs:134:5 </ins> | LL |     pub fn f1(arg: PrivUseAlias) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f1` is reachable at visibility `pub(crate)` | note: but type `Priv1` is only usable at visibility `pub(self)` <del> --> $DIR/private-in-public.rs:118:5 </del> <ins> --> $DIR/private-in-public.rs:119:5 </ins> | LL |     struct Priv1; |     ^^^^^^^^^^^^ warning: type `Priv2` is more private than the item `aliases_priv::f2` <del> --> $DIR/private-in-public.rs:134:5 </del> <ins> --> $DIR/private-in-public.rs:135:5 </ins> | LL |     pub fn f2(arg: PrivAlias) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f2` is reachable at visibility `pub(crate)` | note: but type `Priv2` is only usable at visibility `pub(self)` <del> --> $DIR/private-in-public.rs:119:5 </del> <ins> --> $DIR/private-in-public.rs:120:5 </ins> | LL |     struct Priv2; |     ^^^^^^^^^^^^ warning: associated type `aliases_priv::PrivTr::Assoc` is more private than the item `aliases_priv::f3` <del> --> $DIR/private-in-public.rs:135:5 </del> <ins> --> $DIR/private-in-public.rs:136:5 </ins> | LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)` | note: but associated type `aliases_priv::PrivTr::Assoc` is only usable at visibility `pub(self)` <del> --> $DIR/private-in-public.rs:129:9 </del> <ins> --> $DIR/private-in-public.rs:130:9 </ins> | LL |         type Assoc = Priv3; |         ^^^^^^^^^^ <ins> warning: trait `aliases_priv::PrivTr` is more private than the item `aliases_priv::f3` --> $DIR/private-in-public.rs:136:5 | LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)` | note: but trait `aliases_priv::PrivTr` is only usable at visibility `pub(self)` --> $DIR/private-in-public.rs:129:5 | LL |     trait PrivTr { |     ^^^^^^^^^^^^ </ins> warning: type `aliases_priv::Priv` is more private than the item `aliases_priv::f3` <del> --> $DIR/private-in-public.rs:135:5 </del> <ins> --> $DIR/private-in-public.rs:136:5 </ins> | LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)` | note: but type `aliases_priv::Priv` is only usable at visibility `pub(self)` <del> --> $DIR/private-in-public.rs:116:5 </del> <ins> --> $DIR/private-in-public.rs:117:5 </ins> | LL |     struct Priv; |     ^^^^^^^^^^^ warning: type `aliases_params::Priv` is more private than the item `aliases_params::f2` <del> --> $DIR/private-in-public.rs:145:5 </del> <ins> --> $DIR/private-in-public.rs:147:5 </ins> | LL |     pub fn f2(arg: PrivAliasGeneric) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_params::f2` is reachable at visibility `pub(crate)` | note: but type `aliases_params::Priv` is only usable at visibility `pub(self)` <del> --> $DIR/private-in-public.rs:141:5 </del> <ins> --> $DIR/private-in-public.rs:143:5 </ins> | LL |     struct Priv; |     ^^^^^^^^^^^ warning: type `aliases_params::Priv` is more private than the item `aliases_params::f3` <del> --> $DIR/private-in-public.rs:147:5 </del> <ins> --> $DIR/private-in-public.rs:149:5 </ins> | LL |     pub fn f3(arg: Result<u8>) {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_params::f3` is reachable at visibility `pub(crate)` | note: but type `aliases_params::Priv` is only usable at visibility `pub(self)` <del> --> $DIR/private-in-public.rs:141:5 </del> <ins> --> $DIR/private-in-public.rs:143:5 </ins> | LL |     struct Priv; |     ^^^^^^^^^^^ <del> warning: 31 warnings emitted </del> <ins> warning: 33 warnings emitted </ins>

Discussion:
This is a pretty common use case, so this bug has probably already been registered, but I couldn't find anything while searching around, so I'm reporting this here just in case. I ran this code: When running this code, I expect to simply get a not yet implemented error on the function. Instead, I get this: : returns an , and is not a trait method–it's just a regular method. Therefore, AFAIK, this should compile. Notably, making either or as makes it compile fine.
Regression in . cc
oli's on leave so cc-ing PR 's reviewer
WG-prioritization assigning priority (). label -I-prioritize +P-high