Skip to content

Rollup of 6 pull requests #68907

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

Merged
merged 43 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
044fe0f
Add a resume type parameter to `Generator`
jonas-schievink Jan 25, 2020
0117033
Add a resume type param to the generator substs
jonas-schievink Jan 23, 2020
25af2f6
Use real resume type as second argument
jonas-schievink Jan 25, 2020
8a1227a
Infer type of `yield` to be resume type
jonas-schievink Jan 25, 2020
32005fe
Allow 0 or 1 explicit generator parameters
jonas-schievink Jan 25, 2020
2101a1f
Adjust tests to type inference changes
jonas-schievink Jan 25, 2020
f2c1468
Add resume arg place to `Yield` MIR terminator
jonas-schievink Jan 25, 2020
3c069a0
Change MIR building to fill in the resume place
jonas-schievink Jan 25, 2020
3c22e51
Make generator transform move resume arg around
jonas-schievink Jan 25, 2020
5b2059b
Fix error message on type mismatch in generator
jonas-schievink Jan 23, 2020
fca614e
Add tests for generator resume arguments
jonas-schievink Jan 24, 2020
4ee857c
Add test for E0628 (too many generator parameters)
jonas-schievink Jan 24, 2020
7a9709b
Fix bootstrap rustc build
jonas-schievink Jan 24, 2020
3bb8ecb
Adjust mir-opt tests to new `yield` lowering
jonas-schievink Jan 25, 2020
aae0f54
No resume argument in the drop shim
jonas-schievink Jan 27, 2020
9fa46fe
Teach dropck about resume arguments
jonas-schievink Jan 27, 2020
392e595
Fix miscompilation
jonas-schievink Feb 2, 2020
0c0c31b
implement proper linkchecker hardening
mark-i-m Feb 3, 2020
adc8cd9
update rustc-guide
mark-i-m Feb 3, 2020
5e086c8
some cleanup/fixes
mark-i-m Feb 3, 2020
341eaf5
Add more tests for generator resume arguments
jonas-schievink Feb 4, 2020
cc66d29
Update error message with too many parameters
jonas-schievink Feb 4, 2020
72776e6
Remove obsolete test
jonas-schievink Feb 4, 2020
895aab2
Take resume argument from the right generator type
jonas-schievink Feb 4, 2020
fb66b9e
Don't emit StorageDead for the resume argument
jonas-schievink Feb 4, 2020
84dd07a
Simplify implicit resume argument
jonas-schievink Feb 6, 2020
732913a
Clarify comment about `_2` living across a yield
jonas-schievink Feb 6, 2020
9d7b214
Ignore panic-drops-resume.rs on wasm/emscripten
jonas-schievink Feb 6, 2020
534c3ea
error code examples: replace some more ignore with compile_fail
tspiteri Feb 6, 2020
64450ac
Update E0565 examples
JohnTitor Feb 6, 2020
d646463
Mark fn map_or() as eagerly evaluated.
tom-a-wagner Feb 6, 2020
8f286db
rustc_errors: split macro backtrace rendering from <*macros> hacks.
eddyb Dec 13, 2019
f6fc802
rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.
eddyb Dec 15, 2019
5eaa9a1
rustc_errors: deduplicate the -Zmacro-backtrace suggestion message.
eddyb Jan 15, 2020
ab08097
rustc_errors: hide "in this macro invocation" when redundant, more ex…
eddyb Dec 15, 2019
4c7eb59
rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern …
eddyb Dec 16, 2019
96af578
tests: add a revision to macro_backtrace without -Zmacro-backtrace.
eddyb Feb 6, 2020
26c86a6
Rollup merge of #67359 - eddyb:macro-backtrace-all-the-same, r=petroc…
Dylan-DPC Feb 6, 2020
2d8f638
Rollup merge of #68524 - jonas-schievink:generator-resume-arguments, …
Dylan-DPC Feb 6, 2020
4ce157d
Rollup merge of #68791 - mark-i-m:proper-linkcheck, r=ehuss,JohnTitor
Dylan-DPC Feb 6, 2020
cc3a0e4
Rollup merge of #68886 - tom-a-wagner:master, r=Mark-Simulacrum
Dylan-DPC Feb 6, 2020
0e294cf
Rollup merge of #68888 - tspiteri:ignore-to-compile_fail, r=petrochenkov
Dylan-DPC Feb 6, 2020
7ef5b89
Rollup merge of #68894 - JohnTitor:update-e0565, r=Dylan-DPC
Dylan-DPC Feb 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mark fn map_or() as eagerly evaluated.
In the docs for option.rs and result.rs, it is noted for all *_or()
functions that they are eagerly evaluated, except for the map_or()
function.
This commit adds this missing documentation to the two files.
  • Loading branch information
tom-a-wagner committed Feb 6, 2020
commit d646463a452d77dd7d5e1f8d0830d95bf867863f
6 changes: 6 additions & 0 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@ impl<T> Option<T> {
/// Applies a function to the contained value (if any),
/// or returns the provided default (if not).
///
/// Arguments passed to `map_or` are eagerly evaluated; if you are passing
/// the result of a function call, it is recommended to use [`map_or_else`],
/// which is lazily evaluated.
///
/// [`map_or_else`]: #method.map_or_else
///
/// # Examples
///
/// ```
Expand Down
6 changes: 6 additions & 0 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ impl<T, E> Result<T, E> {
/// Applies a function to the contained value (if any),
/// or returns the provided default (if not).
///
/// Arguments passed to `map_or` are eagerly evaluated; if you are passing
/// the result of a function call, it is recommended to use [`map_or_else`],
/// which is lazily evaluated.
///
/// [`map_or_else`]: #method.map_or_else
///
/// # Examples
///
/// ```
Expand Down