-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Allow lifetime elision in Pin<&(mut) Self>
#61207
Allow lifetime elision in Pin<&(mut) Self>
#61207
Conversation
This is a breaking change as said by #60944 (comment) and #60944 (comment). Then, as @cramertj said in #60944 (comment), a beta backport is probably preferable. |
1d2494f
to
eee2005
Compare
5edeeaa
to
46c752a
Compare
Overall I'm quite unsure about in what direction we should take this and I feel I have a lack of information about what the current rules are. I'd appreciate if someone would do a write-up of all the current rules wrt. lifetime elision. Ideally, I think if we could get away with just special casing |
|
I'm confused by all of this. The current PR seems to permit more code taking us away from the simpler logic of only assigning special meaning to |
@Centril |
The job Click to expand the log.
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 |
1cbcbcf
to
914e4a3
Compare
I like how simple this is! But we should have a crater run, just to be sure: |
…2, r=<try> Allow lifetime elision in `Pin<&(mut) Self>` This replaces #60944. ~~This PR changes elision rules to apply `self: &(mut) Self` elision rules even if nested in `Pin`.~~ This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Closes #52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
☀️ Try build successful - checks-travis |
@craterbot run mode=check-only |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@Centril Done! |
@bors r+ |
📌 Commit 05f67a2 has been approved by |
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
Rollup of 8 pull requests Successful merges: - #61207 (Allow lifetime elision in `Pin<&(mut) Self>`) - #62074 (squash of all commits for nth_back on ChunksMut) - #62771 (Break dependencies between `syntax_ext` and other crates) - #62883 (Refactoring use common code between option, result and accum) - #62949 (Re-enable assertions in PPC dist builder) - #62996 (tidy: Add a check for inline unit tests) - #63038 (Make more informative error on outer attribute after inner) - #63050 (ci: download awscli from our mirror) Failed merges: r? @ghost
[beta] Rollup backports Cherry picked: * Updated RELEASES.md for 1.37.0 #63147 * Require a value for configure --debuginfo-level #62906 * Make the parser TokenStream more resilient after mismatched delimiter recovery #62887 * ci: move .azure-pipelines to src/ci/azure-pipelines #63242 Rolled up: * [BETA] Update cargo #62911 * [beta] Backport #61207 #63254 r? @ghost
…s, r=nikomatsakis `async fn` lifetime elision tests Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment). Works towards resolving blockers in rust-lang#63209. r? @nikomatsakis cc @cramertj
…s, r=nikomatsakis `async fn` lifetime elision tests Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment). Works towards resolving blockers in rust-lang#63209. r? @nikomatsakis cc @cramertj
…s, r=nikomatsakis `async fn` lifetime elision tests Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment). Works towards resolving blockers in rust-lang#63209. r? @nikomatsakis cc @cramertj
…s, r=nikomatsakis `async fn` lifetime elision tests Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment). Works towards resolving blockers in rust-lang#63209. r? @nikomatsakis cc @cramertj
…s, r=nikomatsakis `async fn` lifetime elision tests Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment). Works towards resolving blockers in rust-lang#63209. r? @nikomatsakis cc @cramertj
…s, r=nikomatsakis `async fn` lifetime elision tests Add `async fn` version of the tests in rust-lang#61207 per the first checkbox in rust-lang#62121 (comment). Works towards resolving blockers in rust-lang#63209. r? @nikomatsakis cc @cramertj
137: Run tests on Rust 1.36 r=taiki-e a=taiki-e This is the minimum Rust version we can actually run tests on because the current test depends on the elision rules introduced in rust-lang/rust#61207. Co-authored-by: Taiki Endo <te316e89@gmail.com>
This PR changes
self: &(mut) S
elision rules to instead visit the type ofself
and look for&(mut) S
(whereis_self_ty(S)
) within itReplaces #60944
Closes #52675
r? @eddyb
cc @cramertj @Centril @withoutboats @scottmcm