-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove some return-type diagnostic booleans from FnCtxt
#103866
Conversation
r? @fee1-dead (rustbot has picked a reviewer for you, use r? to override) |
@@ -1782,7 +1782,8 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> { | |||
// may occur at the first return expression we see in the closure | |||
// (if it conflicts with the declared return type). Skip adding a | |||
// note in this case, since it would be incorrect. | |||
&& !fcx.return_type_pre_known | |||
&& let Some(fn_sig) = fcx.body_fn_sig() | |||
&& fn_sig.output().is_ty_var() |
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.
Shouldn't this be is_ty_infer
?
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.
Doesn't really matter since users can't write numeric infer vars.
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.
oh right that is true.
@bors r+ |
This comment was marked as resolved.
This comment was marked as resolved.
Rollup of 6 pull requests Successful merges: - rust-lang#103621 (Correctly resolve Inherent Associated Types) - rust-lang#103660 (improve `filesearch::get_or_default_sysroot`) - rust-lang#103866 (Remove some return-type diagnostic booleans from `FnCtxt`) - rust-lang#103867 (Remove `has_errors` from `FnCtxt`) - rust-lang#103994 (Specify that `break` cannot be used outside of loop *or* labeled block) - rust-lang#103995 (Small round of typo fixes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…, r=fee1-dead Remove some return-type diagnostic booleans from `FnCtxt` These can be calculated on-demand
Rollup of 6 pull requests Successful merges: - rust-lang#103621 (Correctly resolve Inherent Associated Types) - rust-lang#103660 (improve `filesearch::get_or_default_sysroot`) - rust-lang#103866 (Remove some return-type diagnostic booleans from `FnCtxt`) - rust-lang#103867 (Remove `has_errors` from `FnCtxt`) - rust-lang#103994 (Specify that `break` cannot be used outside of loop *or* labeled block) - rust-lang#103995 (Small round of typo fixes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
These can be calculated on-demand