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

Extract impl_header_lifetime_elision out of in_band_lifetimes #53016

Merged
merged 3 commits into from Aug 7, 2018

Conversation

Projects
None yet
5 participants
@scottmcm
Copy link
Member

scottmcm commented Aug 3, 2018

This way we can experiment with impl Debug for &MyType separately from impl Debug for &'a MyType.

I can't say I know what the code in here is doing, so please let me know if there's a better way 🙂

I marked this as enabled in 2018 so that edition code continues to work without another flag.

Actual feature PR #49251; Tracking Issue #15872; In-band lifetimes tracking issue #44524.

cc @aturon, per discussion on discord earlier
cc @cramertj & @nikomatsakis, who actually wrote these features

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Aug 3, 2018

r? @pnkfelix

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

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Aug 3, 2018

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
[00:23:43]    Compiling syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:23:50] error[E0106]: missing lifetime specifier
[00:23:50]     --> librustc/ty/layout.rs:1511:23
[00:23:50]      |
[00:23:50] 1511 | impl TyCtxt<'a, 'tcx, '_> {
[00:23:50]      |                       ^^ expected lifetime parameter
[00:23:50] error[E0106]: missing lifetime specifier
[00:23:50]     --> librustc/ty/layout.rs:1525:36
[00:23:50]      |
[00:23:50]      |
[00:23:50] 1525 | impl ty::query::TyCtxtAt<'a, 'tcx, '_> {
[00:23:50]      |                                    ^^ expected lifetime parameter
[00:23:52] error: aborting due to 2 previous errors
[00:23:52] 
[00:23:52] For more information about this error, try `rustc --explain E0106`.
[00:23:52] error: Could not compile `rustc`.
[00:23:52] error: Could not compile `rustc`.
[00:23:52] 
[00:23:52] Caused by:
[00:23:52]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc librustc/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=720dea79fb540dad -C extra-filename=-720dea79fb540dad --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-c1f25458fdd14778.so --extern backtrace=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbacktrace-f741a557a3cb210e.rlib --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-9b04b6981047a227.rlib --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-da03a033b1a119c5.rlib --extern chalk_engine=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libchalk_engine-30c883ec86c7b095.rlib --extern flate2=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libflate2-63f58afd5221c60f.rlib --extern fmt_macros=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libfmt_macros-e7104d970c23d2cc.so --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-841a904682cb156a.so --extern jobserver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libjobserver-273b415994e29834.rlib --extern lazy_static=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblazy_static-8c4b00a8bc5b69e8.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-740445503e73846f.rlib --extern parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86e921d6ca7bfe5d.rlib --extern polonius_engine=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libpolonius_engine-18b18a9c466a8028.rlib --extern proc_macro=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libproc_macro-deb1ff0610eb64e8.so --extern rustc_rayon=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_rayon-550f7a10d6e1e82e.rlib --extern rustc_rayon_core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_rayon_core-c35eb0a68c36c36a.rlib --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-383028638eefa063.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-96c1202ec26c8e7f.so --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-dbc1d8112dcf9c0b.so --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-09eaeb74e6af7d97.so --extern scoped_tls=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-dbe2b7f632e2ed7d.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-378c1319322dc975.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-378c1319322dc975.rlib --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-47169a160121e6e9.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-2609ea1fb383e9bc.so --extern tempfile=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtempfile-61f20b228d0c9ff9.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-a7669038bd6c823d/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-b967192cda86eebc/out` (exit code: 1)
travis_time:end:2b97e88e:start=1533281485884052437,finish=1533282928503398065,duration=1442619345628

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1ef0fa2a

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)

@scottmcm scottmcm referenced this pull request Aug 3, 2018

Open

Tracking issue for RFC 2115: In-band lifetime bindings #44524

3 of 10 tasks complete
@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Aug 3, 2018

unassigning self as i'm about to go on PTO

@pnkfelix pnkfelix removed their assignment Aug 3, 2018

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Aug 3, 2018

r? @nikomatsakis

(who I assume will have good sense to delegate accordingly if necessary)

Remove in-band lifetimes from the 2018 edition
As mentioned in the 2018-08-04 edition status update, these are postponed as lacking consensus to stabilize.
@scottmcm

This comment has been minimized.

Copy link
Member Author

scottmcm commented Aug 4, 2018

I included a commit here (1c7af27) to remove in-band lifetimes from being automatically-on in the 2018 edition since it seems like that's wanted for edition preview 2 (cc @Centril).

@nikomatsakis
Copy link
Contributor

nikomatsakis left a comment

I have a nit, but it hardly matters

@@ -718,6 +720,10 @@ impl<'a> LoweringContext<'a> {
return;
}

This comment has been minimized.

@nikomatsakis

nikomatsakis Aug 6, 2018

Contributor

seems like we could remove this if, as it serves no purpose now

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 6, 2018

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 6, 2018

📌 Commit 1c7af27 has been approved by nikomatsakis

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Aug 6, 2018

@bors p=1

Giving higher priority because this is an EP2 blocker

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 6, 2018

⌛️ Testing commit 1c7af27 with merge 45a9d41...

bors added a commit that referenced this pull request Aug 6, 2018

Auto merge of #53016 - scottmcm:impl-header-lifetime-elision, r=nikom…
…atsakis

Extract impl_header_lifetime_elision out of in_band_lifetimes

This way we can experiment with `impl Debug for &MyType` separately from `impl Debug for &'a MyType`.

I can't say I know what the code in here is doing, so please let me know if there's a better way 🙂

I marked this as enabled in 2018 so that edition code continues to work without another flag.

Actual feature PR #49251; Tracking Issue #15872; In-band lifetimes tracking issue #44524.

cc @aturon, per discussion on discord earlier
cc @cramertj & @nikomatsakis, who actually wrote these features
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Aug 7, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 45a9d41 to master...

@bors bors merged commit 1c7af27 into rust-lang:master Aug 7, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Aug 7, 2018

📣 Toolstate changed by #53016!

Tested on commit 45a9d41.
Direct link to PR: #53016

💔 clippy-driver on windows: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Aug 7, 2018

📣 Toolstate changed by rust-lang/rust#53016!
Tested on commit rust-lang/rust@45a9d41.
Direct link to PR: <rust-lang/rust#53016>

💔 clippy-driver on windows: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).

scottmcm added a commit to scottmcm/rust-clippy that referenced this pull request Aug 7, 2018

Fix the build after rust-lang/rust#53016
In-band lifetimes are no longer in the edition, so update the one place that was using them.

@scottmcm scottmcm deleted the scottmcm:impl-header-lifetime-elision branch Aug 7, 2018

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