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

Point at associated type for some obligations #65288

Merged
merged 7 commits into from Oct 27, 2019

Conversation

@estebank
Copy link
Contributor

estebank commented Oct 10, 2019

Partially address #57663.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 10, 2019

r? @cramertj

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

@estebank estebank force-pushed the estebank:point-at-assoc-type branch from 447f3ff to c808d66 Oct 10, 2019
@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Oct 10, 2019

The job x86_64-gnu-llvm-6.0 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.
2019-10-10T23:24:36.0570421Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-10T23:24:36.0646226Z ##[command]git config gc.auto 0
2019-10-10T23:24:36.0720616Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-10T23:24:36.0783111Z ##[command]git config --get-all http.proxy
2019-10-10T23:24:36.0909889Z ##[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/65288/merge:refs/remotes/pull/65288/merge
---
2019-10-10T23:31:02.3275216Z    Compiling serde_json v1.0.40
2019-10-10T23:31:04.1398343Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-10-10T23:31:16.2844646Z     Finished release [optimized] target(s) in 1m 31s
2019-10-10T23:31:16.2974812Z tidy check
2019-10-10T23:31:17.0656798Z tidy error: /checkout/src/librustc/ty/wf.rs:191: trailing whitespace
2019-10-10T23:31:18.4978217Z Found 482 error codes
2019-10-10T23:31:18.4979193Z Found 0 error codes with no tests
2019-10-10T23:31:18.4979367Z Done!
2019-10-10T23:31:18.4979501Z some tidy checks failed
2019-10-10T23:31:18.4979501Z some tidy checks failed
2019-10-10T23:31:18.4987273Z 
2019-10-10T23:31:18.4987540Z 
2019-10-10T23:31:18.4988510Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-10-10T23:31:18.4988910Z 
2019-10-10T23:31:18.4989034Z 
2019-10-10T23:31:18.4990409Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-10-10T23:31:18.4990597Z Build completed unsuccessfully in 0:01:34
2019-10-10T23:31:18.4990597Z Build completed unsuccessfully in 0:01:34
2019-10-10T23:31:18.5037578Z == clock drift check ==
2019-10-10T23:31:18.5053966Z   local time: Thu Oct 10 23:31:18 UTC 2019
2019-10-10T23:31:18.5889103Z   network time: Thu, 10 Oct 2019 23:31:18 GMT
2019-10-10T23:31:18.5893741Z == end clock drift check ==
2019-10-10T23:31:19.3889765Z ##[error]Bash exited with code '1'.
2019-10-10T23:31:19.3947776Z ##[section]Starting: Checkout
2019-10-10T23:31:19.3949176Z ==============================================================================
2019-10-10T23:31:19.3949366Z Task         : Get sources
2019-10-10T23:31:19.3949402Z 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)

@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Oct 10, 2019

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

@estebank estebank force-pushed the estebank:point-at-assoc-type branch from c808d66 to 4c3d9fa Oct 11, 2019
@estebank

This comment has been minimized.

Copy link
Contributor Author

estebank commented Oct 11, 2019

Maybe @nikomatsakis?

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Oct 11, 2019

The job x86_64-gnu-llvm-6.0 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.
2019-10-11T01:00:38.8477950Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-11T01:00:38.8646929Z ##[command]git config gc.auto 0
2019-10-11T01:00:38.8694282Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-11T01:00:38.8757101Z ##[command]git config --get-all http.proxy
2019-10-11T01:00:38.8908257Z ##[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/65288/merge:refs/remotes/pull/65288/merge
---
2019-10-11T02:03:34.0084282Z .................................................................................................... 1600/9146
2019-10-11T02:03:41.7312750Z .................................................................................................... 1700/9146
2019-10-11T02:03:53.2842608Z .................i...............i.................................................................. 1800/9146
2019-10-11T02:04:00.8070210Z .................................................................................................... 1900/9146
2019-10-11T02:04:16.2573533Z ........iiiii....................................................................................... 2000/9146
2019-10-11T02:04:26.5732585Z .................................................................................................... 2200/9146
2019-10-11T02:04:29.3261106Z .................................................................................................... 2300/9146
2019-10-11T02:04:35.2637499Z .................................................................................................... 2400/9146
2019-10-11T02:04:41.8385518Z .................................................................................................... 2500/9146
---
2019-10-11T02:07:41.1076987Z .................................................................................................... 4700/9146
2019-10-11T02:07:48.6446108Z .i...............i.................................................................................. 4800/9146
2019-10-11T02:08:00.2037311Z .................................................................................................... 4900/9146
2019-10-11T02:08:06.1271155Z .................................................................................................... 5000/9146
2019-10-11T02:08:17.7665446Z ...............................................................................................ii.ii 5100/9146
2019-10-11T02:08:28.6305705Z .................................................................................................... 5300/9146
2019-10-11T02:08:38.7364539Z .................................................................................................... 5400/9146
2019-10-11T02:08:45.6901691Z .............................................................i...................................... 5500/9146
2019-10-11T02:08:53.2280765Z .................................................................................................... 5600/9146
2019-10-11T02:08:53.2280765Z .................................................................................................... 5600/9146
2019-10-11T02:09:00.8912399Z .................................................................................................... 5700/9146
2019-10-11T02:09:11.3979551Z ..........................................................ii...i..ii...........i.................... 5800/9146
2019-10-11T02:09:38.2851965Z .................................................................................................... 6000/9146
2019-10-11T02:09:47.8264589Z .................................................................................................... 6100/9146
2019-10-11T02:09:47.8264589Z .................................................................................................... 6100/9146
2019-10-11T02:09:55.8815292Z ................................................................i..ii............................... 6200/9146
2019-10-11T02:10:25.9743433Z .................................................................................................... 6400/9146
2019-10-11T02:10:28.2228311Z ........................i........................................................................... 6500/9146
2019-10-11T02:10:30.6411422Z .................................................................................................i.. 6600/9146
2019-10-11T02:10:33.4754230Z .................................................................................................... 6700/9146
---
2019-10-11T02:14:55.5007597Z failures:
2019-10-11T02:14:55.5007685Z 
2019-10-11T02:14:55.5008203Z ---- [compile-fail] compile-fail/chalkify/impl_wf.rs stdout ----
2019-10-11T02:14:55.5008255Z 
2019-10-11T02:14:55.5008706Z error: /checkout/src/test/compile-fail/chalkify/impl_wf.rs:27: unexpected error: '27:5: 27:21: the trait bound `f32: Foo` is not satisfied [E0277]'
2019-10-11T02:14:55.5008858Z error: 1 unexpected errors found, 0 expected errors not found
2019-10-11T02:14:55.5008934Z status: exit code: 1
2019-10-11T02:14:55.5008934Z status: exit code: 1
2019-10-11T02:14:55.5009820Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/chalkify/impl_wf.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/chalkify/impl_wf" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "chalk" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/chalkify/impl_wf/auxiliary" "-A" "unused"
2019-10-11T02:14:55.5009976Z unexpected errors (from JSON output): [
2019-10-11T02:14:55.5010031Z     Error {
2019-10-11T02:14:55.5010087Z         line_num: 27,
2019-10-11T02:14:55.5010157Z         kind: Some(
2019-10-11T02:14:55.5010529Z         ),
2019-10-11T02:14:55.5010529Z         ),
2019-10-11T02:14:55.5010643Z         msg: "27:5: 27:21: the trait bound `f32: Foo` is not satisfied [E0277]",
2019-10-11T02:14:55.5010752Z ]
2019-10-11T02:14:55.5010947Z 
2019-10-11T02:14:55.5011830Z thread '[compile-fail] compile-fail/chalkify/impl_wf.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1520:13
2019-10-11T02:14:55.5011928Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
---
2019-10-11T02:14:55.5018292Z FAILED. 31 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2019-10-11T02:14:55.5018338Z 
2019-10-11T02:14:55.5018675Z 
2019-10-11T02:14:55.5018738Z 
2019-10-11T02:14:55.5027495Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-10-11T02:14:55.5027859Z 
2019-10-11T02:14:55.5027894Z 
2019-10-11T02:14:55.5043836Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-10-11T02:14:55.5104682Z Build completed unsuccessfully in 1:07:48
2019-10-11T02:14:55.5104682Z Build completed unsuccessfully in 1:07:48
2019-10-11T02:14:55.5111148Z == clock drift check ==
2019-10-11T02:14:55.5138928Z   local time: Fri Oct 11 02:14:55 UTC 2019
2019-10-11T02:14:55.5520690Z   network time: Fri, 11 Oct 2019 02:14:55 GMT
2019-10-11T02:14:55.5522388Z == end clock drift check ==
2019-10-11T02:14:55.9846185Z ##[error]Bash exited with code '1'.
2019-10-11T02:14:55.9900355Z ##[section]Starting: Checkout
2019-10-11T02:14:55.9902760Z ==============================================================================
2019-10-11T02:14:55.9902825Z Task         : Get sources
2019-10-11T02:14:55.9902898Z 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)

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Oct 11, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 11, 2019

⌛️ 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

This comment has been minimized.

Copy link
Contributor

bors commented Oct 11, 2019

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

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Oct 11, 2019

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Oct 11, 2019

Queued afb10f4 with parent 000d90b, future comparison URL.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Oct 11, 2019

@rust-timer

This comment has been minimized.

Copy link

rust-timer commented Oct 12, 2019

Finished benchmarking try commit afb10f4, comparison URL.

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Oct 12, 2019

Perf looks clean

Copy link
Contributor

nikomatsakis left a comment

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

src/librustc/ty/wf.rs Outdated Show resolved Hide resolved
src/librustc/ty/wf.rs Outdated Show resolved Hide resolved
@estebank estebank force-pushed the estebank:point-at-assoc-type branch from cbd994b to 9824ba6 Oct 22, 2019
@estebank estebank force-pushed the estebank:point-at-assoc-type branch from 9824ba6 to 8d4714a Oct 22, 2019
@estebank estebank force-pushed the estebank:point-at-assoc-type branch from 8d4714a to 580a93e Oct 22, 2019
@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Oct 22, 2019

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-22T20:25:14.3832767Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-22T20:25:14.4036731Z ##[command]git config gc.auto 0
2019-10-22T20:25:14.4130980Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-22T20:25:14.4193074Z ##[command]git config --get-all http.proxy
2019-10-22T20:25:14.4337959Z ##[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/65288/merge:refs/remotes/pull/65288/merge

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)

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Oct 22, 2019

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-22T21:03:12.4584021Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-10-22T21:03:12.4777101Z ##[command]git config gc.auto 0
2019-10-22T21:03:12.4831596Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-10-22T21:03:12.4897268Z ##[command]git config --get-all http.proxy
2019-10-22T21:03:12.5017785Z ##[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/65288/merge:refs/remotes/pull/65288/merge

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)

@estebank estebank force-pushed the estebank:point-at-assoc-type branch from 0a7f7b4 to 3a4cacd Oct 23, 2019
@estebank

This comment has been minimized.

Copy link
Contributor Author

estebank commented Oct 23, 2019

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

let obligations = self.nominal_obligations(trait_ref.def_id, trait_ref.substs);

let cause = self.cause(traits::MiscObligation);
let param_env = self.param_env;

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

This comment has been minimized.

Copy link
@nikomatsakis

nikomatsakis Oct 25, 2019

Contributor

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

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Oct 25, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 25, 2019

📌 Commit 3a4cacd has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 26, 2019

⌛️ Testing commit 3a4cacd with merge e39dd25...

bors added a commit that referenced this pull request Oct 26, 2019
Point at associated type for some obligations

Partially address #57663.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 26, 2019

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

This comment has been minimized.

Copy link
Contributor

bors commented Oct 26, 2019

💔 Test failed - checks-azure

@JohnTitor

This comment has been minimized.

Copy link
Member

JohnTitor commented Oct 26, 2019

It's a network error.
@bors retry

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.
bors added a commit that referenced this pull request Oct 26, 2019
Rollup of 7 pull requests

Successful merges:

 - #65288 (Point at associated type for some obligations)
 - #65541 (rustc: add `Span`s to `inferred_outlives_of` predicates.)
 - #65738 (Coherence should allow fundamental types to impl traits when they are local)
 - #65777 (Don't ICE for completely unexpandable `impl Trait` types)
 - #65830 (Use ident.span instead of def_span in dead-code pass)
 - #65834 (Remove lint callback from driver)
 - #65835 (Remove LintBuffer from Session)

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Oct 27, 2019
Point at associated type for some obligations

Partially address #57663.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 27, 2019

⌛️ Testing commit 3a4cacd with merge cf148a7...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 27, 2019

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

@bors bors added the merged-by-bors label Oct 27, 2019
@bors bors merged commit 3a4cacd into rust-lang:master Oct 27, 2019
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20191023.29 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@@ -47,8 +50,9 @@ pub fn trait_obligations<'a, 'tcx>(
body_id: hir::HirId,
trait_ref: &ty::TraitRef<'tcx>,
span: Span,
item: Option<&'tcx hir::Item>,

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 1, 2019

Member

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.

let obligations = self.nominal_obligations(trait_ref.def_id, trait_ref.substs);

let cause = self.cause(traits::MiscObligation);
let param_env = self.param_env;

let item = &self.item;

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 1, 2019

Member

No need to borrow a Copy field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.