about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-01-03turn a comment into an actual doc commentRémy Rakic-7/+7
2023-01-03slight cleanupRémy Rakic-2/+1
2023-01-03make the `native::LLD` step able to use an already built lldRémy Rakic-0/+14
Makes the lld step avoid building it from source when possible: when dist has packaged it along the other LLVM binaries for the rust-dev component.
2023-01-03bootstrap dist: ensure LLD's stepRémy Rakic-0/+6
2023-01-03Auto merge of #105609 - bjorn3:shrink_rustc_dev, r=jyn514bors-10/+161
Only include metadata for non-dynamic libraries in rustc-dev The actual object code should be linked from librustc_driver.so, which is still included in rustc-dev. This saves on download time and disk usage. Fixes https://github.com/rust-lang/rust/issues/103538
2023-01-03Auto merge of #106371 - RalfJung:no-ret-position-noalias, r=nikicbors-1/+1
do not add noalias in return position `noalias` as a return attribute in LLVM indicates that the returned pointer does not alias anything else that is reachable from the caller, *including things reachable before this function call*. This is clearly not the case with a function like `fn id(Box<T>) -> Box<T>`, so we cannot use this attribute. Fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/385 (including an actual miscompilation that `@comex` managed to produce).
2023-01-03Auto merge of #106386 - compiler-errors:rollup-dxjv18b, r=compiler-errorsbors-211/+757
Rollup of 8 pull requests Successful merges: - #95985 (Add PhantomData marker to Context to make Context !Send and !Sync) - #104298 (Add notes and examples about non-intuitive `PathBuf::set_extension` behavior) - #105558 (Reduce HIR debug output) - #106315 (Cleanup `mingw-tidy` docker job) - #106354 (Rustdoc-Json: Report discriminant on all kinds of enum variant.) - #106366 (Fix rustdoc ICE on bad typedef with mismatching types) - #106376 (Update books) - #106383 (Document some of the AST nodes) Failed merges: - #106356 (clean: Remove `ctor_kind` from `VariantStruct`.) r? `@ghost` `@rustbot` modify labels: rollup
2023-01-02Rollup merge of #106376 - rustbot:docs-update, r=ehussMichael Goulet-0/+0
Update books ## rust-lang/book 3 commits in a60f4316ec923a5ac2ed6a2eba6960edb832d855..2bd5d42c9956369132228da6409f0e68da56c51a 2022-12-22 21:37:10 UTC to 2022-12-22 21:36:14 UTC - fix macos installation problem (rust-lang/book#3469) - Update -guessing-game-tutorial incorrect output (rust-lang/book#3462) - FIX: IT repo updated (rust-lang/book#3454) ## rust-lang/nomicon 1 commits in dd37e21ccee43918ed18a71581bb2af537ffe4fc..8ca261268068d80c0969260fff15199bad87b587 2022-12-30 16:32:09 UTC to 2022-12-30 16:32:09 UTC - Discourage the use of transmute to construct invalid values (rust-lang/nomicon#388) ## rust-lang/rust-by-example 6 commits in 995df09b65c582eb6290ab7ea5d9485983eb4c37..8888f9428fe9a48f31de6bd2cef9b9bf80791edc 2023-01-01 12:53:50 UTC to 2022-12-21 10:18:31 UTC - types/alias: use io::{Result,Error} instead of Io{Result,Error} (rust-lang/rust-by-example#1660) - Fix sample code mismatching its comments (rust-lang/rust-by-example#1659) - fix: add missing space (rust-lang/rust-by-example#1658) - diverging: fix issues with example code (rust-lang/rust-by-example#1631) - Update enum.md (rust-lang/rust-by-example#1645) - Clean up Chapter 2 (Primitives) (rust-lang/rust-by-example#1651) ## rust-lang/rustc-dev-guide 5 commits in 8b42eb5f57d3d8ed2257a22d0e850d9db52afed3..b3e2a6e6c8a3aae5b5d950c63046f23bae07096d 2023-01-01 05:20:47 UTC to 2022-12-25 12:11:21 UTC - Add help for when you update a submodule by accident (rust-lang/rustc-dev-guide#1537) - Simplify "how to build and run" section (rust-lang/rustc-dev-guide#1528) - Replace `$TARGET` with `host` (rust-lang/rustc-dev-guide#1514) - Add more rebasing help (rust-lang/rustc-dev-guide#1536) - Fix rustc_borrowck crate name typo (rust-lang/rustc-dev-guide#1535)
2023-01-02Rollup merge of #106366 - ↵Michael Goulet-1/+497
GuillaumeGomez:fix-rustdoc-ice-typedef-type-mismatch, r=notriddle Fix rustdoc ICE on bad typedef with mismatching types Fixes https://github.com/rust-lang/rust/issues/106226. Fixes #105742. Fixes #105737. Fixes #105334. Fixes #96287. In this case, it's ok to replace the panic with `rustc_error::raise` because the compiler provided us with a `Error`. r? `@notriddle`
2023-01-02Rollup merge of #106354 - aDotInTheVoid:rdj-always-discr, r=GuillaumeGomezMichael Goulet-201/+257
Rustdoc-Json: Report discriminant on all kinds of enum variant. Closes https://github.com/rust-lang/rust/issues/106299 Probably easier to review one commit at a time. r? `@GuillaumeGomez`
2023-01-02Rollup merge of #106315 - jyn514:cleanup-mingw-tidy, r=fee1-deadMichael Goulet-3/+2
Cleanup `mingw-tidy` docker job Fixes a couple small regressions from https://github.com/rust-lang/rust/pull/106048 and https://github.com/rust-lang/rust/pull/105714. - Avoid `/checkout/src/ci/run.sh: line 187: [: =: unary operator expected`: https://github.com/rust-lang/rust/actions/runs/3809902408/jobs/6481611301#step:26:1701 - Avoid running `x check` in the tidy test, to get faster feedback. It's already run on the normal `mingw-check` job. r? `@fee1-dead`
2023-01-02Rollup merge of #105558 - Nilstrieb:less-spam-hir-tree, r=cjgillotMichael Goulet-6/+1
Reduce HIR debug output HIR debug output is currently very verbose, especially when used with the alternate (`#`) flag. This commit reduces the amount of noisy newlines by forcing a few small key types to stay on one line, which makes the output easier to read and scroll by. ``` $ rustc +after hello_world.rs -Zunpretty=hir-tree | wc -l 582 $ rustc +before hello_world.rs -Zunpretty=hir-tree | wc -l 932 ```
2023-01-02Auto merge of #106364 - JakobDegen:top-down-inlining, r=cjgillotbors-91/+184
Reenable limited top-down MIR inlining Reverts most of #105119 and uses an alternative strategy to prevent exponential blowup. Specifically, we allow doing top-down inlining up to depth at most five, and for at most one call site per nested body. r? `@cjgillot`
2023-01-02Reduce HIR debug outputNilstrieb-6/+1
HIR debug output is currently very verbose, especially when used with the alternate (`#`) flag. This commit reduces the amount of noisy newlines by forcing a few small key types to stay on one line, which makes the output easier to read and scroll by. ``` $ rustc +after hello_world.rs -Zunpretty=hir-tree | wc -l 582 $ rustc +before hello_world.rs -Zunpretty=hir-tree | wc -l 932 ```
2023-01-02Auto merge of #106272 - clubby789:codegen-test-103840, r=nikicbors-0/+9
Add codegen test for issue 103840 Closes #103840
2023-01-02Update booksrustbot-0/+0
2023-01-02do not add noalias in return positionRalf Jung-1/+1
2023-01-02Add regression test for #96287Guillaume Gomez-0/+32
2023-01-02Add regression test for #105742Guillaume Gomez-0/+425
2023-01-02Add regression test for #105737Guillaume Gomez-0/+16
2023-01-02Add regression test for #105334Guillaume Gomez-0/+11
2023-01-02Add regression test for #106226Guillaume Gomez-0/+12
2023-01-02Auto merge of #84762 - cjgillot:resolve-span-opt, r=petrochenkovbors-120/+13
Encode spans relative to the enclosing item -- enable on nightly Follow-up to #84373 with the flag `-Zincremental-relative-spans` set by default. This PR seeks to remove one of the main shortcomings of incremental: the handling of spans. Changing the contents of a function may require redoing part of the compilation process for another function in another file because of span information is changed. Within one file: all the spans in HIR change, so typechecking had to be re-done. Between files: spans of associated types/consts/functions change, so type-based resolution needs to be re-done (hygiene information is stored in the span). The flag `-Zincremental-relative-spans` encodes local spans relative to the span of an item, stored inside the `source_span` query. Trap: stashed diagnostics are referenced by the "raw" span, so stealing them requires to remove the span's parent. In order to avoid too much traffic in the span interner, span encoding uses the `ctxt_or_tag` field to encode: - the parent when the `SyntaxContext` is 0; - the `SyntaxContext` when the parent is `None`. Even with this, the PR creates a lot of traffic to the Span interner, when a Span has both a LocalDefId parent and a non-root SyntaxContext. They appear in lowering, when we add a parent to all spans, including those which come from macros, and during inlining when we mark inlined spans. The last commit changes how queries of `LocalDefId` manage their cache. I can put this in a separate PR if required. Possible future directions: - validate that all spans are marked in HIR validation; - mark macro-expanded spans relative to the def-site and not the use-site.
2023-01-02Fix rustdoc ICE on bad typedef with mismatching typesGuillaume Gomez-1/+1
2023-01-02Auto merge of #106301 - notriddle:notriddle/dir-entry, r=GuillaumeGomezbors-27/+87
rustdoc: use the regular arrow indicator for dir-entry CSS This mostly reverts 468acca108e65101b802821bded17149dc1d86c9, while still fixing the problem it fixed by using an internal list-style-position. It results in a slight change in the hover indicator, but nothing misleading. Preview: http://notriddle.com/notriddle-rustdoc-demos/dir-entry/src/std/lib.rs.html ## Before ![image](https://user-images.githubusercontent.com/1593513/210104247-642e6df0-07d3-452a-a2ab-4c700bc22e0e.png) ## After ![image](https://user-images.githubusercontent.com/1593513/210104271-a3832784-1e4d-4516-983e-6ecb9051857b.png)
2023-01-02Auto merge of #106284 - estebank:merge-mut-errors, r=jyn514bors-226/+435
Merge multiple mutable borrows of immutable binding errors Fix #53466.
2023-01-01Reenable limited top-down MIR inliningJakob Degen-91/+184
2023-01-01Verbose suggestionsEsteban Küber-185/+360
2023-01-01rustdoc: add test case for dir entry summary positionMichael Howell-4/+85
2023-01-01Implement fix for #67535Troy Neubauer-1/+62
2023-01-01Cleanup `mingw-tidy` docker jobJoshua Nelson-3/+2
- Avoid `/checkout/src/ci/run.sh: line 187: [: =: unary operator expected`: https://github.com/rust-lang/rust/actions/runs/3809902408/jobs/6481611301#step:26:1701 - Avoid running `x check` in the tidy test, to get faster feedback. It's already run on the normal `mingw-check` job.
2023-01-01Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726bors-10/+10
Use the correct tracking issue for `dyn_star` `#![feature(dyn_star)]` now has its own tracking issue, #102425.
2023-01-01Rustdoc-Json: Report discriminant on all kinds of enum variant.Nixon Enraght-Moony-144/+167
Closes #106299
2023-01-01Use the correct tracking issue for `dyn_star`Léo Lanteri Thauvin-10/+10
2023-01-01Auto merge of #106350 - GuillaumeGomez:gui-test-explanation-2, r=notriddlebors-0/+1
Add comment explaining what docblock-table GUI test is about r? `@notriddle`
2023-01-01clean: Always store enum disriminant.Nixon Enraght-Moony-59/+92
2023-01-01Merge multiple mutable borrows of immutable binding errorsEsteban Küber-53/+87
Fix #53466.
2023-01-01Add comment explaining what docblock-table GUI test is aboutGuillaume Gomez-0/+1
2023-01-01Auto merge of #106312 - tgross35:update-book-target, r=JohnTitorbors-1/+4
Added link from Targets to Platform Support in the book If you search the web for "rust targets", the first result is the [targets page](https://doc.rust-lang.org/nightly/rustc/targets/index.html). However, usually when searching for this I'm interested in seeing the available triples with host information, so I just added a link to the correct page. The entire `Targets` chapter could probably be combined into one page, since its three subchapters each only have a tiny section (I'll do this if requested)
2022-12-31Auto merge of #106336 - matthiaskrgr:rollup-4p6bgwf, r=matthiaskrgrbors-13/+45
Rollup of 4 pull requests Successful merges: - #106280 (docs: add link to `Path::join` in `PathBuf::push`) - #106297 (rustdoc: merge scrape-help CSS) - #106328 (Add comment explaining what the GUI scrape-examples-fonts test is about) - #106334 (Fix tidy unittest.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-31Rollup merge of #106334 - ehuss:fix-tidy-unittests, r=jyn514Matthias Krüger-3/+38
Fix tidy unittest. The tidy unittests weren't compiling due to a change made a long while ago to the `Version` type.
2022-12-31Rollup merge of #106328 - GuillaumeGomez:gui-test-explanation, r=notriddleMatthias Krüger-0/+1
Add comment explaining what the GUI scrape-examples-fonts test is about r? `@notriddle`
2022-12-31Rollup merge of #106297 - notriddle:notriddle/scrape-help, r=GuillaumeGomezMatthias Krüger-10/+6
rustdoc: merge scrape-help CSS
2022-12-31Run `cargo test` on tidy itself.Eric Huss-1/+36
2022-12-31Auto merge of #106282 - Ezrashaw:merge-e0465, r=estebankbors-26/+26
refactor: merge error code `E0465` into `E0464` `E0465` is an undocumented and untested error code that is functionally identical to `E0464`. This PR merges `E0465` into `E0464`, thus documenting and testing another error code (#61137). r? `@GuillaumeGomez` (not sure if you want to review this but it's relevant to my other PRs that you have reviewed)
2022-12-31Fix tidy unittest.Eric Huss-2/+2
2022-12-31Add missing extern crate rustc_driverbjorn3-0/+72
2022-12-31Add help for the error message when missing rustc_driverbjorn3-0/+33
2022-12-31Only include metadata for non-dynamic libraries in rustc-devbjorn3-10/+56
The actual object code should be linked from librustc_driver.so, which is still included in rustc-dev. This saves on download time and disk usage.
2022-12-31Auto merge of #106302 - compiler-errors:terr-coerce-w-infer, r=estebankbors-72/+31
Suppress errors due to TypeError not coercing with inference variables Fixes #75331 Fixes #68507 Fixes #82323 cc `@estebank`