Skip to content

librustc: Implement explicit self for Add and Index; add a hack in the b... - #4057

Closed
pcwalton wants to merge 1 commit into
rust-lang:incomingfrom
pcwalton:explicit-self-add-index
Closed

librustc: Implement explicit self for Add and Index; add a hack in the b...#4057
pcwalton wants to merge 1 commit into
rust-lang:incomingfrom
pcwalton:explicit-self-add-index

Conversation

@pcwalton

Copy link
Copy Markdown
Contributor

...orrow checker to support this

r? @nikomatsakis

@nikomatsakis

Copy link
Copy Markdown
Contributor

An egregious hack, but r+

@pcwalton pcwalton closed this Dec 4, 2012
RalfJung added a commit to RalfJung/rust that referenced this pull request Dec 8, 2024
Fix weak memory emulation to avoid generating behaviors that are forbidden under C++ 20
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
4057: Fix panic in split_imports assist r=matklad a=matklad

The fix is admittedly quit literally just papering over.

Long-term, I see two more principled approaches:

* we switch to a fully tree-based impl, without parse . to_string
  step; with this approach, there shouldn't be any panics. The results
  might be nonsensical, but so was the original input.

* we preserve the invariant that re-parsing constructed node is an
  identity, and make all the `make_xxx` method return an `Option`.

closes rust-lang#4044



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants