about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-01-14Rollup merge of #106855 - klensy:rd-s, r=notriddleMatthias Krüger-28/+33
rustdoc: few small cleanups
2023-01-14Rollup merge of #106849 - WaffleLapkin:unvec, r=NilstriebMatthias Krüger-3/+2
Allocate one less vec while parsing arrays Probably does not matter, but imo a little bit nicer.
2023-01-14Rollup merge of #106828 - notriddle:notriddle/notable-trait-docblock, ↵Matthias Krüger-9/+13
r=GuillaumeGomez rustdoc: remove `docblock` class from notable trait popover This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl. Fixes #92974
2023-01-14Rollup merge of #106820 - m-ou-se:macro-type-error-thing, r=estebankMatthias Krüger-16/+23
Deprioritize fulfillment errors that come from expansions. Fixes (part of?) #69455
2023-01-14Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-SimulacrumMatthias Krüger-29/+44
Stop probing for statx unless necessary As is the current toy program: fn main() -> std::io::Result<()> { use std::fs; let metadata = fs::metadata("foo.txt")?; assert!(!metadata.is_dir()); Ok(()) } ... observed under strace will issue: [snip] statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address) statx(AT_FDCWD, "foo.txt", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0 While statx is not necessarily always present, checking for it can be delayed to the first error condition. Said condition may very well never happen, in which case the check got avoided altogether. Note this is still suboptimal as there still will be programs issuing it, but bulk of the problem is removed. Tested by forbidding the syscall for the binary and observing it correctly falls back to newfstatat. While here tidy up the commentary, in particular by denoting some problems with the current approach.
2023-01-14Rollup merge of #106563 - clubby789:gce-macro-braces, r=TaKO8KiMatthias Krüger-1/+16
Fix `unused_braces` on generic const expr macro call Fixes #106545 `@rustbot` label +A-const-generics +A-lint
2023-01-14Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcmMatthias Krüger-4/+19
libcore: make result of iter::from_generator Clone `@rustbot` label +A-generators
2023-01-14Fix `unused_braces` on generic const expr macro callclubby789-1/+16
2023-01-14Auto merge of #106851 - matthiaskrgr:rollup-d9dz3yp, r=matthiaskrgrbors-307/+1082
Rollup of 10 pull requests Successful merges: - #106046 (Fix mir-opt tests for big-endian platforms) - #106470 (tidy: Don't include wasm32 in compiler dependency check) - #106566 (Emit a single error for contiguous sequences of unknown tokens) - #106644 (Update the wasi-libc used for the wasm32-wasi target) - #106665 (Add note when `FnPtr` vs. `FnDef` impl trait) - #106752 (Emit a hint for bad call return types due to generic arguments) - #106788 (Tweak E0599 and elaborate_predicates) - #106831 (Use GitHub yaml templates for ICE, Docs and Diagnostics tickets) - #106846 (Improve some comments and names in parser) - #106848 (Fix wrong path in triage bot autolabel for wg-trait-solver-refactor) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-14Deprioritize fulfillment errors that come from expansions.Mara Bos-16/+23
2023-01-14Rollup merge of #106848 - BoxyUwU:correct_triagebot_path, r=WaffleLapkinMatthias Krüger-1/+1
Fix wrong path in triage bot autolabel for wg-trait-solver-refactor
2023-01-14Rollup merge of #106846 - WaffleLapkin:pico_parse_ref, r=TaKO8KiMatthias Krüger-15/+25
Improve some comments and names in parser Just a tiny drive-by cleanup.
2023-01-14Rollup merge of #106831 - estebank:tickets_yaml, r=Mark-SimulacrumMatthias Krüger-129/+185
Use GitHub yaml templates for ICE, Docs and Diagnostics tickets The GitHub yaml templates allow us to define HTML forms with validation for issue templates, instead of the current markdown based templates which only let us introduce text into the user editable text area. The form lets us make some fields mandatory, as well as add text that won't pollute the user's text and titles that won't be interfered with by enterprising users.
2023-01-14Rollup merge of #106788 - estebank:elaborate_pred_E0599, r=compiler-errorsMatthias Krüger-24/+296
Tweak E0599 and elaborate_predicates CC https://github.com/rust-lang/rust/issues/86377.
2023-01-14Rollup merge of #106752 - sulami:master, r=estebankMatthias Krüger-0/+338
Emit a hint for bad call return types due to generic arguments When the return type of a function call depends on the type of an argument, e.g. ``` fn foo<T>(x: T) -> T { x } ``` and the expected type is set due to either an explicitly typed binding, or because the call to the function is in a tail position without semicolon, the current error implies that the argument in the call has the wrong type. This new hint highlights that the expected type doesn't match the returned type, which matches the argument type, and that that's why we're flagging the argument type. Fixes #43608.
2023-01-14Rollup merge of #106665 - JulianKnodt:better_fn_trait_note, r=cjgillotMatthias Krüger-17/+111
Add note when `FnPtr` vs. `FnDef` impl trait I encountered an instance where an `FnPtr` implemented a trait, but I was passing an `FnDef`. I was confused for an hour and to examine the source code of the trait's crate's tests in order to understand how to cast it properly (it didn't help that it was behind a reference). To the end user, it might not be immediately obvious that they are different and how to convert from an `FnDef` to an `FnPtr`, but it is necessary to cast to the generic function in order to compile. It is thus useful to suggest `as` in the help note, (even if the `Fn` output implements the trait).
2023-01-14Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviperMatthias Krüger-1/+1
Update the wasi-libc used for the wasm32-wasi target This commit updates the wasi-libc revision used to build with the wasm32-wasi target. This notably pulls in WebAssembly/wasi-libc#377 which is needed to fix a use case I've been working on recently. This should be a relatively small update hopefully and is not expected to have any user impact.
2023-01-14Rollup merge of #106566 - clubby789:contiguous-weird-unicode, r=cjgillotMatthias Krüger-9/+49
Emit a single error for contiguous sequences of unknown tokens Closes #106101 On encountering a sequence of identical source characters which are unknown tokens, note the amount of subsequent characters and advance past them silently. The old behavior was to emit an error and 'help' note for every single one. `@rustbot` label +A-diagnostics +A-parser
2023-01-14Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-SimulacrumMatthias Krüger-103/+67
tidy: Don't include wasm32 in compiler dependency check This changes the tidy compiler dependency check so that it does not include wasm32-unknown-unknown dependencies in the PERMITTED_RUSTC_DEPENDENCIES. This just helps keep the list cleaner under the assumption that the compiler will never work on wasm32-unknown-unknown. This also fixes a bug in the check to verify there are no unused dependencies in the PERMITTED_RUSTC_DEPENDENCIES. Previously the check was verifying that the dependency was used *anywhere* in the workspace, when it should have been checking if it was used for the compiler. There's also just a little general cleanup here. For example, the old `normal_deps_of_r` function was changed a while ago to return *all* dependencies, but the function name and description wasn't updated to remove `normal_`.
2023-01-14Rollup merge of #106046 - uweigand:s390x-test-bigendian-mir, r=Mark-SimulacrumMatthias Krüger-8/+9
Fix mir-opt tests for big-endian platforms The test cases src/test/mir-opt/building/custom/consts.rs and src/test/mir-opt/const_prop/mutable_variable_no_prop.rs are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the MIR test files. Fix this by choosing constant values that have the same encoding on big- and little-endian platforms. The test case src/test/mir-opt/issues/issue_75439.rs is failing as well, but since the purpose of the test is to validate handling of big-endian integer encodings on a little-endian platform, it does not make much sense to run it on big-endian platforms in the first place - we can just ignore it there. Fixed part of https://github.com/rust-lang/rust/issues/105383.
2023-01-14aBoxy-1/+1
2023-01-14Allocate one less vec in `parser/expr.rs`Maybe Waffle-3/+2
2023-01-14Improve comments in `parser/expr.rs`Maybe Waffle-9/+13
2023-01-14Make `LhsExpr::AlreadyParsed` a named structMaybe Waffle-6/+12
2023-01-14Add note when `FnPtr` vs. `FnDef` impl traitkadmin-17/+111
I encountered an instance where an `FnPtr` implemented a trait, but I was passing an `FnDef`. To the end user, there is really no way to differentiate each of them, but it is necessary to cast to the generic function in order to compile. It is thus useful to suggest `as` in the help note, (even if the Fn output implements the trait).
2023-01-14Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrumbors-25/+63
Fix aarch64-unknown-linux-gnu_ilp32 target This was broken because the synthetic object files produced by rustc were for 64-bit AArch64, which caused link failures when combined with 32-bit ILP32 object files. This PR updates the object crate to 0.30.1 which adds support for generating ILP32 AArch64 object files.
2023-01-14Auto merge of #106833 - JohnTitor:rollup-z8398jk, r=JohnTitorbors-235/+487
Rollup of 13 pull requests Successful merges: - #104965 (reword Option::as_ref and Option::map examples) - #105172 (Added error documentation for write_fmt) - #106605 (rustdoc: fix outdated lint section of the book) - #106670 (Check compiler docs in PR CI) - #106692 (mv binary_heap.rs binary_heap/mod.rs) - #106693 (rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle) - #106707 (Remove duplicate sha-1 dependency) - #106762 (Add `AtomicPtr::as_mut_ptr`) - #106766 (Remove dead code in rustdoc stripper) - #106775 (Remove stale reference to the test suite location) - #106799 (Stop having unused lifetimes on some `impl`s) - #106816 (Update `rental` hack to work with remapped paths.) - #106819 (rustdoc: remove unnecessary DOM class `h1.fqn`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-14Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrumbors-49/+146
Update mdbook This updates mdbook from 0.4.21 to 0.4.25. The list of changes is [here](https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0425). The only user-visible changes are some changes around the theme picker, and change to the copy-to-clipboard ignoring hidden lines. Internally there were some dependency updates and small fixes. This also updates `clap` from 4.0.15 to 4.0.32 whose changelog is [here](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#4032---2022-12-22). This impacts tools like cargo. I don't see anything particularly noteworthy there, though there are some small user-visible changes. Unfortunately this required adding a hack for building `rustix` with a bootstrap tool. The comment explains why. I am unable to think of some other workaround (or even a cleaner way to set the rustflag). Ideas are welcome if you can think of alternatives. I'm struggling to even think of a long-term solution, other than asking projects not to do auto-nightly feature detection. One medium-term solution is to avoid the clap dependency for the mdbook library (which is how rustix gets pulled in). That is one of my goals for the 0.5 release of mdbook, but that probably won't happen until later this year. It would also require dropping clap from `rustbook` and using some other means to parse arguments (there's only two options, so it can probably be done manually).
2023-01-14Rollup merge of #106819 - notriddle:notriddle/rm-h1-fqn, r=GuillaumeGomezYuki Okushi-33/+33
rustdoc: remove unnecessary DOM class `h1.fqn` It's misleading. The main heading sometimes isn't an fully qualified name at all. It's also redundant. It's always a child of `div.main-heading`, so just use that.
2023-01-14Rollup merge of #106816 - TimNN:rental-remap, r=oli-objYuki Okushi-4/+235
Update `rental` hack to work with remapped paths. This PR simply switches to an already-existing helper instead of hard-coding a specific enum variant. The new revision of the test fails without the other changes in this PR. Context: I'm exploring running UI tests with remapped paths by default in #105924 and the rental test was one of the ones that failed. This may also be useful in the context of https://github.com/rust-lang/rfcs/pull/3127 ("New rustc and Cargo options to allow path sanitisation by default").
2023-01-14Rollup merge of #106799 - scottmcm:remove-unused-generics, r=cuviperYuki Okushi-29/+29
Stop having unused lifetimes on some `impl`s See <https://doc.rust-lang.org/nightly/std/cmp/trait.PartialOrd.html#impl-PartialOrd%3COsStr%3E-for-PathBuf>, where these lifetimes show up even though they're not needed: ![image](https://user-images.githubusercontent.com/18526288/212257802-da275167-38f9-4e2c-aafc-d44f0fc6a7c6.png) With this PR, the unneeded lifetimes are no longer there: ![image](https://user-images.githubusercontent.com/18526288/212257938-0097c4bf-1247-4c91-8445-5bf0dde1b501.png)
2023-01-14Rollup merge of #106775 - albertlarsan68:patch-1, r=Mark-SimulacrumYuki Okushi-3/+2
Remove stale reference to the test suite location
2023-01-14Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddleYuki Okushi-11/+1
Remove dead code in rustdoc stripper No changes when this code is removed. cc `@aDotInTheVoid` r? `@notriddle`
2023-01-14Rollup merge of #106762 - WaffleLapkin:atomicptr+as_mut_ptr, r=m-ou-seYuki Okushi-2/+38
Add `AtomicPtr::as_mut_ptr` See https://github.com/rust-lang/rust/issues/66893#issuecomment-720125447 r? thomcc
2023-01-14Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-SimulacrumYuki Okushi-29/+18
Remove duplicate sha-1 dependency [`sha-1`](https://crates.io/crates/sha-1) is more or less a duplicate of [`sha1`](https://crates.io/crates/sha1). The `sha-1` is deprecated and no longer updated. This updates the dependencies to use the new name. Some other dependencies that got updated as a consequence: * The updated pest dependencies are currently only used by mdbook, and shouldn't have any issues. * ucd-trie 0.1.3 to 0.1.5: No changelog, but looks like some tables were updated for new unicode versions: https://github.com/BurntSushi/ucd-generate/commits/master/ucd-trie. This is only used by pest (and thus mdbook). * thiserror 1.33 to 1.38: Nothing significant in the notes at https://github.com/dtolnay/thiserror/releases.
2023-01-14Rollup merge of #106693 - notriddle:notriddle/toggle-trunc, r=GuillaumeGomezYuki Okushi-117/+117
rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle This swaps things around so that the class that gets used more often has the shorter name.
2023-01-14Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, ↵Yuki Okushi-0/+0
r=Mark-Simulacrum mv binary_heap.rs binary_heap/mod.rs I confess this request is somewhat selfish, as it's made in order to ease synchronisation with my [copse](https://crates.io/crates/copse) crate (see eggyal/copse#6 for explanation). I wholly understand that such grounds may be insufficient to justify merging this request—but no harm in asking, right?
2023-01-14Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-SimulacrumYuki Okushi-0/+1
Check compiler docs in PR CI Fixes #106624
2023-01-14Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, ↵Yuki Okushi-1/+1
r=GuillaumeGomez rustdoc: fix outdated lint section of the book
2023-01-14Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcmYuki Okushi-0/+5
Added error documentation for write_fmt This continuation of work at rust-lang#98861
2023-01-14Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcmYuki Okushi-6/+7
reword Option::as_ref and Option::map examples The description for the examples of `Option::as_ref` and `Option::map` imply that the example is only doing type conversion, when it is actually finding the length of a string. Changes the wording to imply that some operation is being run on the value contained in the `Option` closes #104476
2023-01-14Use GitHub yaml templates for ICE, Docs and Diagnostics ticketsEsteban Küber-129/+185
2023-01-14Auto merge of #106825 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 8 commits in d992ab4e9034930e7809749f04077045af8f4d79..1cd6d3803dfb0b342272862a8590f5dfc9f72573 2023-01-10 14:36:41 +0100 to 2023-01-12 18:40:36 +0000 - Fix for rust-lang/cargo#11555 (rust-lang/cargo#11568) - chore: Fix typos (rust-lang/cargo#11561) - fix(docs): fix typo learm =&gt; learn in cargo tree docs (rust-lang/cargo#11560) - Add fix for CVE-2022-46176 (rust-lang/cargo#11556) - Fix panic on target dependency errors. (rust-lang/cargo#11541) - Fix some doc links (rust-lang/cargo#11538) - Cargo by default saves credentials to `.cargo/credentials.toml` (rust-lang/cargo#11533) - Fix a typo in the registries documentation. (rust-lang/cargo#11535)
2023-01-13rustdoc: remove `docblock` class from notable trait popoverMichael Howell-9/+13
This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl. Fixes #92974
2023-01-13Auto merge of #106822 - matthiaskrgr:rollup-46bi4pi, r=matthiaskrgrbors-165/+1011
Rollup of 10 pull requests Successful merges: - #104645 (Add log-backtrace option to show backtraces along with logging) - #106465 (Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow) - #106489 (Fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang)) - #106585 (When suggesting writing a fully qualified path probe for appropriate types) - #106641 (Provide help on closures capturing self causing borrow checker errors) - #106678 (Warn when using panic-strategy abort for proc-macro crates) - #106701 (Fix `mpsc::SyncSender` spinning behavior) - #106793 (Normalize test output more thoroughly) - #106797 (riscv: Fix ELF header flags) - #106813 (Remove redundant session field) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-13Update the wasi-libc used for the wasm32-wasi targetAlex Crichton-1/+1
This commit updates the wasi-libc revision used to build with the wasm32-wasi target. This notably pulls in WebAssembly/wasi-libc#377 which is needed to fix a use case I've been working on recently. This should be a relatively small update hopefully and is not expected to have any user impact.
2023-01-13Do not incorrectly suggest restricting implied boundsEsteban Küber-16/+38
When we have already suggested bounds that imply the about to be suggested bound, skip them.
2023-01-13Update `rental` hack to work with remapped paths.Tim Neumann-4/+235
2023-01-13Update cargoWeihang Lo-0/+0
8 commits in d992ab4e9034930e7809749f04077045af8f4d79..1cd6d3803dfb0b342272862a8590f5dfc9f72573 2023-01-10 14:36:41 +0100 to 2023-01-12 18:40:36 +0000 - Fix for rust-lang/cargo#11555 (rust-lang/cargo#11568) - chore: Fix typos (rust-lang/cargo#11561) - fix(docs): fix typo learm =&gt; learn in cargo tree docs (rust-lang/cargo#11560) - Add fix for CVE-2022-46176 (rust-lang/cargo#11556) - Fix panic on target dependency errors. (rust-lang/cargo#11541) - Fix some doc links (rust-lang/cargo#11538) - Cargo by default saves credentials to `.cargo/credentials.toml` (rust-lang/cargo#11533) - Fix a typo in the registries documentation. (rust-lang/cargo#11535)
2023-01-13rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggleMichael Howell-117/+117
This swaps things around so that the class that gets used more often has the shorter name.