Merged
Conversation
The signature for new was ``` fn new<F>(f: F) -> Lazy<T, F> ``` Notably, with `F` unconstrained, `T` can be literally anything, and just `let _ = Lazy::new(|| 92)` would not typecheck. This historiacally was a necessity -- `new` is a `const` function, it couldn't have any bounds. Today though, we can move `new` under the `F: FnOnce() -> T` bound, which gives the compiler enough data to infer the type of T from closure.
Show the suggestion if and only if the bounds are from the same source context.
This can actually make a difference for the user if they rely on unicode formating. Prompted by dtolnay/syn#771
…extend(array.iter().copied())`
This fixes the spelling of "deallocated" (instead of the original "deallocted") In the `cell.rs` source file
More inference-friendly API for lazy The signature for new was ``` fn new<F>(f: F) -> Lazy<T, F> ``` Notably, with `F` unconstrained, `T` can be literally anything, and just `let _ = Lazy::new(|| 92)` would not typecheck. This historiacally was a necessity -- `new` is a `const` function, it couldn't have any bounds. Today though, we can move `new` under the `F: FnOnce() -> T` bound, which gives the compiler enough data to infer the type of T from closure.
…rors Detect likely `.` -> `..` typo in method calls Fix rust-lang#65015.
…jgillot Suggest rewriting a malformed hex literal if we expect a float Fixes rust-lang#104706
…gillot Provide local extern function arg names Fixes rust-lang#105896
Partially fix `explicit_outlives_requirements` lint in macros Show the suggestion if and only if the bounds are from the same source context. fixes rust-lang#106044 fixes rust-lang#106063
…rors Fix a formatting error in Iterator::for_each docs There is a formatting error (extra space in an assignment) in the documentation of `core::iter::Iterator::for_each`, which I have fixed in this pull request.
Fix doc comment parsing description in book This can actually make a difference for the user if they rely on unicode formating. Prompted by dtolnay/syn#771
…r-errors Update the documentation of `Vec` to use `extend(array)` instead of `extend(array.iter().copied())` Another option is to use `extend_from_slice()` (that may be faster), but I find this approach cleaner.
Fix UnsafeCell Documentation Spelling Error This fixes the spelling of "deallocated" (instead of the original "deallocted") In the `cell.rs` source file. Honestly probably not worth the time to evaluate, but since it doesn't involve any code change, I figure why not?
Contributor
Author
|
@bors r+ rollup=never p=9 |
Collaborator
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Collaborator
|
📌 Perf builds for each rolled up PR: previous master: 92c1937a90 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
This was referenced Dec 28, 2022
Collaborator
|
Finished benchmarking commit (739d68a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
This file contains hidden or 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
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.
Successful merges:
.->..typo in method calls #105765 (Detect likely.->..typo in method calls)explicit_outlives_requirementslint in macros #106064 (Partially fixexplicit_outlives_requirementslint in macros)Vecto useextend(array)instead ofextend(array.iter().copied())#106187 (Update the documentation ofVecto useextend(array)instead ofextend(array.iter().copied()))Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup