-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put the dots back in RTN pretty printing #127783
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
@@ -1214,11 +1214,14 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { | |||
&& let ty::Alias(_, alias_ty) = | |||
self.tcx().fn_sig(fn_def_id).skip_binder().output().skip_binder().kind() | |||
&& alias_ty.def_id == def_id | |||
&& let generics = self.tcx().generics_of(fn_def_id) | |||
// FIXME(return_type_notation): We only support lifetime params for now. | |||
&& generics.own_params.iter().all(|param| matches!(param.kind, ty::GenericParamDefKind::Lifetime)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this condition testable? I.e. a case where this would have gone through and printed but no longer prints now?
awaiting response from review @rustbot author |
f2a0a5e
to
b84e2b7
Compare
Yeah I added a test. @rustbot ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
@bors r+ rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#127077 (Make language around `ToOwned` for `BorrowedFd` more precise) - rust-lang#127783 (Put the dots back in RTN pretty printing) - rust-lang#127787 (Migrate `atomic-lock-free` to `rmake`) - rust-lang#127810 (Rename `tcx` to `cx` in `rustc_type_ir`) - rust-lang#127878 (Fix associated item removal suggestion) - rust-lang#127886 (Accurate `use` rename suggestion span) - rust-lang#127888 (More accurate span for type parameter suggestion) - rust-lang#127889 (More accurate span for anonymous argument suggestion) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127783 - compiler-errors:rtn-pretty, r=fee1-dead Put the dots back in RTN pretty printing Also don't render RTN-like bounds for methods with ty/const params.
Also don't render RTN-like bounds for methods with ty/const params.