about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-01-08Add type flags support for Ty and Const late-bound regionsMichael Goulet-14/+42
2023-01-07Auto merge of #106573 - matthiaskrgr:rollup-zkgfsta, r=matthiaskrgrbors-753/+1913
Rollup of 10 pull requests Successful merges: - #101936 (Migrating rustc_infer to session diagnostics (part 3)) - #104081 (PhantomData layout guarantees) - #104543 (Migrate `codegen_ssa` to diagnostics structs - [Part 3]) - #105128 (Add O(1) `Vec -> VecDeque` conversion guarantee) - #105517 (Fix process-panic-after-fork.rs to pass on newer versions of Android.) - #105859 (Point out span where we could introduce higher-ranked lifetime) - #106509 (Detect closures assigned to binding in block) - #106553 (docs: make `HashSet::retain` doctest more clear) - #106556 (rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }`) - #106564 (Change to immutable borrow when cloning element of RepeatN) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-07Rollup merge of #106564 - Folyd:feat-repeatn, r=scottmcmMatthias Krüger-1/+1
Change to immutable borrow when cloning element of RepeatN
2023-01-07Rollup merge of #106556 - notriddle:notriddle/margin-left-content-mobile, ↵Matthias Krüger-4/+0
r=GuillaumeGomez rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }` This rule was added to override non-zero left margin on `.content`, which was removed in 135281ed1525db15edd8ebd092aa10aa40df2386 and the margin-left was put on the docblock.
2023-01-07Rollup merge of #106553 - Ezrashaw:fix-hashset-doctest, r=JohnTitorMatthias Krüger-1/+1
docs: make `HashSet::retain` doctest more clear Fixes #106535 Extremely simple fix suggested by ``@compiler-errors`` in the linked issue.
2023-01-07Rollup merge of #106509 - estebank:closure-in-block, r=davidtwcoMatthias Krüger-35/+74
Detect closures assigned to binding in block Fix #58497.
2023-01-07Rollup merge of #105859 - compiler-errors:hr-lifetime-add, r=davidtwcoMatthias Krüger-6/+57
Point out span where we could introduce higher-ranked lifetime Somewhat addresses #105422, but not really. We don't have that much useful information here since we're still in resolution :^( Maybe this suggestion isn't worth it. If the reviewer has an idea how we can get a more succinct binder information for a structured suggestion, it would be appreciated.
2023-01-07Rollup merge of #105517 - pcc:process-panic-after-fork, r=davidtwcoMatthias Krüger-36/+41
Fix process-panic-after-fork.rs to pass on newer versions of Android. The test process-panic-after-fork.rs was checking that abort() resulted in SIGSEGV on Android. This non-standard behavior was fixed back in 2013, so let's fix the test to also accept the standard behavior on Android.
2023-01-07Rollup merge of #105128 - Sp00ph:vec_vec_deque_conversion, r=dtolnayMatthias Krüger-3/+3
Add O(1) `Vec -> VecDeque` conversion guarantee (See #105072)
2023-01-07Rollup merge of #104543 - ↵Matthias Krüger-341/+920
JhonnyBillM:migrate-codegen-ssa-to-diagnostics-structs-pt3, r=davidtwco Migrate `codegen_ssa` to diagnostics structs - [Part 3] Completes migrating `codegen_ssa` module except 2 outstanding errors that depend on other crates: 1. [`rustc_middle::mir::interpret::InterpError`](https://github.com/rust-lang/rust/blob/b6097f2e1b2ca62e188ba53cf43bd66b06b36915/compiler/rustc_middle/src/mir/interpret/error.rs#L475): I saw `rustc_middle` is unassigned, I am open to take this work. 2. `codegen_llvm`'s use of `fn span_invalid_monomorphization_error`, which I started to replace in the [last commit](https://github.com/rust-lang/rust/commit/9a31b3cdda78a2c0891828254fe9886e0a1cfd16) of this PR, but would like to know the team's preference on how we should keep replacing the other macros: 2.1. Update macros to expect a `Diagnostic` 2.2. Remove macros and expand the code on each use. See [some examples of the different options in this experimental commit](https://github.com/JhonnyBillM/rust/commit/64aee83e80857dcfa450f0c6e31d5f29c6d577e6) _Part 2 - https://github.com/rust-lang/rust/pull/103792_ r? ``@davidtwco`` Cc ``@compiler-errors``
2023-01-07Rollup merge of #104081 - joshlf:patch-6, r=dtolnayMatthias Krüger-0/+6
PhantomData layout guarantees
2023-01-07Rollup merge of #101936 - IntQuant:issue-100717-infer-4, r=compiler-errorsMatthias Krüger-326/+810
Migrating rustc_infer to session diagnostics (part 3) ``@rustbot`` label +A-translation r? rust-lang/diagnostics cc https://github.com/rust-lang/rust/issues/100717 Seems like a part of static_impl_trait.rs emits suggestions in a loop, and note.rs needs to have two instances of the same subdiagnostic, so these will need to wait until we have eager translation/list support. Other than that, there is only error_reporting/mod.rs left to migrate.
2023-01-07Auto merge of #106036 - JohnTitor:issue-86106, r=nikicbors-0/+62
Add regression test for #86106 Closes #86106 r? `@nikic` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-07Auto merge of #105323 - cjgillot:simplify-const-prop, r=davidtwcobors-512/+379
Perform SimplifyLocals before ConstProp. MIR before `ConstProp` may have a lot of dead writes, this makes `ConstProp` do unnecessary work. r? `@ghost`
2023-01-07Change to immutable borrow when cloning element of RepeatNFolyd-1/+1
2023-01-07Auto merge of #106519 - estebank:tail-unit, r=cjgillotbors-23/+285
Detect bindings assigned blocks without tail expressions Fix #44173.
2023-01-07Auto merge of #106283 - JulianKnodt:enum_err, r=cjgillotbors-10/+70
Add help diag. for `const = Enum` missing braces around `Enum` Previously it was not clear why this errored or if it was even supported, as there was no diagnostic that suggested wrapping it in braces. Thus, add a simple diagnostic that suggests wrapping enum variants in braces. Fixes #105927
2023-01-07Apply `merge-functions=disabled`Yuki Okushi-2/+9
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-07Apply review suggestionsYuki Okushi-9/+8
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-07Add regression test for #86106Yuki Okushi-0/+56
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-07Auto merge of #106558 - compiler-errors:rollup-lkii3j3, r=compiler-errorsbors-80/+84
Rollup of 4 pull requests Successful merges: - #106525 (Report WF error for chalk *and* new solver) - #106533 (Use smaller spans for missing lifetime/generic args) - #106543 (rustdoc: remove no-op CSS `.rustdoc.source .sidebar { width: 0 }`) - #106554 (Fix a typo in the explanation of E0588) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-06Rollup merge of #106554 - LingMan:explanation_typo, r=compiler-errorsMichael Goulet-1/+1
Fix a typo in the explanation of E0588
2023-01-06Rollup merge of #106543 - notriddle:notriddle/source-sidebar-width-zero, ↵Michael Goulet-11/+7
r=GuillaumeGomez rustdoc: remove no-op CSS `.rustdoc.source .sidebar { width: 0 }` This CSS was added in dc2c9723343c985740be09919236a6e96c4e4433, before 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c when the sidebars were merged. Now that they are merged, the source sidebar is being pushed off-screen anyway, so giving it zero width doesn't do much.
2023-01-06Rollup merge of #106533 - ↵Michael Goulet-62/+70
TaKO8Ki:use-smaller-span-for-missing-lifetime/generic-args, r=compiler-errors Use smaller spans for missing lifetime/generic args We can remove ident from suggestions.
2023-01-06Rollup merge of #106525 - compiler-errors:new-solver-wf, r=jackh726Michael Goulet-6/+6
Report WF error for chalk *and* new solver addressing this nit https://github.com/rust-lang/rust/pull/106385#discussion_r1062571070 No test yet because new solver is currently unusable, lol r? `@lcnr`
2023-01-06rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }`Michael Howell-4/+0
This rule was added to override non-zero left margin on `.content`, which was removed in 135281ed1525db15edd8ebd092aa10aa40df2386 and the margin-left was put on the docblock.
2023-01-07Fix a typo in the explanation of E0588LingMan-1/+1
2023-01-07docs: make `HashSet::retain` doctest more clearEzra Shaw-1/+1
2023-01-07Auto merge of #106538 - aDotInTheVoid:strip-use-doc-hidden, r=notriddlebors-1/+29
rustdoc: Strip imports of items which are `#[doc(hidden)]` Closes #106379
2023-01-07Auto merge of #106544 - matthiaskrgr:rollup-e9prjed, r=matthiaskrgrbors-1042/+1149
Rollup of 7 pull requests Successful merges: - #106287 (Add some docs to `bug`, `span_bug` and `delay_span_bug`) - #106341 (refactor: clean up `errors.rs` and `error_codes_check.rs`) - #106453 (Improve include macro documentation) - #106466 (Fix rustdoc source code rendering for `#[path = "../path/to/mod.rs"]` links) - #106528 (Tiny formatting fix) - #106534 (rustdoc-gui: Use new block syntax for define-function in goml scripts) - #106542 (Add default and latest stable edition to --edition in rustc (attempt 2)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-06Auto merge of #106415 - Nilstrieb:where-is-my-master-branch, r=jyn514bors-75/+192
Handle non-existent upstream master branches in `x fmt` People who do have a remote for `rust-lang/rust` but don't have the master branch checked out there used to get this error when running `x fmt`: > fatal: ambiguous argument 'rust/master': unknown revision or path not in the working tree. > Use '--' to separate paths from revisions, like this: > 'git <command> [<revision>...] -- [<file>...]' > rust/master Which is not exactly helpful. Now, we fall back to `origin/master` (hoping that at least that remote exists) for that case. If there is still some error, we just fall back to `x fmt .` and print a warning. r? `@jyn514`
2023-01-06Rollup merge of #106542 - sigaloid:master, r=bjorn3Matthias Krüger-2/+8
Add default and latest stable edition to --edition in rustc (attempt 2) Fixes #106041 No longer leaks string like my first attempt PR, #106094 - uses LazyLock to construct a `&'static str` It will now output the default edition and latest stable edition in the help message for the `--edition` flag. Going to request the same reviewer as the first attempt for continuity - r? `@Nilstrieb`
2023-01-06Rollup merge of #106534 - GuillaumeGomez:block-syntax, r=notriddleMatthias Krüger-592/+574
rustdoc-gui: Use new block syntax for define-function in goml scripts r? `@notriddle`
2023-01-06Rollup merge of #106528 - estebank:quick-fix, r=TaKO8KiMatthias Krüger-6/+7
Tiny formatting fix
2023-01-06Rollup merge of #106466 - clubby789:relative-module-fix, r=notriddleMatthias Krüger-41/+109
Fix rustdoc source code rendering for `#[path = "../path/to/mod.rs"]` links Fixes #103517 While generating the location for modules source HTML to be saved at, a `..` path component appeared to be translated to `/up/`. Additionally, while generating the navigation sidebar, `..` path components were ignored. This means that (as in the issue above), a *real* directory structure of: ``` sys/ unix/ mod.rs <-- contains #![path = "../unix/mod.rs] cmath.rs ``` was rendered as: ``` sys/ unix/ mod.rs unix/ cmath.rs <-- links to sys/unix/unix/cmath.rs.html, 404 ``` While the *files* were stored as ``` sys/ unix/ mod.rs.html up/ unix/ cmath.rs.html ```
2023-01-06Rollup merge of #106453 - coastalwhite:master, r=GuillaumeGomezMatthias Krüger-12/+31
Improve include macro documentation As outlined in #106118, the `include!` macro is a SEO problem when it comes to the Rust documentation. Beginners may see it as a replacement to `include` syntax in other languages. I feel like this documentation should quite explicitly link to the modules' documentation. The primary goal of this PR is to address that issue by adding a warning to the documentation. While I was here, I also added some other parts. This included a `Uses` section and some (intra doc) links to other relevant topics. I hope this can help beginners to Rust more quickly understand some multi-file project intricacies. # References - Syntax for the warning: https://github.com/tokio-rs/tracing/blob/58accc6da3f04af3f6144fbe6d68af7225c70c02/tracing/src/lib.rs#L55
2023-01-06Rollup merge of #106341 - Ezrashaw:refactor-error-code-tidy-check, ↵Matthias Krüger-386/+386
r=mejrs,klensy,GuillaumeGomez refactor: clean up `errors.rs` and `error_codes_check.rs` `errors.rs` is basically unused now, `error_codes_check.rs` is useful but not well commented, etc. It also doesn't check certain things which are certainly not correct. For example, `E0505` has a UI test in `src/test/ui/error-codes/` but that test actually outputs `E0504`?! Other issues like these exist. I've implemented these with "warnings" which are a bit rough around the edges but should be removed eventually. r? `@GuillaumeGomez` (again not sure if you want to review but its relevant to you)
2023-01-06Rollup merge of #106287 - Nilstrieb:its-bugging-me-how-we-dont-have-docs, ↵Matthias Krüger-3/+34
r=jyn514 Add some docs to `bug`, `span_bug` and `delay_span_bug` cc `@mejrs` as you wanted me to do this, does this look good and understandable?
2023-01-06rustdoc: remove no-op CSS `.rustdoc.source .sidebar { width: 0 }`Michael Howell-11/+7
This CSS was added in dc2c9723343c985740be09919236a6e96c4e4433, before 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c when the sidebars were merged. Now that they are merged, the source sidebar is being pushed off-screen anyway, so giving it zero width doesn't do much.
2023-01-06Update compiler/rustc_session/src/config.rsMatthew E-1/+1
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2023-01-06Handle non-existant upstream master branches in `x fmt`Nilstrieb-20/+99
2023-01-06Add default and latest stable edition to --edition in rustcMatthew Esposito-2/+8
2023-01-06rustdoc: Strip imports of items which are `#[doc(hidden)]`Nixon Enraght-Moony-1/+29
Closes #106379
2023-01-06Auto merge of #106501 - cjgillot:resolved-elided-apit, r=compiler-errorsbors-2/+9
Correct detection of elided lifetimes in impl-trait. Fixes https://github.com/rust-lang/rust/issues/106338 r? `@compiler-errors` cc `@pnkfelix`
2023-01-06Use new block syntax for define-function in goml scriptsGuillaume Gomez-591/+573
2023-01-06Update testsclubby789-0/+6
2023-01-06Correctly render sidebar for relative module pathsclubby789-41/+103
2023-01-06Auto merge of #106474 - erikdesjardins:noalias, r=bjorn3bors-28/+31
cleanup: handle -Zmutable-noalias like -Zbox-noalias r? `@bjorn3` cc `@RalfJung` this will conflict with #106180
2023-01-06Update browser-ui-test versionGuillaume Gomez-1/+1
2023-01-06use smaller spans for missing lifetime/generic argsTakayuki Maeda-62/+70
fix rustdoc ui test