about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-09-25add test for std::randomRalf Jung-0/+5
2024-09-25Add more LayoutError variantsLaurențiu Nicola-3/+8
2024-09-25Bump rustc cratesLaurențiu Nicola-17/+17
2024-09-25Merge from rust-lang/rustLaurențiu Nicola-15457/+23324
2024-09-25Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-09-25fmtThe Miri Cronjob Bot-16/+19
2024-09-25Merge from rustcThe Miri Cronjob Bot-1667/+1812
2024-09-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-09-25Auto merge of #130803 - cuviper:file-buffered, r=joshtriplettbors-4/+4
Add `File` constructors that return files wrapped with a buffer In addition to the light convenience, these are intended to raise visibility that buffering is something you should consider when opening a file, since unbuffered I/O is a common performance footgun to Rust newcomers. ACP: https://github.com/rust-lang/libs-team/issues/446 Tracking Issue: #130804
2024-09-25Auto merge of #130807 - tgross35:rollup-p304vzf, r=tgross35bors-29/+58
Rollup of 7 pull requests Successful merges: - #130234 (improve compile errors for invalid ptr-to-ptr casts with trait objects) - #130752 (Improve assembly test for CMSE ABIs) - #130764 (Separate collection of crate-local inherent impls from error tracking) - #130788 (Pin memchr to 2.5.0 in the library rather than rustc_ast) - #130789 (add InProgress ErrorKind gated behind io_error_inprogress feature) - #130793 (Mention `COMPILETEST_VERBOSE_CRASHES` on crash test failure) - #130798 (rustdoc: inherit parent's stability where applicable) Failed merges: - #130735 (Simple validation for unsize coercion in MIR validation) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-24Rollup merge of #130798 - lukas-code:doc-stab, r=notriddleTrevor Gross-1/+39
rustdoc: inherit parent's stability where applicable It is currently not possible for a re-export to have a different stability (https://github.com/rust-lang/rust/issues/30827). Therefore the standard library uses a hack when moving items like `std::error::Error` or `std::net::IpAddr` into `core` by marking the containing module (`core::error` / `core::net`) as unstable or stable in a later version than the items the module contains. Previously, rustdoc would always show the *stability as declared* for an item rather than the *stability as publicly reachable* (i.e. the features required to actually access the item), which could be confusing when viewing the docs. This PR changes it so that we show the stability of the first unstable parent or the most recently stabilized parent instead, to hopefully make things less confusing. fixes https://github.com/rust-lang/rust/issues/130765 screenshots: ![error in std](https://github.com/user-attachments/assets/2ab9bdb9-ed81-4e45-a832-ac7d3ba1be3f) ![error in core](https://github.com/user-attachments/assets/46f46182-5642-4ac5-b92e-0b99a8e2496d)
2024-09-24Rollup merge of #130793 - jieyouxu:mention-crashes-verbose, r=matthiaskrgrTrevor Gross-4/+5
Mention `COMPILETEST_VERBOSE_CRASHES` on crash test failure Fixes https://github.com/rust-lang/rust/issues/130776. r? `@matthiaskrgr` (or compiler/bootstrap)
2024-09-24Rollup merge of #130764 - compiler-errors:inherent, r=estebankTrevor Gross-19/+9
Separate collection of crate-local inherent impls from error tracking #119895 changed the return type of the `crate_inherent_impls` query from `CrateInherentImpls` to `Result<CrateInherentImpls, ErrorGuaranteed>` to avoid needing to use the non-parallel-friendly `track_errors()` to track if an error was reporting from within the query... This was mostly fine until #121113, which stopped halting compilation when we hit an `Err(ErrorGuaranteed)` in the `crate_inherent_impls` query. Thus we proceed onwards to typeck, and since a return type of `Result<CrateInherentImpls, ErrorGuaranteed>` means that the query can *either* return one of "the list inherent impls" or "error has been reported", later on when we want to assemble method or associated item candidates for inherent impls, we were just treating any `Err(ErrorGuaranteed)` return value as if Rust had no inherent impls defined anywhere at all! This leads to basically every inherent method call failing with an error, lol, which was reported in #127798. This PR changes the `crate_inherent_impls` query to return `(CrateInherentImpls, Result<(), ErrorGuaranteed>)`, i.e. returning the inherent impls collected *and* whether an error was reported in the query itself. It firewalls the latter part of that query into a new `crate_inherent_impls_validity_check` just for the `ensure()` call. This fixes #127798.
2024-09-24Auto merge of #130739 - jieyouxu:stage0_run_make, r=Kobzolbors-6/+20
Fix cargo staging for run-make tests Follow-up to https://github.com/rust-lang/rust/pull/130642#issuecomment-2366891866 to make sure that when ``` $ COMPILETEST_FORCE_STAGE0=1 ./x test run-make --stage 0 ``` is used, bootstrap cargo is used in order to avoid building stage 1 rustc. Note that run-make tests are usually not written with `--stage 0` in mind and some tests may rely on stage1 rustc (nightly) behavior, and it is expected that some tests will fail under this invocation. This PR also fixes `tool::Cargo` staging in compiletest when preparing for `run-make` test mode, by chopping off a stage from the `compiler` passed to `tool::Cargo` such that when the user invokes with stage `N` ``` ./x test run-make --stage N ``` the `run-make` test suite will be tested against the cargo built by stage `N` compiler. Let's take `N=1`, i.e. `--stage 1`, without chopping off a stage, previously `./x test run-make --stage 1` will cause stage 1 rustc + std to be built, then stage 2 rustc, and cargo will be produced by the stage 2 rustc, which is clearly not what we want. By chopping off a stage, it means that cargo will be produced by the stage 1 rustc. cc #119946, #59864. See discussions regarding the tool staging at https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.E2.9C.94.20stage1.20run-make.20tests.20now.20need.20stage2.20rustc.20built.20for.20c.2E.2E.2E.
2024-09-24Dogfood `feature(file_buffered)`Josh Stone-4/+4
2024-09-24be even more precise about "cast" vs "coercion"Lukas Markeffsky-5/+5
2024-09-24unify dyn* coercions with other pointer coercionsLukas Markeffsky-1/+1
2024-09-24elaborate on warningsNoratrieb-3/+4
2024-09-24Apply suggestions from code reviewYuri Astrakhan-1/+1
Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>
2024-09-24Clarify how to disable warnings in depsYuri Astrakhan-0/+7
2024-09-24Update compiler-src.mdTbkhi-79/+92
Various link additions and minor edits for clarity. revisions fix line length adding links minor edits
2024-09-24Update rustdoc build instructionsLeón Orell Valerian Liehr-2/+2
2024-09-24minor editsNoratrieb-23/+23
2024-09-24doc editsTbkhi-19/+17
2024-09-24Update salsa.mdTbkhi-41/+42
Formatting updates.
2024-09-24Update memory.mdTbkhi-19/+33
Minor updates to formatting. documentation updates Update memory.md minor edits
2024-09-24minor editsNoratrieb-13/+12
2024-09-24updates documentationTbkhi-37/+57
2024-09-24Update serialization.mdTbkhi-25/+26
Minor documentation updates.
2024-09-24improve rustc-driver.mdTbkhi-50/+55
minor addition and adding links Update rustc-driver.md removing parens for functions reorganized directory reorganized directory minor edits
2024-09-24minor editsNoratrieb-13/+12
2024-09-24Update syntax-intro.mdTbkhi-8/+15
2024-09-24minor editsNoratrieb-19/+17
2024-09-24Update the-parser.mdTbkhi-2/+2
2024-09-24Update the-parser.mdTbkhi-39/+45
2024-09-24rustdoc: inherit parent's stability where applicableLukas Markeffsky-1/+39
2024-09-24Minor editsNoratrieb-133/+133
2024-09-24Update macro-expansion.mdTbkhi-1/+1
2024-09-24Update macro-expansion.mdTbkhi-1/+1
2024-09-24additional changes to links and some textTbkhi-120/+121
2024-09-24Update macro-expansion.mdTbkhi-7/+7
removing parens
2024-09-24Update macro-expansion.mdTbkhi-176/+187
2024-09-24Use 2021 edition for example code playground linkNoah Lev-1/+1
The playground defaults to 2015. Might as well use the latest edition.
2024-09-24Move example code block to paragraph referencing itNoah Lev-6/+6
Noticed by Mario Carneiro.
2024-09-24Minor editsNoratrieb-17/+17
- un-codeblock some words - uncomment the last paragraph (it's useful to know this)
2024-09-24Update name-resolution.mdTbkhi-1/+1
2024-09-24Update name-resolution.mdTbkhi-47/+59
2024-09-24feat: Add section about partial clones with `git clone --filter='blob:none'`Felix Rath-4/+24
2024-09-24mention rustc's stable-through-unstable bug being fixeddianne-4/+6
2024-09-24Fix `is_diagnostic_item()` exampletrevyn-1/+1