-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 6 pull requests #102787
Rollup of 6 pull requests #102787
Conversation
…ld, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere Also use that macro to replace a bunch of places that had custom closure-wrappers.
…Mark-Simulacrum Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere Also use that macro to replace a bunch of places that had custom closure-wrappers. +35 -114 sounds good to me.
unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update Having a safe `fn` in an `unsafe trait` vs an `unsafe fn` in a safe `trait` are pretty different situations, but the distinction is subtle and can confuse even seasoned Rust developers. So let's have explicit examples of both. I also removed the existing `unsafe trait` example since it was rather strange. Also the `unsafe_op_in_unsafe_fn` lint can help disentangle the two sides of `unsafe`, so update the docs to account for that.
…k-Simulacrum Avoid repeated re-initialization of the BufReader buffer Fixes rust-lang#102727 We accidentally removed this in rust-lang#98748. It looks so redundant. But it isn't. The default `Read::read_buf` will defensively initialize the whole buffer, if any of it is indicated to be uninitialized. In uses where reads from the wrapped `Read` impl completely fill the `BufReader`, `initialized` and `filled` are the same, and this extra member isn't required. But in the reported issue, the `BufReader` wraps a `Read` impl which will _never_ fill the whole buffer. So the default `Read::read_buf` implementation repeatedly re-initializes the extra space in the buffer. This adds back the extra `initialized` member, which ensures that the default `Read::read_buf` only zero-initialized the buffer once, and I've tried to add a comment which explains this whole situation.
…ckh726 Check `WhereClauseReferencesSelf` after all other object safety checks This fixes the ICE because it causes us to detect another *non-lint* `MethodViolationCode` first, instead of breaking on `WhereClauseReferencesSelf`. We could also approach this issue by instead returning a vector of *all* of the `MethodViolationCode`s, and just reporting the first one we see, but treating it as a hard error if we return both `WhereClauseReferencesSelf` and some other violation code -- let me know if this is desired. Fixes rust-lang#102762
…fee1-dead Fix `type_of` ICE Fixes rust-lang#102768
…lacrum run Miri CI when std::sys changes r? `@Mark-Simulacrum`
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 43c22af267 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (2d3a85b): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
Most of the regressions are in secondary benchmarks, so I don't think it's worth investigating what caused this. @rustbot labels: perf-regression-triaged |
Successful merges:
ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0
everywhere #102300 (Use a macro to not have to copy-pasteConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0
everywhere)WhereClauseReferencesSelf
after all other object safety checks #102764 (CheckWhereClauseReferencesSelf
after all other object safety checks)type_of
ICE #102779 (Fixtype_of
ICE)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup