about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-10-08rustdoc: add test case for dimensions and color of unsafe `<sup>`Michael Howell-0/+41
2022-10-08rustdoc: remove weird `<a href="#">` wrapper around unsafe triangleMichael Howell-1/+1
This DOM cleanup changes the color of the triangle, from blue to black, but since it's still a different color from the link it's next to, it should still be noticeable.
2022-10-08Auto merge of #102809 - matthiaskrgr:rollup-qq62vuv, r=matthiaskrgrbors-288/+491
Rollup of 8 pull requests Successful merges: - #101520 (Allow transmutes between the same types after erasing lifetimes) - #102675 (Remove `mir::CastKind::Misc`) - #102778 (Fix MIR inlining of asm_unwind) - #102785 (Remove `DefId` from some `SelectionCandidate` variants) - #102788 (Update rustc-dev-guide) - #102789 (Update browser UI test version) - #102797 (rustdoc: remove no-op CSS `.rightside { position: initial }`) - #102798 (rustdoc: add main-heading and example-wrap link CSS to big selector) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-08Rollup merge of #102798 - notriddle:notriddle/text-decoration-underline, ↵Matthias Krüger-7/+2
r=GuillaumeGomez rustdoc: add main-heading and example-wrap link CSS to big selector This makes the stylesheet more consistent about how it handles link hover.
2022-10-08Rollup merge of #102797 - notriddle:notriddle/rightside-position, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `.rightside { position: initial }` This CSS, added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, overrode CSS that was applied to the `.since` class: https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/static/rustdoc.css#L782-L795 The absolute positioning for `.since` was abandoned in favor of always floating it, so this is no longer needed: https://github.com/rust-lang/rust/commit/5de1391b88007a1d4f7b1517657a86aae352af1e#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413L902-L904
2022-10-08Rollup merge of #102789 - GuillaumeGomez:update-browser-ui-test-version, ↵Matthias Krüger-150/+150
r=notriddle Update browser UI test version It added the possibility to concatenate strings and numbers and updated the `goto` command so it doesn't stand on its own anymore. r? ````@notriddle````
2022-10-08Rollup merge of #102788 - joshtriplett:bump-rustc-dev-guide, r=ehussMatthias Krüger-0/+0
Update rustc-dev-guide - .gitattributes: Mark minified javascript as binary to filter greps - fix very minor punctuation typo - diagnostic structs: derive on enum (#1477) - Update running tests with the new flags (#1476) - Rename typeck to hir_analysis (#1475) - fix typo and make paragraph consistent (#1474) - Update about-this-guide.md - Link to the correct page in "about this guide" - Update r-a config suggestions - don't refer to the compile-time interpreter as "Miri" (#1471) - UPDATE - Diagnostic docs to reflect renamed traits and macros in rustc PR#101558 - Update mdbook and its extensions versions - Remove unmaintained action - Update some actions versions - Fix some typos Update motivated in large part by the most recent commit, to fix `git grep`.
2022-10-08Rollup merge of #102785 - fee1-dead-contrib:rm_autoimpl_defid, r=compiler-errorsMatthias Krüger-21/+20
Remove `DefId` from some `SelectionCandidate` variants They are both from `obligation.predicate.def_id()`, which do not need to be on the `SelectionCandidate`. cc ````@lcnr```` ````@compiler-errors````
2022-10-08Rollup merge of #102778 - nbdd0121:mir, r=tmiaskoMatthias Krüger-25/+86
Fix MIR inlining of asm_unwind The MIR inlining currently doesn't handle inline asm's unwind edge correctly. This code will cause ICE: ```rust struct D; impl Drop for D { fn drop(&mut self) {} } #[inline(always)] fn foo() { let _d = D; unsafe { std::arch::asm!("", options(may_unwind)) }; } pub fn main() { foo(); } ``` This PR fixes this issue. I also take the opportunity to extract common code into a method.
2022-10-08Rollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obkMatthias Krüger-57/+190
Remove `mir::CastKind::Misc` As discussed in #97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast. r? ````@oli-obk````
2022-10-08Rollup merge of #101520 - oli-obk:transmute_lifetimes, r=compiler-errorsMatthias Krüger-27/+43
Allow transmutes between the same types after erasing lifetimes r? ````@compiler-errors```` on the impl fixes #101081 See discussion in the issue and at https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.23101081.3A.20Regression.20transmuting.20.60RwLockReadGuard.3CT.3A.20.3FSized.3E.E2.80.A6 I think this may need lang team signoff as its implications may go beyond the jurisdiction of T-types I'll write up a proper summary later
2022-10-08Auto merge of #100720 - camsteffen:representable, r=cjgillotbors-736/+529
Rewrite representability * Improve placement of `Box` in the suggestion * Multiple items in a cycle emit 1 error instead of an error for each item in the cycle * Introduce `representability` query to avoid traversing an item every time it is used. * Also introduce `params_in_repr` query to avoid traversing generic items every time it is used.
2022-10-08Auto merge of #99505 - joboet:futex_once, r=thomccbors-289/+483
std: use futex in `Once` Now that we have efficient locks, let's optimize the rest of `sync` as well. This PR adds a futex-based implementation for `Once`, which drastically simplifies the implementation compared to the generic version, which is provided as fallback for platforms without futex (Windows only supports them on newer versions, so it uses the fallback for now). Instead of storing a linked list of waiters, the new implementation adds another state (`QUEUED`), which is set when there are waiting threads. These now use `futex_wait` on that state and are woken by the running thread when it finishes and notices the `QUEUED` state, thereby avoiding unnecessary calls to `futex_wake_all`.
2022-10-07rustdoc: add main-heading and example-wrap link CSS to big selectorMichael Howell-7/+2
This makes the stylesheet more consistent about how it handles link hover.
2022-10-07Auto merge of #102792 - weihanglo:update-cargo, r=ehussbors-0/+0
Update cargo 4 commits in 0b84a35c2c7d70df4875a03eb19084b0e7a543ef..3cdf1ab25dc4fe56f890e8c7330d53a23ad905d3 2022-10-03 19:13:21 +0000 to 2022-10-07 17:34:03 +0000 - fix(test): Distinguish 'testname' from escaped arguments (rust-lang/cargo#11190) - Fix sparse registry lockfile urls containing 'registry+sparse+' (rust-lang/cargo#11177) - doc(features2): polish docs a bit (rust-lang/cargo#11185) - Import `cargo remove` into cargo (rust-lang/cargo#11099)
2022-10-07rustdoc: remove no-op CSS `.rightside { position: initial }`Michael Howell-1/+0
This CSS, added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, overrode CSS that was applied to the `.since` class: https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/static/rustdoc.css#L782-L795 The absolute positioning for `.since` was abandoned in favor of always floating it, so this is no longer needed: https://github.com/rust-lang/rust/commit/5de1391b88007a1d4f7b1517657a86aae352af1e#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413L902-L904
2022-10-07Auto merge of #102091 - RalfJung:const_err, r=oli-obkbors-5321/+1379
make const_err a hard error This lint has been deny-by-default with future incompat wording since [Rust 1.51](https://github.com/rust-lang/rust/pull/80394) and the stable release of this week starts showing it in cargo's future compat reports. I can't wait to finally get rid of at least some of the mess in our const-err-reporting-code. ;) r? `@oli-obk` Fixes https://github.com/rust-lang/rust/issues/71800 Fixes https://github.com/rust-lang/rust/issues/100114
2022-10-07Update cargoWeihang Lo-0/+0
4 commits in 0b84a35c2c7d70df4875a03eb19084b0e7a543ef..3cdf1ab25dc4fe56f890e8c7330d53a23ad905d3 2022-10-03 19:13:21 +0000 to 2022-10-07 17:34:03 +0000 - fix(test): Distinguish 'testname' from escaped arguments (rust-lang/cargo#11190) - Fix sparse registry lockfile urls containing 'registry+sparse+' (rust-lang/cargo#11177) - doc(features2): polish docs a bit (rust-lang/cargo#11185) - Import `cargo remove` into cargo (rust-lang/cargo#11099)
2022-10-07Update rustdoc-gui test to new browser-ui-test versionGuillaume Gomez-149/+149
2022-10-07Update browser-ui-test versionGuillaume Gomez-1/+1
2022-10-07Auto merge of #102787 - Dylan-DPC:rollup-fvbb4t9, r=Dylan-DPCbors-164/+319
Rollup of 6 pull requests Successful merges: - #102300 (Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere) - #102475 (unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update) - #102760 (Avoid repeated re-initialization of the BufReader buffer) - #102764 (Check `WhereClauseReferencesSelf` after all other object safety checks) - #102779 (Fix `type_of` ICE) - #102780 (run Miri CI when std::sys changes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-07Fix testGary Guo-10/+11
2022-10-07Update rustc-dev-guideJosh Triplett-0/+0
- .gitattributes: Mark minified javascript as binary to filter greps - fix very minor punctuation typo - diagnostic structs: derive on enum (#1477) - Update running tests with the new flags (#1476) - Rename typeck to hir_analysis (#1475) - fix typo and make paragraph consistent (#1474) - Update about-this-guide.md - Link to the correct page in "about this guide" - Update r-a config suggestions - don't refer to the compile-time interpreter as "Miri" (#1471) - UPDATE - Diagnostic docs to reflect renamed traits and macros in rustc PR#101558 - Update mdbook and its extensions versions - Remove unmaintained action - Update some actions versions - Fix some typos Update motivated in large part by the most recent commit, to fix `git grep`.
2022-10-07Rollup merge of #102780 - RalfJung:miri-lib-sys, r=Mark-SimulacrumDylan DPC-1/+4
run Miri CI when std::sys changes r? `@Mark-Simulacrum`
2022-10-07Rollup merge of #102779 - TaKO8Ki:fix-type-of-ice-102768, r=fee1-deadDylan DPC-2/+51
Fix `type_of` ICE Fixes #102768
2022-10-07Rollup merge of #102764 - compiler-errors:issue-102762, r=jackh726Dylan DPC-13/+61
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 #102762
2022-10-07Rollup merge of #102760 - saethlin:dont-reinit-buffer, r=Mark-SimulacrumDylan DPC-3/+48
Avoid repeated re-initialization of the BufReader buffer Fixes https://github.com/rust-lang/rust/issues/102727 We accidentally removed this in https://github.com/rust-lang/rust/pull/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.
2022-10-07Rollup merge of #102475 - RalfJung:unsafe, r=dtolnayDylan DPC-31/+120
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.
2022-10-07Rollup merge of #102300 - scottmcm:simpler-fold-closures, r=Mark-SimulacrumDylan DPC-114/+35
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.
2022-10-07Allow transmutes between the same types after erasing lifetimesOli Scherer-27/+43
2022-10-07make const_err a hard errorRalf Jung-5321/+1379
2022-10-07Remove `DefId` from some `SelectionCandidate` variantsDeadbeef-21/+20
2022-10-07Rewrite representabilityCameron Steffen-736/+529
2022-10-07Auto merge of #101632 - camsteffen:refactor-infer-err, r=lcnrbors-3021/+2831
Remove `TypeckResults` from `InferCtxt` `InferCtxt` currently has `in_progress_typeck_results` which is only used for some diagnostics during typeck. It adds a lifetime which propagates through a lot of code. This PR moves that field into a new helper struct `TypeErrCtxt`.
2022-10-07review feedbackRalf Jung-42/+43
2022-10-07run Miri CI when std::sys changesRalf Jung-1/+4
2022-10-07Change InferCtxtBuilder from enter to buildCameron Steffen-2200/+1984
2022-10-07fix a ICE #102768Takayuki Maeda-2/+51
2022-10-07Remove a reference from InheritedCameron Steffen-13/+13
2022-10-07Remove TypeckResults from InferCtxtCameron Steffen-280/+240
2022-10-07Introduce TypeErrCtxtCameron Steffen-568/+634
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't need to.
2022-10-07Fix MIR inlining of asm_unwindGary Guo-25/+85
2022-10-07Auto merge of #102025 - chenyukang:fix-102002, r=jyn514bors-2/+10
Delete the stage1 and stage0-sysroot directories when using download-rustc Fixes #102002
2022-10-07std: use futex in `Once`joboet-289/+483
2022-10-07Auto merge of #102767 - matthiaskrgr:rollup-vcbt81v, r=matthiaskrgrbors-30/+53
Rollup of 6 pull requests Successful merges: - #102577 (Warn about Visual Studio Code branding confusion) - #102720 (do not reverse the expected type and found type for ObligationCauseCo…) - #102744 (rustdoc: remove unused CSS `.content .item-list`) - #102747 (rustdoc: remove unused CSS `.docblock a:not(.srclink)`) - #102748 (Disable compressed debug sections on i586-gnu) - #102761 (let-else: test else block with non-never uninhabited type) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-07Rollup merge of #102761 - est31:let_else_uninhabited_test, r=compiler-errorsMatthias Krüger-1/+23
let-else: test else block with non-never uninhabited type let else currently does not allow uninhabited types for the `else` block that aren't `!`. One can maybe think about relaxing this in the future, but if it is done, it should be an explicit choice and not an unexpected side effect of e.g. a refactor. Thus, I'm extending a test that will fail if the behaviour changes.
2022-10-07Rollup merge of #102748 - cuviper:i586-gnu-uncompress, r=pietroalbiniMatthias Krüger-1/+5
Disable compressed debug sections on i586-gnu Compressed debug is enabled by default for gas (assembly) on Linux/x86 targets, and we started building our own in #102530, but that made our `compiler_builtins` incompatible with binutils < 2.32. Add an explicit option to disable that in our crosstool-ng config. Fixes #102703.
2022-10-07Rollup merge of #102747 - notriddle:notriddle/docblock-a-not-srclink, ↵Matthias Krüger-2/+3
r=GuillaumeGomez rustdoc: remove unused CSS `.docblock a:not(.srclink)` This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480, because the list of impl items could be nested below `docblock`. https://github.com/rust-lang/rust/blob/c7312fbae4979c6d4fdfbd1f55a71cd47d82a480/src/librustdoc/html/render.rs#L3841-L3845 Now that rustdoc toggles have been switched to `<details>`, there shouldn't be any need to put things inside docblock containers just to give them disclosure toggles.
2022-10-07Rollup merge of #102744 - notriddle:notriddle/content-item-list, ↵Matthias Krüger-15/+10
r=GuillaumeGomez rustdoc: remove unused CSS `.content .item-list` When these rules were added in 4fd061c426902b0904c65e64a3780b21f9ab3afb (yeah, that's the very first commit of rustdoc_ng), `.item-list` was a `<ul>`, and this would override the default style for that tag. In c1b1d6804bfce1aee3a95b3cbff3eaeb15bad9a4, it was changed to use a `<div>` tag, so these rules are both no-ops.
2022-10-07Rollup merge of #102720 - lyming2007:issue-102397-fix, r=compiler-errorsMatthias Krüger-9/+9
do not reverse the expected type and found type for ObligationCauseCo… …de of IfExpressionWithNoElse this will fix #102397