about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-10-27Update static AFIT tests based on feedbackBryan Garza-144/+28
2022-10-27Add tests for static async functions in traitsBryan Garza-0/+530
This patch adds test cases for AFIT, the majority of which are currently expected to run as `check-fail`.
2022-10-27Auto merge of #103623 - matthiaskrgr:rollup-318yc1t, r=matthiaskrgrbors-140/+431
Rollup of 9 pull requests Successful merges: - #103035 (Even nicer errors from assert_unsafe_precondition) - #103106 (Try to say that memory outside the AM is always exposed) - #103475 (Make param index generation a bit more robust) - #103525 (Move a wf-check into the site where the value is instantiated) - #103564 (library: allow some unused things in Miri) - #103586 (Process registered region obligation in `resolve_regions_with_wf_tys`) - #103592 (rustdoc: remove redundant CSS selector `.notable-traits .notable`) - #103593 (Remove an unused parser function (`Expr::returns`)) - #103611 (Add test for issue 103574) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-27Rollup merge of #103611 - Rageking8:fix-103574, r=lcnrMatthias Krüger-4/+56
Add test for issue 103574 Fixes #103574 Together with some slight formatting. r? `@lcnr`
2022-10-27Rollup merge of #103593 - compiler-errors:nit-remove-returns, r=fee1-deadMatthias Krüger-18/+0
Remove an unused parser function (`Expr::returns`) I removed the only usage in #97474
2022-10-27Rollup merge of #103592 - notriddle:notriddle/notable-traits-notable, ↵Matthias Krüger-2/+39
r=GuillaumeGomez rustdoc: remove redundant CSS selector `.notable-traits .notable` The margin was already being set to 0 only a few lines lower.
2022-10-27Rollup merge of #103586 - compiler-errors:issue-103573, r=jackh726Matthias Krüger-0/+40
Process registered region obligation in `resolve_regions_with_wf_tys` Fixes #103573
2022-10-27Rollup merge of #103564 - RalfJung:miri-unused, r=thomccMatthias Krüger-2/+3
library: allow some unused things in Miri Should help for https://github.com/rust-lang/rust/pull/102950.
2022-10-27Rollup merge of #103525 - oli-obk:const_impl_on_non_const_trait, r=lcnrMatthias Krüger-59/+126
Move a wf-check into the site where the value is instantiated r? ``@lcnr``
2022-10-27Rollup merge of #103475 - oli-obk:generic_param_indices, r=lcnrMatthias Krüger-13/+14
Make param index generation a bit more robust r? ````@lcnr```` While not really necessary for closure and anon const ids, it's strictly more correct
2022-10-27Rollup merge of #103106 - saethlin:from_exposed_docs, r=thomccMatthias Krüger-6/+15
Try to say that memory outside the AM is always exposed cc ``@Gankra`` ``@thomcc`` I want to confidently tell people that they can use `from_exposed_addr` to get a pointer for doing MMIO and/or other hardware interactions done with volatile reads/writes at particular addresses outside the Rust AM. Currently, the docs indicate that would be UB. With this change, now the docs indicate that this is intended to be a valid use of `from_exposed_addr`. r? ``@RalfJung``
2022-10-27Rollup merge of #103035 - saethlin:assert_unsafe_precondition3, r=thomccMatthias Krüger-36/+138
Even nicer errors from assert_unsafe_precondition For example, now running `cargo test` with this patch I get things like: ``` $ cargo +stage1 test Finished test [unoptimized + debuginfo] target(s) in 0.01s Running unittests src/lib.rs (target/debug/deps/malloc_buf-9d105ddf86862995) running 5 tests thread 'tests::test_null_buf' panicked at 'unsafe precondition violated: is_aligned_and_not_null(data) && crate::mem::size_of::<T>().saturating_mul(len) <= isize::MAX as usize', /home/ben/rust/library/core/src/slice/raw.rs:93:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread panicked while panicking. aborting. error: test failed, to rerun pass `--lib` Caused by: process didn't exit successfully: `/tmp/malloc_buf-1.0.0/target/debug/deps/malloc_buf-9d105ddf86862995` (signal: 6, SIGABRT: process abort signal) ``` This is still not perfect, but these are better for another PR: * `stringify!` is trying to do clever pretty-printing on the `expr` inside `assert_unsafe_precondition` and can even add a newline. * It would be nice to print a bit more information about where the problem is. Perhaps this is `cfg_attr(debug_assertions, track_caller)`, or perhaps it the function name added to `Location`. cc ``@RalfJung`` this is what I was thinking of for https://github.com/rust-lang/rust/pull/102732#discussion_r989068907
2022-10-27Auto merge of #103601 - compiler-errors:no-opaque-probe-in-nll-relate, r=oli-obkbors-1/+25
Remove `commit_if_ok` probe from NLL type relation It was not really necessary to add the `commit_if_ok` in #100092 -- I added it to protect us against weird inference error messages due to recursive RPIT calls, but we are always on the error path when this happens anyways, and I can't come up with an example that makes this manifest. Fixes #103599 r? `@oli-obk` since you reviewed #100092, feel free to re-roll. :b: :loudspeaker: beta-nominating this since it's on beta (which forks in ~a week~ two days :fearful:) -- worst case we could revert the original PR on beta and land this on nightly, to give it some extra soak time...
2022-10-27Auto merge of #103605 - ehuss:mentions-spec, r=Mark-Simulacrumbors-0/+6
Add Target Tier Policy notification. This adds a notification posted to PRs when they add/modify a target spec. This was hard-coded in highfive. I forgot to include this in https://github.com/rust-lang/rust/pull/103492.
2022-10-27add tests and slight formattingRageking8-4/+56
2022-10-26Print the precondition we violated, and visible through output captureBen Kimock-36/+138
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-10-26Auto merge of #103604 - JohnTitor:rollup-q4ns2gh, r=JohnTitorbors-1675/+2336
Rollup of 10 pull requests Successful merges: - #103432 (rustdoc: don't mark Box<T> as Iterator, Read, etc) - #103526 (More dupe typos again) - #103537 (rustdoc: combine shared CSS between `.*-line-numbers`) - #103549 (llvm-16: Don't initialize removed legacy passes) - #103558 (Update cargo) - #103567 (ptr::eq: clarify that comparing dyn Trait is fragile) - #103579 (:arrow_up: rust-analyzer) - #103580 (Fix typo in docs for `guaranteed_ne`) - #103596 (thread::set_name: debug-assert that things went well) - #103598 (rustc_lexer::TokenKind improve docs) Failed merges: - #103585 (Migrate source line numbers CSS to CSS variables) r? `@ghost` `@rustbot` modify labels: rollup
2022-10-26Add Target Tier Policy notification.Eric Huss-0/+6
2022-10-27Rollup merge of #103598 - tshepang:token-kind-docs, r=jackh726Yuki Okushi-5/+18
rustc_lexer::TokenKind improve docs
2022-10-27Rollup merge of #103596 - RalfJung:thread-setname, r=cuviperYuki Okushi-6/+10
thread::set_name: debug-assert that things went well r? `@cuviper`
2022-10-27Rollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomezYuki Okushi-2/+2
Fix typo in docs for `guaranteed_ne` `==` -> `!=`
2022-10-27Rollup merge of #103579 - lnicola:rust-analyzer-2022-10-26, r=lnicolaYuki Okushi-1584/+2221
:arrow_up: rust-analyzer r? ``@ghost``
2022-10-27Rollup merge of #103567 - RalfJung:ptr-eq-dyn-trait, r=dtolnayYuki Okushi-45/+16
ptr::eq: clarify that comparing dyn Trait is fragile Also remove the dyn trait example from `ptr::eq` since those tests are not actually guaranteed to pass due to how unstable vtable comparison is. Cc ``@rust-lang/libs-api`` Cc discussion following https://github.com/rust-lang/rust/pull/80505
2022-10-27Rollup merge of #103558 - weihanglo:update-cargo, r=weihangloYuki Okushi-0/+0
Update cargo 5 commits in 071eeaf210708219a5a1b2c4728ca2f97df7f2ae..9210810d1fd7b51ae0439a0a363cc50e36963455 2022-10-22 01:17:55 +0000 to 2022-10-25 22:31:50 +0000 - Fix 410 gone response handling (rust-lang/cargo#11286) - Fix inequality in "stale mtime" log messages (rust-lang/cargo#11281) - doc(cargo-tree): mention it considering feature unification (rust-lang/cargo#11282) - Improve the error message if `publish` is `false` or empty list (rust-lang/cargo#11280) - Add test for deleted index entry (rust-lang/cargo#11278)
2022-10-27Rollup merge of #103549 - maurer:llvm-main, r=cuviperYuki Okushi-0/+2
llvm-16: Don't initialize removed legacy passes LLVM removed initialization for legacy passes: https://reviews.llvm.org/D136615
2022-10-27Rollup merge of #103537 - notriddle:notriddle/line-numbers, r=GuillaumeGomezYuki Okushi-32/+19
rustdoc: combine shared CSS between `.*-line-numbers` Example: https://notriddle.com/notriddle-rustdoc-demos/line-numbers/test_dingus/fn.test.html This PR should result in no visible changes. The example is here, so it can be easily tested in different browsers.
2022-10-27Rollup merge of #103526 - Rageking8:more-dupe-typos-again, r=Mark-SimulacrumYuki Okushi-1/+1
More dupe typos again There are some others in submodules, which I will file separate PRs for in their respective repos. Thanks.
2022-10-27Rollup merge of #103432 - jsha:box-is-not-notable, r=GuillaumeGomezYuki Okushi-0/+47
rustdoc: don't mark Box<T> as Iterator, Read, etc Because Box<T> has pass-through implementations, rustdoc was giving it the "Notable Traits" treatment for Iterator, Read, Write, and Future, even when the type of T was unspecified. Pin had the same problem, but just for Future. Fixes #100320
2022-10-26No need to probe when relating opaques in nll_relateMichael Goulet-1/+25
2022-10-26rustdoc: add test case for positioning of notable trait tooltipMichael Howell-1/+38
2022-10-26rustc_lexer::TokenKind improve docsTshepang Mbambo-5/+18
2022-10-26Auto merge of #103571 - RalfJung:miri, r=RalfJungbors-92/+234
update Miri r? `@ghost`
2022-10-26thread::set_name: debug-assert that things went wellRalf Jung-6/+10
2022-10-26remove unused parser fnMichael Goulet-18/+0
2022-10-26rustdoc: remove redundant CSS selector `.notable-traits .notable`Michael Howell-1/+1
The margin was already being set to 0 only a few lines lower.
2022-10-26Auto merge of #103492 - ehuss:highfive-triagebot, r=Mark-Simulacrumbors-2/+157
Migrate from highfive to triagebot This migrates rust-lang/rust from highfive to triagebot.
2022-10-26Process registered region obligation in resolve_regions_with_wf_tysMichael Goulet-0/+40
2022-10-26Fix typo in docs for `guaranteed_ne`Lukas Markeffsky-2/+2
2022-10-26:arrow_up: rust-analyzerLaurențiu Nicola-1584/+2221
2022-10-26Update library/core/src/ptr/mod.rsBen Kimock-0/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-10-26Auto merge of #103572 - Dylan-DPC:rollup-a8bnxrw, r=Dylan-DPCbors-281/+127
Rollup of 6 pull requests Successful merges: - #95710 (Stabilize arbitrary_enum_discriminant, take 2) - #102706 (Support excluding the generation of the standalone docs) - #103428 (Removed verbose printing from the `PrettyPrinter` when printing constants) - #103543 (Update books) - #103546 (interpret: a bit of cast cleanup) - #103554 (rustdoc: add visible focus outline to rustdoc-toggle) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-26explicitly mention that both components of wide prts are comparedRalf Jung-0/+1
2022-10-26Rollup merge of #103554 - notriddle:notriddle/summary-focus-visible, r=jshaDylan DPC-0/+9
rustdoc: add visible focus outline to rustdoc-toggle The change in opacity is inconsistent with most of rustdoc, which uses default browser styles for the focus outline. Unfortunately, just using the default focus outline here won't work, because it gets applied to the summary itself instead of the pseudo-element "real button." Preview: https://notriddle.com/notriddle-rustdoc-demos/focus-outline/test_dingus/fn.test.html ## Screenshots ### light ![image](https://user-images.githubusercontent.com/1593513/197903818-61ce09e2-024e-4ca9-9aba-764039561d0a.png) ### dark ![image](https://user-images.githubusercontent.com/1593513/197903765-76e428ea-71e8-4724-ad21-7a4f9d923ea2.png) ### ayu ![image](https://user-images.githubusercontent.com/1593513/197903790-322e22ae-64b5-4138-b931-9ff3ff54f3b0.png)
2022-10-26Rollup merge of #103546 - RalfJung:cast, r=oli-obkDylan DPC-31/+30
interpret: a bit of cast cleanup r? `@oli-obk`
2022-10-26Rollup merge of #103543 - ehuss:update-books, r=ehussDylan DPC-0/+0
Update books ## reference 4 commits in f6ed74f582bddcec73f753eafaab3749c4f7df61..4ea7c5def38ac81df33a9e48e5637a82a5ac404d 2022-10-08 02:43:26 -0700 to 2022-10-25 15:14:36 -0700 - Document Half Open Range Patterns + Improve Range Patterns in General (rust-lang/reference#1274) - clarifying which row contains the example (rust-lang/reference#1287) - Add `sym` operands for inline assembly (rust-lang/reference#1270) - Add basic GATs reference information (rust-lang/reference#1265) ## book 141 commits in f1e5ad844d0c61738006cdef26227beeb136948e..aa5ee485bd6bd80d205da7c82fcdd776f92fdd51 2022-09-19 09:48:21 -0400 to 2022-10-20 16:49:55 -0400 - Remove Turkish translation - Update chapter 4 from latest print edits - Update chapter 3 from latest print edits - Clarify division truncates toward zero. Fixes rust-lang/book#2856. - Update chapter 2 from latest print edits - Fix a problem with literal style ending - Explain both kinds of format string arguments - Update chapter 1 from latest print edits - Snapshot consolidated appendices - Fix ListNumber0, newlines after lists - Don't match nodes without anything - Handle listing numbers in appendices too - Regenerate everything - Fix chapter numbers in word doc so they're in the XML - Number Table captions too - Handle figures too - Regenerate ch4 - Handle listing numbers - Regenerate ch13 - Regenerate ch12 - Regenerate ch11 - Regenerate chapter 10 - Fix ListBullet0 - Handle ending of BoxCode better - Regenerate chapter 9 - Regenerate ch8 - Make RunInHead consistent-ish - Fix extra newline before boxes - Fix Box RunIn Head/Para - Fix newline after RunInHead/Para - Regenerate ch7 - Fix QuotePara - Fix ListPlain - Regenerate ch6 - Fix BoxCode - Regenerate chapter 5 - Fix GraphicSlug and CaptionLine - Regenerate snapshot of chapter 4 - Fix boxes a bit - Add a shellcheck ignore - Handle BoxListBullet - Handle superscript - Regenerate ch3 from xml and fix tables - Fix italics and whitespace interactions - Fix italic preceding/following - Fix preceding/following xpaths again - Fix italics - Fix code blocks - Fix more last bullets in lists - Fix box newlines - Fix last bullet in a list - Fix BoxType - Fix notes - Fix literals - Add the no editing warning at the top when getting snapshots from docx - Make the snapshot of the frontmatter nicer - Updates to appendixes C, D, and E after copyedit checks - Snapshots after copyedit checks of appendices a and b + recheck of 20 - Snapshot of appendices from copyedit - Updated snapshot of the appendices - Re-checks of chapter 19 - Re-checks of chapter 18 - Messy snapshot of chapter 20 after copyedit checks - Snapshot of ch20 after copyedit - Updated snapshot of chapter 20 - Messy snapshot of chapter 19 after copyedit checks - Snapshot of ch19 after copyedit - Updated snapshot of ch19 - Messy snapshot of ch 18 after copyedit review - Snapshot of ch 18 after copyedit - Update snapshot of ch18 - Messy snapshot of ch 17 after copyedit review - Snapshot of ch17 copyedit - Updated snapshot of ch17 - Messy snapshot of ch16 after copyedit - Snapshot of ch16 copyedited - Updated snapshot of ch16 - Messy snapshot of ch 15 after copyedit checks - Re-review of earlier chapters - Snapshot of ch15 copyedit - Update snapshot of ch15 - Messy snapshots of other chapters with indentation fixed - Messy snapshot of ch2 with indentation fixed - Add unittests to the allowed words - Messy snapshot of chapter 14 after checking copyedit - Snapshot of chapter 14 after copyedit - Update snapshot of ch14 - Regenerate manual output for chapter 14 - Messy snapshot of chapter 13 after copyedit check - Updated snapshot of ch13 after copyedit - Updated snapshot of ch13 - Messy snapshot of chapter 12 after copyedit checks - Snapshot of chapter 12 copyedited - Update snapshot for chapter 12 - Messy snapshot of chapter 11 after copyedit check - Snapshot of chapter 11 copyedited - Updated snapshot of chapter 11 - Messy snapshot of chapter 10 after copyedit check - Snapshot of chapter 10 copyedit - Updated snapshot of chapter 10 - Messy snapshot of ch9 after copyedit checks - Snapshot of ch 9 copyedit - Update snapshot of chapter 9 - Messy snapshot of chapter 8 - Update println style in ch8 - Snapshot of chapter 8 from copyedit - Updated snapshot of chapter 8 - Rearrange my notes yet again - Messy snapshot of ch7 after copyedit checks - Snapshot of chapter 7 from copyedit, fix chapter 6 name - Update snapshot of chapter 7 - Messy snapshot of chapter 6 after copyedit check - Update snapshot of chapter 6 - Change my notes again - Messy snapshot of chapter 5 after checking copyedit - Snapshot of chapter 5 from copyedit - Messy snapshot of chapter 4 after copyedit check - Changing my notes again - Snapshot of ch4 from nostarch - Messy snapshot of chapter 3 after copyedit check, ch4 on start check - Snapshot of ch3 from nostarch - Updated snapshot of ch3 - reorder notes - Messy snapshot of chapter 1 after copyedit check - Snapshot of ch01 docx from nostarch - Updated snapshot of chapter 1 - Messy snapshot of frontmatter docx - Another snapshot to fix the crab pinchers description - Messy snapshot of chapter 2 docx - Get the latest snapshot of chapter 2 - Upgrade to rand 0.8.5 - Notes to self - Update xsl and take snapshots from docx, such as they are - Update instructions on docx -&gt; md now that I've done it again - Propagate frontmatter edits to src - Updated snapshots extracted from frontmatter - Support different styles in the docx - Line wrap bio - Frontmatter from word doc - Edits to docx files for nostarch - docx files from nostarch ## rust-by-example 6 commits in 5e7b296d6c345addbd748f242aae28c42555c015..03491f33375c5a2a1661c7fa4be671fe95ce1249 2022-10-05 08:24:45 -0300 to 2022-10-21 07:30:08 -0300 - fix rust-lang/rust-by-example#1628: the box pointer is on stack not on heap (rust-lang/rust-by-example#1629) - fix rust-lang/rust-by-example#1608: out-of-bound indexing is a runtime error (not a compile-time error) (rust-lang/rust-by-example#1626 ) - Fix: Path internal representation and conversions (rust-lang/rust-by-example#1625) - fix crate name in example (rust-lang/rust-by-example#1620) - avoid reserved keyword try as crate name (rust-lang/rust-by-example#1619) - Fix typo in iter_result.md (rust-lang/rust-by-example#1614) ## rustc-dev-guide 7 commits in 7518c3445dc02df0d196f5f84e568d633c5141fb..51a37ad19a15709d0601afbac6581f5aea6a45da 2022-10-08 12:29:47 +0200 to 2022-10-25 10:18:58 -0700 - Update `traits/resolution.md` (rust-lang/rustc-dev-guide#1494) - Update diagnostics to flat fluent message paths - Update rust-analyzer suggestions (rust-lang/rustc-dev-guide#1487) - miri is no longer a submodule but a subtree. (rust-lang/rustc-dev-guide#1488) - fix some links (rust-lang/rustc-dev-guide#1490) - typo and grammar (rust-lang/rustc-dev-guide#1484) - Add missing prerequisite for some Linux distros (rust-lang/rustc-dev-guide#1481)
2022-10-26Rollup merge of #103428 - SarthakSingh31:issue-94187, r=compiler-errorsDylan DPC-5/+24
Removed verbose printing from the `PrettyPrinter` when printing constants Partially solves #94187 by completing the first step described in [this comment](https://github.com/rust-lang/rust/issues/94187#issuecomment-1282339909).
2022-10-26Rollup merge of #102706 - ferrocene:pa-ignore-doc-index, r=jyn514Dylan DPC-18/+48
Support excluding the generation of the standalone docs For Ferrocene we need to exclude the generation of the standalone docs (which include the index page, which we want to replace with our own), but with the way bootstrap is currently implemented that proved not possible. This PR aims to support that. The first problem is that the `doc::Standalone` step did two things: it generated the "standalone" documentation (which includes the index page and all the pages at the root of the documentation tree), but it also generated some files like `rust.css` and `version_info.html` that other step like `doc::TheBook` required. This meant generating the book required generating the index page, which made disabling the index page generation problematic. The approach I took to fix the first problem is to split the step into `doc::Standalone` and `doc::SharedAssets`, with `doc::TheBook` now depending on `doc::SharedAssets`. The second problem is that disabling the `doc::Standalone` proved to be tricky due to its path, `src/doc`. The path is accurate, as the source files for that step are `src/doc/*.md`. The problem is, bootstrap treats `--exclude` as a *suffix*, and so it also excluded the Cargo book whose source lives at `src/tools/cargo/src/doc`. The approach I took to fix the second problem is to add the `standalone` path in addition to `src/doc`, so that you can pass `--exclude standalone`. I'm not fully happy with the solution, and the other idea I had was to just move the standalone docs source code to `src/doc/standalone`. I feel that second approach is cleaner, but also requires more changes and might require more consensus. This PR is best reviewed commit-by-commit. r? `@jyn514`
2022-10-26Rollup merge of #95710 - ↵Dylan DPC-227/+16
fee1-dead-contrib:stabilize_arbitrary_enum_discriminant, r=joshtriplett Stabilize arbitrary_enum_discriminant, take 2 Documentation has been updated in https://github.com/rust-lang/reference/pull/1055. cc #86860 for previous stabilization report. Not yet marks https://github.com/rust-lang/rust/issues/60553 as done: need documentation in the rust reference.
2022-10-26Auto merge of #103284 - compiler-errors:const-sad, r=oli-obkbors-101/+123
Revert "Unify tcx.constness and param env constness checks" Too much of a perf regression https://github.com/rust-lang/rust/pull/102975#issuecomment-1282702513, and an attempt in #103263 didn't fix it except for just a tiny bit. This change isn't really needed (see https://github.com/rust-lang/rust/pull/102830#issuecomment-1272514096), so this should be an easy revert.
2022-10-26Update src/librustdoc/html/static/css/rustdoc.cssMichael Howell-1/+2
Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>