Commit Graph

6563 Commits

Author SHA1 Message Date
Niko Matsakis c62a056871
Merge pull request #3616 from toofooboo/master
text: fix typos in comments
2024-04-19 09:26:34 -04:00
toofooboo cdf8dd5948 text: fix typos in comments
Signed-off-by: toofooboo <cmaker@foxmail.com>
2024-04-19 19:37:30 +08:00
Eric Huss 70c0cc7620
Merge pull request #3613 from growfrow/master
chore: remove repetitive words
2024-04-18 07:29:27 -07:00
growfrow 9d706c0b18 chore: remove repetitive words
Signed-off-by: growfrow <growfrow@outlook.com>
2024-04-18 16:50:13 +08:00
Eric Huss 766f61b343
Merge pull request #3612 from slanterns/patch-1
Update 2289-associated-type-bounds.md
2024-04-12 08:17:34 -07:00
Slanterns 9da8bae46b
Update 2289-associated-type-bounds.md 2024-04-12 17:17:18 +08:00
Travis Cross bc01ed83c1
Merge RFC 3513: Add `gen` blocks
The FCP for RFC 3513 completed on 2024-03-23 with a disposition to
merge.  Let's merge it.
2024-04-07 22:09:46 +00:00
Eric Huss 0044bb7a43
Merge pull request #3602 from rust-lang/renovate/actions-deploy-pages-4.x
Update actions/deploy-pages action to v4.0.5
2024-03-31 20:20:20 -07:00
renovate[bot] ef1a19dcb9
Update actions/deploy-pages action to v4.0.5 2024-04-01 00:45:11 +00:00
Travis Cross 22f726707a Use RLE as a stronger motivating example
The motivating example we had given for `gen` blocks admitted too easy
an implementation with existing stable iterator combinators.  Let's
make the example more *motivating* by showing a simple algorithm,
run-length encoding, that's more difficult to implement in other ways.

(Thanks to Ralf Jung for pointing out the need for a better example.)
2024-03-30 20:16:01 +00:00
Travis Cross 354abf6626 Add note about `return yield EXPR`
Under this RFC, it's possible to yield one last value concisely with
`return yield EXPR`.  Let's make a note of that.

(Thanks to Nemo157 for pointing this out and to pnkfelix for
suggesting that this be noted in the RFC.)
2024-03-29 05:46:04 +00:00
Travis Cross a02190547f Add Rust example to prior art
Using the no-op `Waker`, we can express generators and coroutines in
Rust.  Let's close our list of prior art examples with that.
2024-03-29 05:28:54 +00:00
Travis Cross 7eacd063df Add Koka example to prior art
The Koka language provides an interesting alternative data point for
how generators and other powerful control flow constructs could work
in a typed language such as Rust.  Let's include an example in the
prior art section.

(Thanks to zesterer for asking for this.)
2024-03-29 05:28:54 +00:00
Travis Cross 31c7b288dd Do a round of copyediting
We had been meaning to do some final copyediting prior to this RFC
being merged, so let's do that.  In addition to making the text a bit
more regular and precise, fixing some minor errors, removing outdated
information, and adding references between sections, we've tried to
"tighten it up" a bit where possible.  We've been careful to not
change anything of semantic significance or otherwise of significance
to the consensus.
2024-03-29 05:28:54 +00:00
Travis Cross 59be7f9b7f Add open question about Rust 2015 and Rust 2018
In RFC 3101 we reserved in Rust 2021 prefixed identifiers such as
`prefix#ident`.  For this reason, we can make `gen` blocks available
in Rust 2021 using `k#gen` as was anticipated in the (currently
pending) RFC 3098.

It's less clear what to do about Rust 2015 and Rust 2018, however, so
let's mark this as an open question.

(Thanks to tmandry for raising this point.)
2024-03-28 22:44:29 +00:00
Eric Huss 34f045ec8d
Merge pull request #3598 from JohnEndson/master
chore: fix some comments
2024-03-28 07:42:38 -07:00
JohnEndson 4417196151 chore: fix some comments
Signed-off-by: JohnEndson <jiayuzhen@outlook.com>
2024-03-28 19:54:49 +08:00
Travis Cross 4bf6106c80 Remove incorrect statement about pinning
There was a statement in the draft about, as a downside, something
needing to be pinned for the entire iteration rather than just for
each call to `next`.  But, of course, under the pinning guarantees,
these are equivalent.  Once something is pinned, unless it is `Unpin`,
it must be treated as pinned until it is destructed.  Let's remove
this statement.
2024-03-27 20:22:13 +00:00
Travis Cross f6cd712389 Add future possibility of implementing `FusedIterator`
The main body of the RFC discusses how we might implement
`FusedIterator` for the iterators produced by `gen` blocks, but this
was not listed as a future possibility.  Let's do that.
2024-03-27 19:05:06 +00:00
Travis Cross ad74905583 Unwrap lines
We had a mix between hard wrapped lines of various widths and
unwrapped lines.  Let's unwrap all lines.
2024-03-27 18:11:33 +00:00
Travis Cross 787e0e9066 Update feature name to `gen_blocks`
The feature name in the draft was a placeholder.  Let's update this to
the actual feature name now in use.
2024-03-27 18:11:19 +00:00
Travis Cross 3f0159d43f Rename file for RFC 3513
In addition to giving the file the correct number, let's call this
`gen-blocks` rather than `gen-fn` since we removed `gen fn` from the
main body of this RFC.
2024-03-27 17:37:10 +00:00
Travis Cross 32ffb27eb7 Add tracking issue for RFC 3513
We had already opened a tracking issue for this work, so let's fill
that in here.
2024-03-27 17:34:58 +00:00
Eric Huss 02f38df718
Merge pull request #3580 from RalfJung/provenance-upd
provenance RFC: add link to alternative LLVM proposal
2024-03-26 18:47:20 -07:00
Travis Cross c39fdca1e3
Merge RFC 3543: patchable-function-entry
The FCP for RFC 3543 completed on 2024-03-12 with a disposition to
merge.  Let's merge it.
2024-03-27 01:17:28 +00:00
Travis Cross 8b925c57c6 Prepare RFC 3543 for merge
RFC 3543 has been accepted.  We've created the tracking issue.  Let's
add that to the RFC.
2024-03-27 01:00:09 +00:00
Travis Cross d6200f7831 Fix missing word in RFC 3543
Under "future possibilities", a sentence was missing the word
"crate".  Let's fix that.
2024-03-27 01:00:09 +00:00
León Orell Valerian Liehr 6591585f4f
Merge pull request #3590 from rust-lang/TC/fix-higher-ranked-not-higher-kinded
Fix "higher kinded" -> "higher ranked" in RFC 3498
2024-03-19 18:12:58 +01:00
Travis Cross e413085eca Fix "higher kinded" -> "higher ranked" in RFC 3498
In RFC 3498 "Lifetime Capture Rules 2024" we specify that lifetime
parameters from `for<..>` binders are captured under the rules.

Currently opaque types in Rust do not support capturing these.  In
early drafts of the document, we had called the missing feature
"higher ranked lifetime bounds on nested opaque types".  However, we
had then noticed that the relevant error message in `rustc` called
these "higher kinded" instead:

> error: higher kinded lifetime bounds on nested opaque types are not
> supported yet

We changed later drafts to follow that language.  But that language
was wrong.  These are definitely "higher ranked" lifetime bounds, not
"higher kinded" ones, whatever that might mean.  We've now fixed the
error message emitted by `rustc` in:

- https://github.com/rust-lang/rust/pull/122100

Correspondingly, let's now fix this error in the RFC.
2024-03-19 16:49:28 +00:00
Eric Huss 43e8e96724
Merge pull request #3589 from HigherOrderLogic/master
Correct rustdoc JSON example
2024-03-18 12:00:34 -07:00
Horu 8e172d6dc1 Correct rustdoc JSON example 2024-03-18 21:34:41 +07:00
Eric Huss 577c50cf06
Merge pull request #3584 from pengqiseven/master
remove repetitive words
2024-03-17 10:07:18 -07:00
Travis Cross 8846955ab6 Fix where we fixed `k#gen`
We meant to change `r#gen` to `k#gen` on one line to fix an apparent
earlier search/replace error, and we erroneously changed it on a
different line.  Let's fix the correct line and fix the mistaken fix.
2024-03-15 03:13:56 +00:00
Travis Cross caf93bad67 Fix `k#gen`
The language about how to refer to the `gen` keyword in older editions
was changed in a recent commit from `k#gen` to `r#gen`.  This was
probably a search/replace error.  Let's fix that.
2024-03-15 01:54:46 +00:00
Travis Cross a2bf47319c Add unresolved question about implemented traits
To give us better options for supporting self-referential generators
we may not want the type returned by `gen` blocks to implement
`Iterator` directly.  Let's call this out as an open question and
weaken claims throughout the document related to this.
2024-03-15 01:25:21 +00:00
Travis Cross 6478947eb4 Adjust for `Generator -> Coroutine` rename
For many years, we had a trait in nightly Rust called `Generator`.
We've now renamed this to `Coroutine`, but this RFC still referred to
it as `Generator`.  Let's use the new name and make a note of the old
one.
2024-03-14 23:48:57 +00:00
Travis Cross b836635a4a Make self-referential `gen` blocks an open question
We had listed self-referential `gen` blocks as a future possibility,
but in discussion with T-lang, it's become clear that this should
instead be listed as an open question, so let's do that.
2024-03-13 14:18:13 +00:00
Oli Scherer 2dd7be2680
Merge pull request #3586 from rust-lang/Manishearth-patch-1
Fix date on RFC 3243
2024-03-12 15:30:15 +01:00
Manish Goregaokar df553f819e
Fix date on RFC 3243 2024-03-12 09:24:00 +00:00
Oli Scherer 9d97626edf
Merge pull request #3243 from Manishearth/namespacing
RFC: Packages as (optional) namespaces
2024-03-11 23:31:00 +01:00
Oli Scherer 656203f28c
Link to rust tracking issue 2024-03-11 23:30:45 +01:00
Oli Scherer a93b1e4fb8
Add RFC PR link 2024-03-11 22:41:10 +01:00
Oli Scherer 6cc888605a
Rename 0000-packages-as-optional-namespaces.md to 3243-packages-as-optional-namespaces.md 2024-03-11 22:40:11 +01:00
Manish Goregaokar 0db096f169
Update text/0000-packages-as-optional-namespaces.md
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2024-03-11 13:21:08 -07:00
pengqiseven 07ddc77bb9 remove repetitive words
Signed-off-by: pengqiseven <912170095@qq.com>
2024-03-10 22:24:32 +08:00
pengqiseven 9a7767abce remove repetitive words
Signed-off-by: pengqiseven <912170095@qq.com>
2024-03-10 11:33:05 +08:00
Ralf Jung cf7195dc58
fix wording
Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
2024-03-01 12:25:40 +01:00
Ralf Jung 705cd9a6a1 provenance RFC: add link to alternative LLVM proposal 2024-03-01 08:16:36 +01:00
Oli Scherer 349c517d81 Give some examples of self-referential generators and why they don't work. 2024-02-29 08:45:44 +00:00
Oli Scherer b524348b8b Address T-lang feedback 2024-02-29 08:36:16 +00:00