Skip to content

Rollup of 11 pull requests #82530

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

Merged
merged 25 commits into from
Feb 26, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3ed189e
Cleanup `PpMode` and friends
LeSeulArtichaut Feb 18, 2021
dd3772e
A few more code cleanups
LeSeulArtichaut Feb 19, 2021
c9d86aa
Set RUST_BACKTRACE=0 when running `treat-err-as-bug` tests
Aaron1011 Feb 23, 2021
f94c15c
Fix typo in sanitizer flag in unstable book.
frewsxcv Feb 23, 2021
010a6f9
panic_bounds_checks should be panic_bounds_check
jrmuizel Feb 24, 2021
476c6c2
Update outdated comment in unix Command.
ehuss Feb 24, 2021
eefec8a
library: Normalize safety-for-unsafe-block comments
ojeda Feb 24, 2021
5ac6935
Move pick_by_value_method docs above function header
osa1 Feb 24, 2021
9c5f684
Turn Pick field comments into documentation
osa1 Feb 24, 2021
3be69b1
Remove duplicate string
bugadani Feb 24, 2021
d3f75eb
Add test
bugadani Feb 24, 2021
97ab012
Only look for `tidy` when running rustdoc tests
jyn514 Feb 24, 2021
f06896c
fix typo in `pre-commit.sh`
Feb 24, 2021
0ae4bf9
Fix typo in `param_env_reveal_all_normalized` #82510
jyn514 Feb 25, 2021
8c0119d
Rollup merge of #82269 - LeSeulArtichaut:cleanup-ppmode, r=spastorino
Aaron1011 Feb 25, 2021
239e41d
Rollup merge of #82431 - Aaron1011:fix/bug-env, r=jyn514
Aaron1011 Feb 25, 2021
44f85c5
Rollup merge of #82441 - frewsxcv:frewsxcv-docs, r=GuillaumeGomez
Aaron1011 Feb 25, 2021
fe6cbbc
Rollup merge of #82463 - jrmuizel:patch-1, r=steveklabnik
Aaron1011 Feb 25, 2021
503d50b
Rollup merge of #82464 - ehuss:unix-command-comment, r=kennytm
Aaron1011 Feb 25, 2021
befa2df
Rollup merge of #82467 - ojeda:tidy-normalize-safety-comments, r=kennytm
Aaron1011 Feb 25, 2021
9a540cb
Rollup merge of #82468 - osa1:pick_by_value_method_docs, r=petrochenkov
Aaron1011 Feb 25, 2021
8250a25
Rollup merge of #82484 - bugadani:docfix, r=jyn514
Aaron1011 Feb 25, 2021
586ed18
Rollup merge of #82502 - jyn514:tidy, r=petrochenkov
Aaron1011 Feb 25, 2021
4fdca6a
Rollup merge of #82503 - cratelyn:patch-1, r=Mark-Simulacrum
Aaron1011 Feb 25, 2021
42e53ff
Rollup merge of #82510 - jyn514:fix-typo, r=Dylan-DPC
Aaron1011 Feb 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move pick_by_value_method docs above function header
- Currently style triggers #81183 so we can't add `#[instrument]` to
  this function.

- Having docs above the header is more consistent with the rest of the
  code base.
  • Loading branch information
osa1 committed Feb 24, 2021
commit 5ac6935974d72e28c0b9c49af45f771de1b4d4a0
14 changes: 6 additions & 8 deletions compiler/rustc_typeck/src/check/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,19 +1090,17 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
.next()
}

/// For each type `T` in the step list, this attempts to find a method where
/// the (transformed) self type is exactly `T`. We do however do one
/// transformation on the adjustment: if we are passing a region pointer in,
/// we will potentially *reborrow* it to a shorter lifetime. This allows us
/// to transparently pass `&mut` pointers, in particular, without consuming
/// them for their entire lifetime.
fn pick_by_value_method(
&mut self,
step: &CandidateStep<'tcx>,
self_ty: Ty<'tcx>,
) -> Option<PickResult<'tcx>> {
//! For each type `T` in the step list, this attempts to find a
//! method where the (transformed) self type is exactly `T`. We
//! do however do one transformation on the adjustment: if we
//! are passing a region pointer in, we will potentially
//! *reborrow* it to a shorter lifetime. This allows us to
//! transparently pass `&mut` pointers, in particular, without
//! consuming them for their entire lifetime.

if step.unsize {
return None;
}
Expand Down