-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ch17-02: Monomorphization applies to generics in general #3367
Merged
chriskrycho
merged 4 commits into
rust-lang:main
from
deep-outcome:ch17-02-trait-objects.md
Dec 11, 2024
Merged
ch17-02: Monomorphization applies to generics in general #3367
chriskrycho
merged 4 commits into
rust-lang:main
from
deep-outcome:ch17-02-trait-objects.md
Dec 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is no If you remove that change, I'll consider merging the other change. Thanks! |
`Vec<T>` denotes generic type. As this chapter kindly describes Rust generics cannot hold 2 or more struct kinds.
Beside trait bounds are discussed in 10.2 not in 10.1, _monomorphization_ relates to generics in general not only those bound by/to trait.
deep-outcome
force-pushed
the
ch17-02-trait-objects.md
branch
from
October 21, 2022 19:24
26f0299
to
f2fc3f0
Compare
I acknowledge my error. It is just type name, not any kind of declaration. |
deep-outcome
changed the title
Type parameter removal
Mmonomorphization applies to generics in general
Oct 22, 2022
deep-outcome
changed the title
Mmonomorphization applies to generics in general
ch17-02: Mmonomorphization applies to generics in general
Oct 22, 2022
chriskrycho
changed the title
ch17-02: Mmonomorphization applies to generics in general
ch17-02: Monomorphization applies to generics in general
Dec 11, 2024
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Dec 17, 2024
Update books ## rust-lang/book 21 commits in 9900d976bbfecf4e8124da54351a9ad85ee3c7f3..ad2011d3bcad9f152d034faf7635c22506839d58 2024-12-16 16:11:34 UTC to 2024-12-05 19:19:24 UTC - Ch. 10: clarify note about compiler errors and `'static` (rust-lang/book#4164) - Introduce `let`-`else` statement (rust-lang/book#3702) - Fix misleading explanation of comma in `$(),*` (rust-lang/book#3800) - ch18-03: Matching Named Variables: mention `if let`/`while let` (rust-lang/book#3110) - Ch. 4: Rephrase/clarify paragraph on reference scope (rust-lang/book#3688) - Simplify note about functions in ch13-01-closures.md (rust-lang/book#3699) - fix: make the reason more understandable (rust-lang/book#4074) - Fixed grammatical error in the comment on line 22 (rust-lang/book#3180) - ch17-02: Monomorphization applies to generics in general (rust-lang/book#3367) - Ch. 21: Use `Vec::drain` to teach alternatives to `Option` (rust-lang/book#4159) - fix(typo): correct punctuation in ch15-06-reference-cycles.md (rust-lang/book#4155) - Ch. 20: show both `impl Fn` and `Box<dyn Fn>` (rust-lang/book#4152) - Add `use super::*;` to unit-test examples. (rust-lang/book#4151) - Remove emphasis on four-space indents (rust-lang/book#4150) - Fix `.git-blame-ignore-revs` file (rust-lang/book#4149) - Rust 2024: distinguish `unsafe fn` vs. `unsafe` blocks (rust-lang/book#4148) - Update README.md typo (rust-lang/book#4146) - Ch. 15.5: account for improved error message (rust-lang/book#4142) - Document use of rustfmt and dprint for formatting (rust-lang/book#4138) - tools: fix nostarch build reference to mdbook-trpl (rust-lang/book#4137) - Revise sentence to not refer to two subjects as it (rust-lang/book#4136) ## rust-lang/edition-guide 4 commits in 128669297c8a7fdf771042eaec18b8adfaeaf0cd..f56c9ae2d5b4344367e96513aea9eafb33c897e4 2024-12-10 21:29:01 UTC to 2024-12-04 21:24:35 UTC - Show tail expression temporary example that fails in 2024 (rust-lang/edition-guide#345) - Add more triagebot labeling support (rust-lang/edition-guide#346) - 2024: Assignment operator RHS indentation (rust-lang/edition-guide#341) - 2024: Add chapter on single-line `where` clauses (rust-lang/edition-guide#340) ## rust-lang/nomicon 1 commits in 0674321898cd454764ab69702819d39a919afd68..97e84a38c94bf9362b11284c20b2cb4adaa1e868 2024-12-10 02:41:27 UTC to 2024-12-10 02:41:27 UTC - races.md: data race -> race condition to violate memory safety (rust-lang/nomicon#470) ## rust-lang/reference 4 commits in ede56d1bbe132bac476b5029cd6d7508ca9572e9..183dd4b95f35dce35527d9fe68d869ac35e640e3 2024-12-14 21:22:49 UTC to 2024-12-06 03:21:54 UTC - Describe async closures (rust-lang/reference#1692) - Update closures for edition 2021 disjoint closure capturing (rust-lang/reference#1521) - Fix paragraphs with trailing `\1` (rust-lang/reference#1696) - Add triagebot autolabel (rust-lang/reference#1694) ## rust-lang/rust-by-example 1 commits in e1d1f2cdcee4d52b9a01ff7c448be4372a377b70..76406337f4131253443aea0ed7e7f451b464117c 2024-12-07 00:24:30 UTC to 2024-12-07 00:24:30 UTC - Fix rust-lang#1900 (rust-lang/rust-by-example#1901) ## rust-lang/rustc-dev-guide 9 commits in b21d99b..7f7ba48f04abc2ad25e52f30b5e2bffa286b019f 2024-12-16 07:12:01 UTC to 2024-12-05 05:01:46 UTC - Specify what a CGU is (rust-lang/rustc-dev-guide#2163) - functionality removed from codebase (part 2) (rust-lang/rustc-dev-guide#2160) - functionality removed from codebase (rust-lang/rustc-dev-guide#2159) - remove polymorphization (rust-lang/rustc-dev-guide#2158) - squashing: recommend --keep-base when squashing without a conflict (rust-lang/rustc-dev-guide#2157) - update section even more (rust-lang/rustc-dev-guide#2156) - extend closure constraints section (rust-lang/rustc-dev-guide#2155) - Remove `//@ compare-output-lines-by-subset` directive (rust-lang/rustc-dev-guide#2151) - Document `needs-target-has-atomic` directive (rust-lang/rustc-dev-guide#2154)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Dec 19, 2024
Update books ## rust-lang/book 21 commits in 9900d976bbfecf4e8124da54351a9ad85ee3c7f3..ad2011d3bcad9f152d034faf7635c22506839d58 2024-12-16 16:11:34 UTC to 2024-12-05 19:19:24 UTC - Ch. 10: clarify note about compiler errors and `'static` (rust-lang/book#4164) - Introduce `let`-`else` statement (rust-lang/book#3702) - Fix misleading explanation of comma in `$(),*` (rust-lang/book#3800) - ch18-03: Matching Named Variables: mention `if let`/`while let` (rust-lang/book#3110) - Ch. 4: Rephrase/clarify paragraph on reference scope (rust-lang/book#3688) - Simplify note about functions in ch13-01-closures.md (rust-lang/book#3699) - fix: make the reason more understandable (rust-lang/book#4074) - Fixed grammatical error in the comment on line 22 (rust-lang/book#3180) - ch17-02: Monomorphization applies to generics in general (rust-lang/book#3367) - Ch. 21: Use `Vec::drain` to teach alternatives to `Option` (rust-lang/book#4159) - fix(typo): correct punctuation in ch15-06-reference-cycles.md (rust-lang/book#4155) - Ch. 20: show both `impl Fn` and `Box<dyn Fn>` (rust-lang/book#4152) - Add `use super::*;` to unit-test examples. (rust-lang/book#4151) - Remove emphasis on four-space indents (rust-lang/book#4150) - Fix `.git-blame-ignore-revs` file (rust-lang/book#4149) - Rust 2024: distinguish `unsafe fn` vs. `unsafe` blocks (rust-lang/book#4148) - Update README.md typo (rust-lang/book#4146) - Ch. 15.5: account for improved error message (rust-lang/book#4142) - Document use of rustfmt and dprint for formatting (rust-lang/book#4138) - tools: fix nostarch build reference to mdbook-trpl (rust-lang/book#4137) - Revise sentence to not refer to two subjects as it (rust-lang/book#4136) ## edition-guide 6 commits in 128669297c8a7fdf771042eaec18b8adfaeaf0cd..bc4ce51e1d4dacb9350a92e95f6159a42de2f8c6 2024-12-03 22:02:43 +0000 to 2024-12-18 05:34:59 +0000 - Add chapter for 2024 match ergonomics reservations (rust-lang/edition-guide#349) - Re-title "Additions to the prelude" (rust-lang/edition-guide#348) - Show tail expression temporary example that fails in 2024 (rust-lang/edition-guide#345) - Add more triagebot labeling support (rust-lang/edition-guide#346) - 2024: Assignment operator RHS indentation (rust-lang/edition-guide#341) - 2024: Add chapter on single-line `where` clauses (rust-lang/edition-guide#340) ## rust-lang/nomicon 1 commits in 0674321898cd454764ab69702819d39a919afd68..97e84a38c94bf9362b11284c20b2cb4adaa1e868 2024-12-10 02:41:27 UTC to 2024-12-10 02:41:27 UTC - races.md: data race -> race condition to violate memory safety (rust-lang/nomicon#470) ## reference 8 commits in ede56d1bbe132bac476b5029cd6d7508ca9572e9..9f41bc11342d46544ae0732caf14ec0bcaf27376 2024-12-03 22:26:55 +0000 to 2024-12-18 23:04:30 +0000 - `coverage` attribute (rust-lang/reference#1628) - Clarify that `extern crate foo as føø` is allowed (rust-lang/reference#1697) - Fix rule auto-linking on Windows (rust-lang/reference#1698) - Reflect rust#133422 & rust#133587 to inline assembly documentation (rust-lang/reference#1695) - Describe async closures (rust-lang/reference#1692) - Update closures for edition 2021 disjoint closure capturing (rust-lang/reference#1521) - Fix paragraphs with trailing `\1` (rust-lang/reference#1696) - Add triagebot autolabel (rust-lang/reference#1694) ## rust-lang/rust-by-example 1 commits in e1d1f2cdcee4d52b9a01ff7c448be4372a377b70..76406337f4131253443aea0ed7e7f451b464117c 2024-12-07 00:24:30 UTC to 2024-12-07 00:24:30 UTC - Fix rust-lang#1900 (rust-lang/rust-by-example#1901) ## rust-lang/rustc-dev-guide 9 commits in b21d99b..7f7ba48f04abc2ad25e52f30b5e2bffa286b019f 2024-12-16 07:12:01 UTC to 2024-12-05 05:01:46 UTC - Specify what a CGU is (rust-lang/rustc-dev-guide#2163) - functionality removed from codebase (part 2) (rust-lang/rustc-dev-guide#2160) - functionality removed from codebase (rust-lang/rustc-dev-guide#2159) - remove polymorphization (rust-lang/rustc-dev-guide#2158) - squashing: recommend --keep-base when squashing without a conflict (rust-lang/rustc-dev-guide#2157) - update section even more (rust-lang/rustc-dev-guide#2156) - extend closure constraints section (rust-lang/rustc-dev-guide#2155) - Remove `//@ compare-output-lines-by-subset` directive (rust-lang/rustc-dev-guide#2151) - Document `needs-target-has-atomic` directive (rust-lang/rustc-dev-guide#2154)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 19, 2024
Rollup merge of rust-lang#134388 - rustbot:docs-update, r=ehuss Update books ## rust-lang/book 21 commits in 9900d976bbfecf4e8124da54351a9ad85ee3c7f3..ad2011d3bcad9f152d034faf7635c22506839d58 2024-12-16 16:11:34 UTC to 2024-12-05 19:19:24 UTC - Ch. 10: clarify note about compiler errors and `'static` (rust-lang/book#4164) - Introduce `let`-`else` statement (rust-lang/book#3702) - Fix misleading explanation of comma in `$(),*` (rust-lang/book#3800) - ch18-03: Matching Named Variables: mention `if let`/`while let` (rust-lang/book#3110) - Ch. 4: Rephrase/clarify paragraph on reference scope (rust-lang/book#3688) - Simplify note about functions in ch13-01-closures.md (rust-lang/book#3699) - fix: make the reason more understandable (rust-lang/book#4074) - Fixed grammatical error in the comment on line 22 (rust-lang/book#3180) - ch17-02: Monomorphization applies to generics in general (rust-lang/book#3367) - Ch. 21: Use `Vec::drain` to teach alternatives to `Option` (rust-lang/book#4159) - fix(typo): correct punctuation in ch15-06-reference-cycles.md (rust-lang/book#4155) - Ch. 20: show both `impl Fn` and `Box<dyn Fn>` (rust-lang/book#4152) - Add `use super::*;` to unit-test examples. (rust-lang/book#4151) - Remove emphasis on four-space indents (rust-lang/book#4150) - Fix `.git-blame-ignore-revs` file (rust-lang/book#4149) - Rust 2024: distinguish `unsafe fn` vs. `unsafe` blocks (rust-lang/book#4148) - Update README.md typo (rust-lang/book#4146) - Ch. 15.5: account for improved error message (rust-lang/book#4142) - Document use of rustfmt and dprint for formatting (rust-lang/book#4138) - tools: fix nostarch build reference to mdbook-trpl (rust-lang/book#4137) - Revise sentence to not refer to two subjects as it (rust-lang/book#4136) ## edition-guide 6 commits in 128669297c8a7fdf771042eaec18b8adfaeaf0cd..bc4ce51e1d4dacb9350a92e95f6159a42de2f8c6 2024-12-03 22:02:43 +0000 to 2024-12-18 05:34:59 +0000 - Add chapter for 2024 match ergonomics reservations (rust-lang/edition-guide#349) - Re-title "Additions to the prelude" (rust-lang/edition-guide#348) - Show tail expression temporary example that fails in 2024 (rust-lang/edition-guide#345) - Add more triagebot labeling support (rust-lang/edition-guide#346) - 2024: Assignment operator RHS indentation (rust-lang/edition-guide#341) - 2024: Add chapter on single-line `where` clauses (rust-lang/edition-guide#340) ## rust-lang/nomicon 1 commits in 0674321898cd454764ab69702819d39a919afd68..97e84a38c94bf9362b11284c20b2cb4adaa1e868 2024-12-10 02:41:27 UTC to 2024-12-10 02:41:27 UTC - races.md: data race -> race condition to violate memory safety (rust-lang/nomicon#470) ## reference 8 commits in ede56d1bbe132bac476b5029cd6d7508ca9572e9..9f41bc11342d46544ae0732caf14ec0bcaf27376 2024-12-03 22:26:55 +0000 to 2024-12-18 23:04:30 +0000 - `coverage` attribute (rust-lang/reference#1628) - Clarify that `extern crate foo as føø` is allowed (rust-lang/reference#1697) - Fix rule auto-linking on Windows (rust-lang/reference#1698) - Reflect rust#133422 & rust#133587 to inline assembly documentation (rust-lang/reference#1695) - Describe async closures (rust-lang/reference#1692) - Update closures for edition 2021 disjoint closure capturing (rust-lang/reference#1521) - Fix paragraphs with trailing `\1` (rust-lang/reference#1696) - Add triagebot autolabel (rust-lang/reference#1694) ## rust-lang/rust-by-example 1 commits in e1d1f2cdcee4d52b9a01ff7c448be4372a377b70..76406337f4131253443aea0ed7e7f451b464117c 2024-12-07 00:24:30 UTC to 2024-12-07 00:24:30 UTC - Fix rust-lang#1900 (rust-lang/rust-by-example#1901) ## rust-lang/rustc-dev-guide 9 commits in b21d99b..7f7ba48f04abc2ad25e52f30b5e2bffa286b019f 2024-12-16 07:12:01 UTC to 2024-12-05 05:01:46 UTC - Specify what a CGU is (rust-lang/rustc-dev-guide#2163) - functionality removed from codebase (part 2) (rust-lang/rustc-dev-guide#2160) - functionality removed from codebase (rust-lang/rustc-dev-guide#2159) - remove polymorphization (rust-lang/rustc-dev-guide#2158) - squashing: recommend --keep-base when squashing without a conflict (rust-lang/rustc-dev-guide#2157) - update section even more (rust-lang/rustc-dev-guide#2156) - extend closure constraints section (rust-lang/rustc-dev-guide#2155) - Remove `//@ compare-output-lines-by-subset` directive (rust-lang/rustc-dev-guide#2151) - Document `needs-target-has-atomic` directive (rust-lang/rustc-dev-guide#2154)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Vec<T>
denotes generic type with unconstrainedT
type parameter. As this chapter kindly describes Rust generics cannot hold 2 or more struct kinds.Vec
is sufficient and proper at this place.