-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
run rustfmt on librustc_typeck/check/method folder #36736
Conversation
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
self.body_id, | ||
poly_trait_ref.to_predicate()); | ||
let obligation = | ||
traits::Obligation::misc(span, self.body_id, poly_trait_ref.to_predicate()); |
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.
This is interesting. Why did the function call take a separate line? Previous formatting looks good to me. @nrc
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.
&method_ty.fty.sig).0; | ||
let fn_sig = | ||
self.replace_late_bound_regions_with_fresh_var(span, infer::FnCall, &method_ty.fty.sig) | ||
.0; |
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.
this is ugly
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.
steps, | ||
opt_simplified_steps); | ||
let mut probe_cx = | ||
ProbeContext::new(self, span, mode, item_name, steps, opt_simplified_steps); |
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.
here too.
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.
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.
This doesn't seem too bad to me, arguably it is better since using less vertical space and the call all on one line is not too hard to read.
new_trait_ref.self_ty(), | ||
new_trait_ref.substs); | ||
let xform_self_ty = | ||
this.xform_self_ty(&item, new_trait_ref.self_ty(), new_trait_ref.substs); |
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.
here too.
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.
@@ -1218,8 +1205,10 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> { | |||
// are given do not include type/lifetime parameters for the | |||
// method yet. So create fresh variables here for those too, | |||
// if there are any. | |||
assert_eq!(substs.types().count(), method.generics.parent_types as usize); | |||
assert_eq!(substs.regions().count(), method.generics.parent_regions as usize); | |||
assert_eq!(substs.types().count(), |
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.
why did rustfmt convert this? These expressions are happily fit on a single line.
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.
.impl_trait_ref(impl_did) | ||
.unwrap() | ||
.def_id, | ||
|
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.
rustfmt didnot remove empty line between parameters in a function call @nrc
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.
@srinivasreddy could you file rustfmt issues for these things please? |
@@ -135,7 +136,12 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { | |||
self.tcx.used_trait_imports.borrow_mut().insert(import_id); | |||
} | |||
|
|||
Ok(self.confirm_method(span, self_expr, call_expr, self_ty, pick, supplied_method_types)) | |||
Ok(self.confirm_method(span, |
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.
@nrc Done. Thanks. |
Awesome, thank you! |
@nrc Shall we roll-up? |
/////////////////////////////////////////////////////////////////////////// | ||
// ADJUSTMENTS | ||
/// //////////////////////////////////////////////////////////////////////// | ||
/// ADJUSTMENTS |
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.
Could you manually fixup these changes to comments please?
//! *reborrow* it to a shorter lifetime. This allows us to | ||
//! transparently pass `&mut` pointers, in particular, without | ||
//! consuming them for their entire 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.
Could you remove the dangling sigil please
"it" | ||
} else { | ||
"one of them" | ||
}); |
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.
These should stay on a line each I think
} else { | ||
"one of them" | ||
}, | ||
name = item_name); |
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.
same
Thanks for doing this! Could you manually fixup the areas where there are issues please? |
@nrc Done. |
r? @nrc |
☔ The latest upstream changes (presumably #36885) made this pull request unmergeable. Please resolve the merge conflicts. |
looks good, r=me, but needs a rebase |
@nrc Done |
@bors: r+ |
📌 Commit 9e22f39 has been approved by |
⌛ Testing commit 9e22f39 with merge 0d77bd2... |
💔 Test failed - auto-mac-64-opt |
@srinivasreddy test fail looks real, perhaps a rebasing error? |
@nrc Fixed it |
@bors: r+ |
📌 Commit 5be0acc has been approved by |
☔ The latest upstream changes (presumably #36814) made this pull request unmergeable. Please resolve the merge conflicts. |
@nrc pls do it again. |
@bors: r+ |
📌 Commit dcb6b15 has been approved by |
run rustfmt on librustc_typeck/check/method folder
No description provided.