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

Improve lifetime errors with implicit trait object lifetimes #66679

Merged
merged 4 commits into from
Dec 1, 2019

Conversation

mark-i-m
Copy link
Member

r? @matthewjasper

cc @estebank

I still think the ideal solution would be to construct a BrAnon, but that seems like a more invasive change, and can be done later. This at least gets rid of the hack in OutliveSuggestion and is slightly more principled.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 23, 2019
Copy link
Contributor

@matthewjasper matthewjasper left a comment

Choose a reason for hiding this comment

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

This appears to apply to more than just trait objects.
r=me with comments addressed.

@matthewjasper matthewjasper added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2019
@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 25, 2019
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 27, 2019

📌 Commit 8f4d3632b03d8526f643c9ccab99172f02a83a07 has been approved by matthewjasper

@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 Nov 27, 2019
@bors
Copy link
Contributor

bors commented Nov 28, 2019

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 28, 2019
@mark-i-m
Copy link
Member Author

Rebased, but need to rerun tests and bless...

@rust-highfive
Copy link
Collaborator

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-11-28T01:33:03.3582393Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-28T01:33:03.3766918Z ##[command]git config gc.auto 0
2019-11-28T01:33:03.3852344Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-28T01:33:03.3906386Z ##[command]git config --get-all http.proxy
2019-11-28T01:33:03.4053497Z ##[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/66679/merge:refs/remotes/pull/66679/merge
---
2019-11-28T01:46:46.2614698Z    Compiling syntax_expand v0.0.0 (/checkout/src/libsyntax_expand)
2019-11-28T01:47:50.1012421Z    Compiling rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
2019-11-28T01:51:25.1719098Z    Compiling rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-11-28T01:52:02.3444682Z    Compiling rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-11-28T01:52:06.5009920Z error[E0599]: no method named `synthesize_region_name` found for type `&borrow_check::nll::region_infer::RegionInferenceContext<'tcx>` in the current scope
2019-11-28T01:52:06.5013859Z     |
2019-11-28T01:52:06.5013859Z     |
2019-11-28T01:52:06.5014213Z 312 |                         let name = self.synthesize_region_name(renctx);
2019-11-28T01:52:06.5014779Z     |                                         ^^^^^^^^^^^^^^^^^^^^^^ method not found in `&borrow_check::nll::region_infer::RegionInferenceContext<'tcx>`
2019-11-28T01:52:12.4188321Z error: aborting due to previous error
2019-11-28T01:52:12.4188422Z 
2019-11-28T01:52:12.4189015Z For more information about this error, try `rustc --explain E0599`.
2019-11-28T01:52:12.5010823Z error: could not compile `rustc_mir`.
---
2019-11-28T01:54:06.5159482Z   local time: Thu Nov 28 01:54:06 UTC 2019
2019-11-28T01:54:06.8158913Z   network time: Thu, 28 Nov 2019 01:54:06 GMT
2019-11-28T01:54:06.8160071Z == end clock drift check ==
2019-11-28T01:54:09.6815800Z 
2019-11-28T01:54:09.6914662Z ##[error]Bash exited with code '1'.
2019-11-28T01:54:09.6945626Z ##[section]Starting: Checkout
2019-11-28T01:54:09.6947350Z ==============================================================================
2019-11-28T01:54:09.6947421Z Task         : Get sources
2019-11-28T01:54:09.6947467Z 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)

@mark-i-m
Copy link
Member Author

@matthewjasper I think this is ready now :)

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 30, 2019

📌 Commit 2a86b6c has been approved by matthewjasper

@bors
Copy link
Contributor

bors commented Nov 30, 2019

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 30, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 1, 2019
…r=matthewjasper

Improve lifetime errors with implicit trait object lifetimes

r? @matthewjasper

cc @estebank

I still think the ideal solution would be to construct a `BrAnon`, but that seems like a more invasive change, and can be done later. This at least gets rid of the hack in `OutliveSuggestion` and is slightly more principled.
bors added a commit that referenced this pull request Dec 1, 2019
Rollup of 9 pull requests

Successful merges:

 - #66503 (More useful test error messages on should_panic(expected=...) mismatch)
 - #66662 (Miri: run panic-catching tests in liballoc)
 - #66679 (Improve lifetime errors with implicit trait object lifetimes)
 - #66726 (Use recursion_limit for const eval stack limit)
 - #66790 (Do `min_const_fn` checks for `SetDiscriminant`s target)
 - #66832 (const_prop: detect and avoid catching Miri errors that require allocation)
 - #66880 (Add long error code explanation message for E0203)
 - #66890 (Format liballoc with rustfmt)
 - #66896 (pass Queries to compiler callbacks)

Failed merges:

r? @ghost
@bors bors merged commit 2a86b6c into rust-lang:master Dec 1, 2019
@mark-i-m mark-i-m deleted the fix-anon-lifetime-errors branch December 11, 2019 21:35
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.

5 participants