8000 Rollup of 9 pull requests by jonas-schievink · Pull Request #81559 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 9 pull requests #81559

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

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c748f32
Fix incorrect use mut diagnostics
arora-aman Dec 13, 2020
ffd5327
Add fixme for precise path diagnostics
arora-aman Jan 12, 2021
fadf03e
Fix typos
arora-aman Jan 29, 2021
0f4bab2
Fixme for closure origin when reborrow is implemented
arora-aman Jan 29, 2021
56c2736
Replace predecessor with range in collections documentation
LunaBorowska Jan 30, 2021
7e32178
Balance sidebar `Deref` cycle check with main content
jryans Jan 28, 2021
2ad8c2f
Rollup merge of #79173 - DeveloperC286:zip_nth_cleanup, r=kennytm
jonas-schievink Jan 30, 2021
950c10c
Rollup merge of #79253 - rcvalle:fix-rustc-sysroot-cas, r=nagisa
jonas-schievink Jan 30, 2021
93dbd0f
Rollup merge of #80092 - sexxi-goose:restrict_precision, r=nikomatsakis
jonas-schievink Jan 30, 2021
7a718eb
Rollup merge of #80945 - sdroege:downcast-send-sync, r=m-ou-se
jonas-schievink Jan 30, 2021
3a61c21
Rollup merge of #81422 - estebank:dotdot_sugg, r=davidtwco
jonas-schievink Jan 30, 2021
022eada
Rollup merge of #81472 - Aaron1011:fix/revert-cursor-clone, r=petroch…
jonas-schievink Jan 30, 2021
6f67e2f
Rollup merge of #81484 - Kogia-sima:perf/optimize-udiv_1e19, r=nagisa
jonas-schievink Jan 30, 2021
23643ad
Rollup merge of #81491 - jryans:rustdoc-deref-ice-81395, r=GuillaumeG…
jonas-schievink Jan 30, 2021
de95341
Rollup merge of #81550 - xfix:replace-mention-of-predecessor, r=jonas…
jonas-schievink Jan 30, 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
Add fixme for precise path diagnostics
  • Loading branch information
arora-aman committed Jan 29, 2021
commit ffd53277dc776dcf93bfa34c478bd99da2361515
2 changes: 2 additions & 0 deletions compiler/rustc_mir/src/borrow_check/diagnostics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
PlaceRef { local, projection: [proj_base @ .., elem] } => {
match elem {
ProjectionElem::Deref => {
// FIXME(project-rfc_2229#36): print capture precisely here.
let upvar_field_projection = self.is_upvar_field_projection(place);
if let Some(field) = upvar_field_projection {
let var_index = field.index();
Expand Down Expand Up @@ -259,6 +260,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
ProjectionElem::Field(field, _ty) => {
autoderef = true;

// FIXME(project-rfc_2229#36): print capture precisely here.
let upvar_field_projection = self.is_upvar_field_projection(place);
if let Some(field) = upvar_field_projection {
let var_index = field.index();
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_mir/src/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ crate use region_infer::RegionInferenceContext;
// FIXME(eddyb) perhaps move this somewhere more centrally.
#[derive(Debug)]
crate struct Upvar<'tcx> {
// FIXME(project-rfc-2229#8): ty::CapturePlace should have a to_string(), or similar
// then this should not be needed.
// FIXME(project-rfc_2229#36): print capture precisely here.
name: Symbol,

place: CapturedPlace<'tcx>,
Expand Down Expand Up @@ -2156,6 +2155,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
place: PlaceRef<'tcx>,
is_local_mutation_allowed: LocalMutationIsAllowed,
) -> Result<RootPlace<'tcx>, PlaceRef<'tcx>> {
debug!("is_mutable: place={:?}, is_local...={:?}", place, is_local_mutation_allowed);
match place.last_projection() {
None => {
let local = &self.body.local_decls[place.local];
Expand Down Expand Up @@ -2237,9 +2237,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
if let Some(field) = upvar_field_projection {
let upvar = &self.upvars[field.index()];
debug!(
"upvar.mutability={:?} local_mutation_is_allowed={:?} \
place={:?}",
upvar, is_local_mutation_allowed, place
"is_mutable: upvar.mutability={:?} local_mutation_is_allowed={:?} \
place={:?}, place_base={:?}",
upvar, is_local_mutation_allowed, place, place_base
);
match (upvar.place.mutability, is_local_mutation_allowed) {
(
Expand Down
0