Skip to content
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

Replace obligation construction with deref_steps() #72292

Merged
merged 1 commit into from
May 23, 2020

Conversation

ldm0
Copy link
Contributor

@ldm0 ldm0 commented May 17, 2020

  1. Use probe() to avoid unwanted binding committing during deref_steps().
  2. Fixes Dereferencing Deref types other than references is missing suggestion #59819 again by using deref_steps(), make the code cleaner. And if we want to suggest multiple dereferences (like: consider dereferencing the borrow: "****a") in the future, this change will make it easier to achieve.

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 17, 2020
@bors
Copy link
Contributor

bors commented May 22, 2020

☔ The latest upstream changes (presumably #72433) made this pull request unmergeable. Please resolve the merge conflicts.

@ldm0 ldm0 marked this pull request as draft May 22, 2020 04:44
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
##[section]Starting: Linux mingw-check
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 7'
Agent machine name: 'fv-az578'
Current agent version: '2.168.2'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200512.2
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200512.2/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.2)
Checking job knob settings.
   Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/46c15c12-12d1-4246-bd30-0ab211037e5a.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/72292/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/72292/merge:refs/remotes/pull/72292/merge
---
 ---> 3adb0605cc65
Step 6/7 : ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ---> Using cache
 ---> 28dbc326cb7f
Step 7/7 : ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors &&            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu &&            python3 ../x.py build --stage 0 src/tools/build-manifest &&            python3 ../x.py test --stage 0 src/tools/compiletest &&            python3 ../x.py test src/tools/tidy &&            python3 ../x.py doc --stage 0 src/libstd &&            /scripts/validate-toolstate.sh
 ---> 537a01811900
Successfully built 537a01811900
Successfully tagged rust-ci:latest
Built container sha256:537a018119009dc218456238dec90b5530050db1e2a1e166550c218003f6159d
---
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking chalk-rust-ir v0.10.0
    Checking rustc_session v0.0.0 (/checkout/src/librustc_session)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
    Checking rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
---
    Checking rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
error: unused import: `ToPredicate`
  --> src/librustc_typeck/check/demand.rs:12:41
   |
12 | use rustc_middle::ty::{self, AssocItem, ToPredicate, Ty, TypeAndMut};
   |
   = note: `-D unused-imports` implied by `-D warnings`

    Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
    Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
error: aborting due to previous error

error: could not compile `rustc_typeck`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:04:30
== clock drift check ==
  local time: Fri May 22 04:46:47 UTC 2020
  local time: Fri May 22 04:46:47 UTC 2020
  network time: Fri, 22 May 2020 04:46:47 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/72292/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/72292/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4082) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@ldm0 ldm0 marked this pull request as ready for review May 22, 2020 06:58
@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 22, 2020

📌 Commit 407958a has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 22, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request May 23, 2020
Replace obligation construction with deref_steps()

1. Use `probe()` to avoid unwanted binding committing during `deref_steps()`.
2. Fixes rust-lang#59819 again by using `deref_steps()`, make the code cleaner. And if we want to suggest multiple dereferences (like: `consider dereferencing the borrow: "****a"`) in the future, this change will make it easier to achieve.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 23, 2020
Replace obligation construction with deref_steps()

1. Use `probe()` to avoid unwanted binding committing during `deref_steps()`.
2. Fixes rust-lang#59819 again by using `deref_steps()`, make the code cleaner. And if we want to suggest multiple dereferences (like: `consider dereferencing the borrow: "****a"`) in the future, this change will make it easier to achieve.
This was referenced May 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 23, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#72292 (Replace obligation construction with deref_steps())
 - rust-lang#72431 (add warning sign to UB examples)
 - rust-lang#72446 (Impl Ord for proc_macro::LineColumn)
 - rust-lang#72492 (Add some regression tests)
 - rust-lang#72496 (Correct small typo: 'not' -> 'note')

Failed merges:

r? @ghost
@bors bors merged commit b24030f into rust-lang:master May 23, 2020
@ldm0 ldm0 deleted the derefsteps branch May 24, 2020 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dereferencing Deref types other than references is missing suggestion
4 participants