about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-30Rollup merge of #114074 - matthiaskrgr:fmt_args_rustc_2, r=WaffleLapkinMatthias Krüger-481/+411
inline format!() args from rustc_middle up to and including rustc_codegen_llvm (3) r? `@WaffleLapkin`
2023-07-30Rollup merge of #102198 - lukas-code:nonnull_as_ref, r=AmanieuMatthias Krüger-2/+33
`const`-stablilize `NonNull::as_ref` A bunch of pointer to reference methods have been made unstably const some time ago in #91823 under the feature gate `const_ptr_as_ref`. Out of these, `NonNull::as_ref` can be implemented as a `const fn` in stable rust today, so i hereby propose to const stabilize this function only. Tracking issue: #91822 ``@rustbot`` label +T-libs-api -T-libs
2023-07-30Rollup merge of #98154 - vidhanio:master, r=workingjubileeMatthias Krüger-26/+87
merge functionality of `io::Sink` into `io::Empty` Many times, there is a need for a simple dummy `io::Read`er + `io::Write`r, but currently the only options are `io::Empty` and `io::Sink` respectively. Having both of their functionality together requires writing your own boilerplate for something that makes sense to have in the standard library. This PR adds the functionality of `io::Sink` to `io::Empty`, making `io::Empty` be able to perform the tasks of both of the previous structs. (This idea was first mentioned in #24235) Note: I also updated some doc comments in `io::utils` in this pull request to fix inconsistencies between `io::Sink` and `io::Empty`. API Change Proposal: https://github.com/rust-lang/libs-team/issues/49
2023-07-30Auto merge of #114250 - matthiaskrgr:rollup-0r0dhrr, r=matthiaskrgrbors-466/+439
Rollup of 6 pull requests Successful merges: - #110056 (Fix the example in document for WaitTimeoutResult::timed_out) - #112655 (Mark `map_or` as `#[must_use]`) - #114018 (Make `--error-format human-annotate-rs` handle multiple files) - #114068 (inline format!() args up to and including rustc_middle (2)) - #114223 (Documentation: Fix Stilted Language in Vec->Indexing) - #114227 (Add tidy check for stray rustfix files) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-30Rollup merge of #114227 - asquared31415:tidy_check_fixed, r=albertlarsan68Matthias Krüger-1/+1
Add tidy check for stray rustfix files `x.fixed` files that don't correspond to a test file now emit a tidy error.
2023-07-30Rollup merge of #114223 - ryanoneill:vec-indexing-doc-language, r=workingjubileeMatthias Krüger-1/+1
Documentation: Fix Stilted Language in Vec->Indexing Problem Language in the Vec->Indexing documentation sounds stilted due to incorrect word ordering: "... type allows to access values by index." Solution Reorder words in the Vec->Indexing documentation to flow better: "... type allows access to values by index." The phrase "allows access to" also matches other existing documentation.
2023-07-30Rollup merge of #114068 - matthiaskrgr:fmt_args_rustc_1, r=WaffleLapkinMatthias Krüger-437/+378
inline format!() args up to and including rustc_middle (2) r? `@WaffleLapkin`
2023-07-30Rollup merge of #114018 - Enselic:multi-annotation, r=b-naberMatthias Krüger-7/+38
Make `--error-format human-annotate-rs` handle multiple files Closes #64205 which is E-help-wanted
2023-07-30Rollup merge of #112655 - WaffleLapkin:must_use_map_or, r=workingjubileeMatthias Krüger-10/+13
Mark `map_or` as `#[must_use]` I don't know what else to say. r? libs
2023-07-30Rollup merge of #110056 - chenyukang:yukang/fix-110045, r=workingjubileeMatthias Krüger-10/+8
Fix the example in document for WaitTimeoutResult::timed_out Fixes #110045
2023-07-30inline format!() args up to and including rustc_codegen_llvmMatthias Krüger-481/+411
2023-07-30Auto merge of #114066 - matthiaskrgr:fmt_args_inline_bootstrap, r=WaffleLapkinbors-174/+162
bootstrap: inline format!() args (0) r? `@WaffleLapkin`
2023-07-30inline format!() args up to and including rustc_middleMatthias Krüger-437/+378
2023-07-30Mark `map_or` as `#[must_use]`Maybe Waffle-15/+18
2023-07-30bootstrap: inline format!() argsMatthias Krüger-174/+162
2023-07-30Fix the example in document for WaitTimeoutResult::timed_outyukang-10/+8
2023-07-30Auto merge of #114236 - fee1-dead-contrib:rollup-m92j7q1, r=fee1-deadbors-13/+52
Rollup of 3 pull requests Successful merges: - #112151 (Clarify behavior of inclusive bounds in BTreeMap::{lower,upper}_bound) - #113512 (Updated lines doc to include trailing carriage return note) - #114203 (Effects: don't print `host` param in diagnostics) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-30Rollup merge of #114203 - fee1-dead-contrib:effects/pp-no-host, r=oli-obkfee1-dead-10/+36
Effects: don't print `host` param in diagnostics r? ``@oli-obk``
2023-07-30Rollup merge of #113512 - vallentin:lines-doc, r=workingjubileefee1-dead-3/+8
Updated lines doc to include trailing carriage return note Updated `str::lines` doc to include explicit info about (trailing) carriage returns. Reference: #100311
2023-07-30Rollup merge of #112151 - chloekek:patch-1, r=workingjubileefee1-dead-0/+8
Clarify behavior of inclusive bounds in BTreeMap::{lower,upper}_bound It wasn’t quite clear to me how these methods would interpret inclusive bounds so I added examples for those.
2023-07-30Auto merge of #112280 - zica87:master, r=workingjubileebors-13/+0
Remove redundant example of `BTreeSet::iter` The usage and that `Values returned by the iterator are returned in ascending order` are already demonstrated by the other example and the description, so I removed the useless one.
2023-07-30Auto merge of #114226 - matthiaskrgr:rollup-wxdudsm, r=matthiaskrgrbors-141/+145
Rollup of 3 pull requests Successful merges: - #114129 (Rustdoc small cleanups) - #114152 ([rustc][data_structures] Simplify binary_search_slice.) - #114222 (Mark `lazy_type_alias` as incomplete) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-29add tidy check for stray rustfix filesasquared31415-1/+1
2023-07-30Rollup merge of #114222 - compiler-errors:lazy-type-alias-is-incomplete, ↵Matthias Krüger-1/+15
r=oli-obk Mark `lazy_type_alias` as incomplete This feature is very not complete: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AF-lazy_type_alias r? types
2023-07-30Rollup merge of #114152 - ttsugriy:master, r=WaffleLapkinMatthias Krüger-31/+7
[rustc][data_structures] Simplify binary_search_slice. Instead of using `binary_search_by_key`, it's possible to use `partition_point` to find the lower bound. This avoids the need to locate the leftmost matching entry separately. It's also possible to use `partition_point` to find the upper bound, so I plan to send a separate PR for your consideration.
2023-07-30Rollup merge of #114129 - GuillaumeGomez:rustdoc-cleanup, r=notriddleMatthias Krüger-109/+123
Rustdoc small cleanups Each commit does some little cleanups: * We had some `Res` comparisons in multiple places (and still do, but unless we use a macro, it's not possible to "merge" any further) so I moved it into a function. * It was weird to have some utils function used everywhere in `visit_ast` so I instead moved it into `clean/utils.rs`. * In HTML rendering, we had some write "issues": * Multiple calls that could be merged into one. * Some `write!` that could be `write_str`. * We didn't use the new `format!` args much. r? `@notriddle`
2023-07-29Auto merge of #113704 - compiler-errors:rpitit-assumed-wf-inherit, r=spastorinobors-117/+151
Make RPITITs inherit the `assumed_wf_types` of their parent method ... and then move the RPITIT well-formedness check to just use the regular logic of wfchecking an associated type. --- We need to inherit the `assumed_wf_types` of the RPITIT's parent function in order for the given code to be considered well-formed: ```rust trait Foo { fn bar<'a, T>(_: &'a T) -> impl Iterator<Output = &'a T>; } ``` Since for `&'a T` to be WF, we need `T: 'a`. In order for this to work for late-bound lifetimes, we need to do some additional mapping of any late-bound lifetimes captured by these assumed wf types. This is because within the body of the function (and thus in the `assumed_wf_types`), they're represented as `ReFree` variants of the original late-bound lifetimes declared in the function's generics, but in the RPITIT's GAT, they're represented as "reified" `ReEarlyBound` vars (duplicated during opaque type lowering). Luckily, the mapping between these two is already [stored in the opaque](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.OpaqueTy.html#structfield.lifetime_mapping). Fixes #113796
2023-07-29some nits, bless testMichael Goulet-21/+29
2023-07-29Implement assumed_wf_types for RPITITs' implementationsMichael Goulet-33/+102
2023-07-29Take RPITITs inherit the assumed_wf_types of their parent fnMichael Goulet-100/+57
2023-07-29Auto merge of #114211 - RalfJung:miri, r=RalfJungbors-233/+336
update Miri r? `@ghost`
2023-07-29Documentation: Fix Stilted Language in Vec->IndexingRyan O'Neill-1/+1
Problem Language in the Vec->Indexing documentation sounds stilted due to incorrect word ordering: "... type allows to access values by index." Solution Reorder words in the Vec->Indexing documentation to flow better: "... type allows access to values by index." The phrase "allows access to" also matches other existing documentation.
2023-07-29Mark lazy_type_alias as incompleteMichael Goulet-1/+15
2023-07-29Auto merge of #114156 - calebzulawski:simd-bswap, r=compiler-errorsbors-25/+173
Add simd_bswap, simd_bitreverse, simd_ctlz, and simd_cttz intrinsics cc `@workingjubilee`
2023-07-29Auto merge of #2993 - Vanille-N:tb-protector, r=RalfJungbors-151/+264
TB: Redefine trigger condition for protectors The Coq formalization revealed that as currently implemented, read accesses did not always commute. Indeed starting from a lazily initialized `Active` protected tag, applying a foreign read then a child read produces `Frozen`, but child read then foreign read triggers UB (because the child read initializes _before_ the `Active -> Frozen`). This reformulation of when protectors trigger fixes that issue: - instead of `Active + foreign read -> Frozen` and `Active -> Frozen` when protected is UB - we do `Active + foreign read -> if protected { Disabled } else { Frozen }` There is already precedent for transitions being dependent on the presence of a protector (`Reserved + foreign read -> if protected { Frozen } else { Reserved }`), and this has the nice side-effect of simplifying the protector trigger condition to just an equality check against `Disabled` since now there is protector UB iff a protected tag becomes `Disabled`. In order not to introduce an extra `if`, it was decided that `Disabled -> Disabled` would be UB when protected, which was not the case previously. This is merely a theoretical for now because a protected `Disabled` is unreachable in the first place. The extra test is not directly related to this modification, but also checks things related to protectors and lazy initialization.
2023-07-29Auto merge of #114028 - Centri3:ternary-operator, r=compiler-errorsbors-2/+241
Gracefully handle ternary operator Fixes #112578 ~~May not be the best way to do this as it doesn't check for a single `:`, so it could perhaps appear even when the actual issue is just a missing semicolon. May not be the biggest deal, though?~~ Nevermind, got it working properly now ^^
2023-07-29doc comment suggestionsNeven Villani-25/+57
2023-07-29Auto merge of #114148 - cuviper:drop-llvm-14, r=nikicbors-472/+293
Update the minimum external LLVM to 15 With this change, we'll have stable support for LLVM 15 through 17 (pending release). For reference, the previous increase to LLVM 14 was #107573.
2023-07-29Effects: don't print `host` param in diagnosticsDeadbeef-10/+36
2023-07-29[rustc][data_structures] Simplify binary_search_slice.Taras Tsugrii-31/+7
2023-07-29Auto merge of #114150 - clubby789:improve-option-ref-suggestion, r=WaffleLapkinbors-74/+153
Refactor + improve diagnostics for `&mut T`/`T` mismatch inside Option/Result Follow up to #114052. This also makes the diagnostics structured + translatable. r? `@WaffleLapkin`
2023-07-29Group `write` calls when possible and use new format argsGuillaume Gomez-76/+84
2023-07-29Move `inherits_doc_hidden` and `should_ignore_res` into `clean/utils.rs`Guillaume Gomez-37/+38
2023-07-29Move Res check into `should_ignore_res`Guillaume Gomez-3/+8
2023-07-29Auto merge of #114141 - Kobzol:llvm-bolt-flags, r=lqdbors-0/+2
Change LLVM BOLT flags I talked to the BOLT maintainers about the binary size effect of BOLT. Currently, BOLTing LLVM increases its binary size from ~120 MiB to ~170 MiB, which is not ideal. Now we can track both runtime performance and (rustc, LLVM, ...) artifact sizes in perf.RLO, so I'd like to try experimenting with changing the flags to reduce `libLLVM.so` size without regressing the performance gains of BOLT too much. r? `@ghost`
2023-07-29Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstriebbors-45/+42
Rename and allow `cast_ref_to_mut` lint This PR is a small subset of https://github.com/rust-lang/rust/pull/112431, that is the renaming of the lint (`cast_ref_to_mut` -> `invalid_reference_casting`). BUT also temporarily change the default level of the lint from deny-by-default to allow-by-default until https://github.com/rust-lang/rust/pull/112431 is merged. r? `@Nilstrieb`
2023-07-29Auto merge of #113099 - bvanjoi:fix-112713-2, r=petrochenkovbors-58/+1535
fix(resolve): update the ambiguity glob binding as warning recursively Fixes #47525 Fixes #56593, but `issue-56593-2.rs` is not fixed to ensure backward compatibility. Fixes #98467 Fixes #105235 Fixes #112713 This PR had added a field called `warn_ambiguous` in `NameBinding` which is only for back compatibly reason and used for lint. More details: https://github.com/rust-lang/rust/pull/112743 r? `@petrochenkov`
2023-07-29Auto merge of #114197 - matthiaskrgr:rollup-iluf7u4, r=matthiaskrgrbors-78/+69
Rollup of 7 pull requests Successful merges: - #113773 (Don't attempt to compute layout of type referencing error) - #114107 (Prevent people from assigning me as a PR reviewer) - #114124 (tests/ui/proc-macro/*: Migrate FIXMEs to check-pass) - #114171 (Fix switch-stdout test for none unix/windows platforms) - #114172 (Fix issue_15149 test for the SGX target) - #114173 (btree/map.rs: remove "Basic usage" text) - #114174 (doc: replace wrong punctuation mark) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-29Rollup merge of #114174 - tshepang:patch-6, r=workingjubileeMatthias Krüger-1/+1
doc: replace wrong punctuation mark
2023-07-29Rollup merge of #114173 - tshepang:patch-1, r=workingjubileeMatthias Krüger-54/+0
btree/map.rs: remove "Basic usage" text Not useful, for there is just a single example