Skip to content

Point at associated type for some obligations - #65288

Merged
bors merged 7 commits into
rust-lang:masterfrom
estebank:point-at-assoc-type
Oct 27, 2019
Merged

Point at associated type for some obligations#65288
bors merged 7 commits into
rust-lang:masterfrom
estebank:point-at-assoc-type

Conversation

@estebank

Copy link
Copy Markdown
Contributor

Partially address #57663.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @cramertj

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2019
@rust-highfive

This comment has been minimized.

@cramertj

Copy link
Copy Markdown
Member

I don't think I'm the best reviewer for this, but I'm not sure who is.

@estebank

Copy link
Copy Markdown
ContributorAuthor

Maybe @nikomatsakis?

@rust-highfive

This comment has been minimized.

@Centril

Copy link
Copy Markdown
Contributor

@bors try

@bors

bors commented Oct 11, 2019

Copy link
Copy Markdown
Collaborator

⌛ Trying commit cbd994b with merge afb10f4...

bors added a commit that referenced this pull request Oct 11, 2019
Point at associated type for some obligations
Partially address #57663.
@bors

bors commented Oct 11, 2019

Copy link
Copy Markdown
Collaborator

☀️ Try build successful - checks-azure
Build commit: afb10f4 (afb10f4c27d428d90c167e912bb259891cd14f5c)

@Centril

Copy link
Copy Markdown
Contributor

@rust-timer build afb10f4

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued afb10f4 with parent 000d90b, future comparison URL.

@nikomatsakis

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking try commit afb10f4, comparison URL.

@Centril

Copy link
Copy Markdown
Contributor

Perf looks clean

@nikomatsakisnikomatsakis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nice @estebank! I have some minor suggestions around refactoring.

Comment threadsrc/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr Outdated
Comment threadsrc/librustc/ty/wf.rs Outdated
Comment threadsrc/librustc/ty/wf.rs Outdated
@estebank

Copy link
Copy Markdown
ContributorAuthor

@nikomatsakis let me know if there are any outstanding changes you'd like me to do.

Comment threadsrc/librustc/ty/wf.rs
let param_env = self.param_env;

let item = &self.item;
let extend_cause_with_original_assoc_item_obligation = |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh. Personally I'd have preferred to see this be a separate method, but I can accept this =) I do like the comments!

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 25, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 3a4cacd has been approved by nikomatsakis

@borsbors 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 Oct 25, 2019
@bors

bors commented Oct 26, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 3a4cacd with merge e39dd255a4db06727866034e3a5288ddbf2b8fc4...

@rust-highfive

Copy link
Copy Markdown
Contributor

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.
2019-10-26T04:05:26.6882267Z Chocolatey installed 0/1 packages. 1 packages failed.
2019-10-26T04:05:26.6882373Z See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2019-10-26T04:05:26.6886488Z 2019-10-26T04:05:26.6890979Z Failures
2019-10-26T04:05:26.6897973Z - msys2 (exited 1) - msys2 not installed. An error occurred during installation:
2019-10-26T04:05:26.6898130Z The remote server returned an error: (503) Server Unavailable. Service Unavailable
2019-10-26T04:05:27.2648320Z 2019-10-26T04:05:27.2727921Z ##[error]Bash exited with code '1'.
2019-10-26T04:05:27.2941242Z ##[section]Starting: Upload CPU usage statistics
2019-10-26T04:05:27.3050467Z ==============================================================================
2019-10-26T04:05:27.3050558Z Task : Bash
2019-10-26T04:05:27.3050647Z Description : Run a Bash script on macOS, Linux, or Windows
---
2019-10-26T04:05:27.5921823Z ========================== Starting Command Output ===========================
2019-10-26T04:05:27.5928678Z [command]"C:\Program Files\Git\bin\bash.exe" --noprofile --norc /d/a/_temp/14d1e8ad-af68-4cae-99bd-2df7273327fa.sh
2019-10-26T04:05:27.6371201Z /d/a/_temp/14d1e8ad-af68-4cae-99bd-2df7273327fa.sh: line 1: aws: command not found
2019-10-26T04:05:27.6403752Z 2019-10-26T04:05:27.6425409Z ##[error]Bash exited with code '127'.
2019-10-26T04:05:27.6504119Z ##[section]Starting: Checkout
2019-10-26T04:05:27.6605334Z ==============================================================================
2019-10-26T04:05:27.6605441Z Task : Get sources
2019-10-26T04:05:27.6605711Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@bors

bors commented Oct 26, 2019

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-azure

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 26, 2019
@JohnTitor

Copy link
Copy Markdown
Member

It's a network error.
@bors retry

@borsbors 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 Oct 26, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 26, 2019
…omatsakis
Point at associated type for some obligations
Partially address rust-lang#57663.
@CentrilCentril mentioned this pull request Oct 26, 2019
bors added a commit that referenced this pull request Oct 27, 2019
Point at associated type for some obligations
Partially address #57663.
@bors

bors commented Oct 27, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 3a4cacd with merge cf148a7...

@bors

bors commented Oct 27, 2019

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: nikomatsakis
Pushing cf148a7 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Oct 27, 2019
@bors
bors merged commit 3a4cacd into rust-lang:masterOct 27, 2019
Comment threadsrc/librustc/ty/wf.rs
body_id: hir::HirId,
trait_ref: &ty::TraitRef<'tcx>,
span: Span,
item: Option<&'tcx hir::Item>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think passing around references to the HIR fits ty::wf, this can just be an Option<DefId> and should probably be named something more suggestive.

Comment threadsrc/librustc/ty/wf.rs
let cause = self.cause(traits::MiscObligation);
let param_env = self.param_env;

let item = &self.item;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to borrow a Copy field.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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.

9 participants

@estebank@rust-highfive@cramertj@Centril@bors@rust-timer@nikomatsakis@JohnTitor@eddyb