about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-07-05Improve code of `run-make/llvm-ident` testGuillaume Gomez-1/+1
2024-07-05Improve `Command::args` API in `run-make-support`Guillaume Gomez-2/+3
2024-07-03Auto merge of #127258 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 23 commits in 4ed7bee47f7dd4416b36fada1909e9a62c546246..a515d463427b3912ec0365d106791f88c1c14e1b 2024-06-25 16:28:22 +0000 to 2024-07-02 20:53:36 +0000 - test: migrate rust_version and rustc* to snapbox (rust-lang/cargo#14177) - test: mirgate fix* and future_incompat_report to snapbox (rust-lang/cargo#14173) - test:migrate `edition/error` to snapbox (rust-lang/cargo#14175) - chore(deps): update compatible (rust-lang/cargo#14174) - refactor(source): Clean up after PathSource/RecursivePathSource split (rust-lang/cargo#14169) - test: Migrate some files to snapbox (rust-lang/cargo#14132) - test: fix several assertions (rust-lang/cargo#14167) - test: replace glob with explicit unordered calls (rust-lang/cargo#14166) - Make it clear that `CARGO_CFG_TARGET_FAMILY` is multi-valued (rust-lang/cargo#14165) - Document `CARGO_CFG_TARGET_ABI` (rust-lang/cargo#14164) - test: Migrate git to snapbox (rust-lang/cargo#14159) - test: migrate some files to snapbox (rust-lang/cargo#14158) - test: migrate registry and registry_auth to snapbox (rust-lang/cargo#14149) - gix: remove `revision` feature from cargo (rust-lang/cargo#14160) - test: migrate package* and publish* to snapbox (rust-lang/cargo#14130) - More `update --breaking` tests (rust-lang/cargo#14049) - test: migrate clean to snapbox (rust-lang/cargo#14096) - Allow `unexpected_builtin_cfgs` lint in `user_specific_cfgs` test (rust-lang/cargo#14153) - test: migrate search, source_replacement and standard_lib to snapbox (rust-lang/cargo#14151) - Docs: Update config summary to include missing keys. (rust-lang/cargo#14145) - test: migrate `dep_info/diagnostics/direct_minimal_versions` to snapbox (rust-lang/cargo#14143) - Docs: Remove duplicate `strip` section. (rust-lang/cargo#14146) - Docs: Fix curly quotes in config docs. (rust-lang/cargo#14144)
2024-07-03Auto merge of #123737 - compiler-errors:alias-wf, r=lcnrbors-9/+23
Check alias args for WF even if they have escaping bound vars #### What This PR stops skipping arguments of aliases if they have escaping bound vars, instead recursing into them and only discarding the resulting obligations referencing bounds vars. #### An example: From the test: ``` trait Trait { type Gat<U: ?Sized>; } fn test<T>(f: for<'a> fn(<&'a T as Trait>::Gat<&'a [str]>)) where for<'a> &'a T: Trait {} //~^ ERROR the size for values of type `[()]` cannot be known at compilation time fn main() {} ``` We now prove that `str: Sized` in order for `&'a [str]` to be well-formed. We were previously unconditionally skipping over `&'a [str]` as it referenced a buond variable. We now recurse into it and instead only discard the `[str]: 'a` obligation because of the escaping bound vars. #### Why? This is a change that improves consistency about proving well-formedness earlier in the pipeline, which is necessary for future work on where-bounds in binders and correctly handling higher-ranked implied bounds. I don't expect this to fix any unsoundness. #### What doesn't it fix? Specifically, this doesn't check projection predicates' components are well-formed, because there are too many regressions: https://github.com/rust-lang/rust/pull/123737#issuecomment-2052198478
2024-07-02Update cargoWeihang Lo-0/+0
2024-07-03Auto merge of #123720 - amandasystems:dyn-enable-refactor, r=nikomatsakisbors-73/+140
Rewrite handling of universe-leaking placeholder regions into outlives constraints This commit prepares for Polonius by moving handling of leak check/universe errors out of the inference step by rewriting any universe error into an outlives-static constraint. This variant is a work in progress but seems to pass most tests. Note that a few debug assertions no longer hold; a few extra eyes on those changes are appreciated!
2024-07-02Auto merge of #127244 - matthiaskrgr:rollup-px1vahe, r=matthiaskrgrbors-541/+1296
Rollup of 10 pull requests Successful merges: - #126883 (Parenthesize break values containing leading label) - #127136 (Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references) - #127146 (Uplift fast rejection to new solver) - #127152 (Bootstrap: Try renaming the file if removing fails) - #127168 (Use the aligned size for alloca at args/ret when the pass mode is cast) - #127203 (Fix import suggestion error when path segment failed not from starting) - #127212 (Update books) - #127224 (Make `FloatTy` checks exhaustive in pretty print) - #127230 (chore: remove duplicate words) - #127243 (Add test for adt_const_params) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-02Auto merge of #127152 - ChrisDenton:rename, r=onur-ozkanbors-1/+9
Bootstrap: Try renaming the file if removing fails Second attempt at working around https://github.com/rust-lang/rust/issues/127126 If we can't remove the file, then try renaming it. This will leave the destination path free to use. try-job: x86_64-msvc-ext
2024-07-02Rollup merge of #127243 - BoxyUwU:new_invalid_const_param_ty_test, ↵Matthias Krüger-0/+69
r=compiler-errors Add test for adt_const_params Fixes #84238 r? `@compiler-errors`
2024-07-02Rollup merge of #127230 - hattizai:patch01, r=saethlinMatthias Krüger-26/+26
chore: remove duplicate words remove duplicate words in comments to improve readability.
2024-07-02Rollup merge of #127224 - tgross35:pretty-print-exhaustive, r=RalfJungMatthias Krüger-16/+18
Make `FloatTy` checks exhaustive in pretty print This should prevent the default fallback if we add more float types in the future.
2024-07-02Rollup merge of #127212 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 2 commits in 45c1a6d69edfd1fc91fb7504cb73958dbd09441e..f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64 2024-06-25 21:12:15 UTC to 2024-06-20 16:10:32 UTC - Update ch10-00-generics.md (rust-lang/book#3963) - infra: ignore Nova configuration directory (rust-lang/book#3962) ## rust-lang/edition-guide 3 commits in cb58c430b4e8054c2cb81d2d4434092c482a93d8..941db8b3df45fd46cd87b50a5c86714b91dcde9c 2024-06-30 19:26:27 UTC to 2024-06-20 18:43:18 UTC - Add a section for the never type change in e2024 (rust-lang/edition-guide#310) - Add 2024 unsafe attributes. (rust-lang/edition-guide#308) - Add 2024 unsafe extern blocks. (rust-lang/edition-guide#309) ## rust-lang/reference 7 commits in 0b805c65804019b0ac8f2fe3117afad82a6069b8..1ae3deebc3ac16e276b6558e01420f8e605def08 2024-06-29 16:59:51 UTC to 2024-06-18 22:16:37 UTC - Provide an example of `target_family` being multi-valued (rust-lang/reference#1518) - Remove stubs needed for the link checker. (rust-lang/reference#1517) - Document new `#[expect]` attribute and `reasons` parameter (RFC 2383) (rust-lang/reference#1237) - Update recognized tool attributes (rust-lang/reference#1498) - Add example of 1-ary tuple type (rust-lang/reference#1514) - underscore-expr: add more examples (rust-lang/reference#1478) - Remove outdated info about impl Trait in parameters and generics in the same function (rust-lang/reference#1495) ## rust-lang/rust-by-example 4 commits in b1d97bd6113aba732b2091ce093c76f2d05bb8a0..658c6c27cb975b92227936024816986c2d3716fb 2024-06-30 11:58:29 UTC to 2024-06-30 11:52:38 UTC - Remove awkward match in if_let (rust-lang/rust-by-example#1725) - Edit grammatical mistake (rust-lang/rust-by-example#1830) - Update paragraph in src/fn/diverging.md (rust-lang/rust-by-example#1853) - Fix minor typo in from_into.md (rust-lang/rust-by-example#1854) ## rust-lang/rustc-dev-guide 11 commits in aec82168dd3121289a194b381f56076fc789a4d2..d6e3a32a557db5902e714604def8015d6bb7e0f7 2024-07-01 10:51:26 UTC to 2024-06-18 18:24:17 UTC - Update new target check-cfg instructions (rust-lang/rustc-dev-guide#2006) - Add Rust for Linux integration tests documentation (rust-lang/rustc-dev-guide#2004) - Add docs for building Fuchsia locally and in CI (rust-lang/rustc-dev-guide#1989) - provide `libstdc++.so.6` through `LD_LIBRARY_PATH` (rust-lang/rustc-dev-guide#1999) - Document how to run `run-make` tests on Windows (rust-lang/rustc-dev-guide#2002) - Document `needs-symlink` directive (rust-lang/rustc-dev-guide#2001) - Rename `wasm32-wasi` to `wasm32-wasip1` (rust-lang/rustc-dev-guide#1678) - Document inert vs active attributes (rust-lang/rustc-dev-guide#1110) - Document hard-resetting submodules (rust-lang/rustc-dev-guide#2000) - Fix note about compiletest header `rustfix-only-machine-applicable` (rust-lang/rustc-dev-guide#1998) - Mention `RUSTC_ICE=0` to suppress ICE file (rust-lang/rustc-dev-guide#1997)
2024-07-02Rollup merge of #127203 - chenyukang:yukang-fix-120074-import, r=NadrierilMatthias Krüger-1/+45
Fix import suggestion error when path segment failed not from starting Fixes #120074
2024-07-02Rollup merge of #127168 - DianQK:cast-size, r=workingjubileeMatthias Krüger-35/+377
Use the aligned size for alloca at args/ret when the pass mode is cast Fixes #75839. Fixes #121028. The `load` and `store` instructions in LLVM access the aligned size. For example, `load { i64, i32 }` accesses 16 bytes on x86_64: https://alive2.llvm.org/ce/z/n8CHAp. BTW, this example is expected to be optimized to immediate UB by Alive2: https://rust.godbolt.org/z/b7xK7hv1c and https://alive2.llvm.org/ce/z/vZDtZH. r? compiler
2024-07-02Rollup merge of #127152 - ChrisDenton:rename, r=onur-ozkanMatthias Krüger-1/+9
Bootstrap: Try renaming the file if removing fails Second attempt at working around https://github.com/rust-lang/rust/issues/127126 If we can't remove the file, then try renaming it. This will leave the destination path free to use. try-job: x86_64-msvc-ext
2024-07-02Rollup merge of #127146 - compiler-errors:fast-reject, r=lcnrMatthias Krüger-402/+419
Uplift fast rejection to new solver Self explanatory. r? lcnr
2024-07-02Rollup merge of #127136 - compiler-errors:coroutine-closure-env-shim, r=oli-obkMatthias Krüger-58/+225
Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references I adjusted async closures to be able to implement `Fn` and `FnMut` *even if* they capture references, as long as those references did not need to borrow data from the closure captures themselves. See #125259. However, when I did this, I didn't actually relax an assertion in the `build_construct_coroutine_by_move_shim` shim code, which builds the `Fn`/`FnMut`/`FnOnce` implementations for async closures. Therefore, if we actually tried to *call* `FnMut`/`Fn` on async closures, it would ICE. This PR adjusts this assertion to ensure that we only capture immutable references in closures if they implement `Fn`/`FnMut`. It also adds a bunch of tests and makes more of the async-closure tests into `build-pass` since we often care about these tests actually generating the right closure shims and stuff. I think it might be excessive to *always* use build-pass here, but 🤷 it's not that big of a deal. Fixes #127019 Fixes #127012 r? oli-obk
2024-07-02Rollup merge of #126883 - dtolnay:breakvalue, r=fmeaseMatthias Krüger-3/+117
Parenthesize break values containing leading label The AST pretty printer previously produced invalid syntax in the case of `break` expressions with a value that begins with a loop or block label. ```rust macro_rules! expr { ($e:expr) => { $e }; } fn main() { loop { break expr!('a: loop { break 'a 1; } + 1); }; } ``` `rustc -Zunpretty=expanded main.rs `: ```console #![feature(prelude_import)] #![no_std] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; macro_rules! expr { ($e:expr) => { $e }; } fn main() { loop { break 'a: loop { break 'a 1; } + 1; }; } ``` The expanded code is not valid Rust syntax. Printing invalid syntax is bad because it blocks `cargo expand` from being able to format the output as Rust syntax using rustfmt. ```console error: parentheses are required around this expression to avoid confusion with a labeled break expression --> <anon>:9:26 | 9 | fn main() { loop { break 'a: loop { break 'a 1; } + 1; }; } | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: wrap the expression in parentheses | 9 | fn main() { loop { break ('a: loop { break 'a 1; }) + 1; }; } | + + ``` This PR updates the AST pretty-printer to insert parentheses around the value of a `break` expression as required to avoid this edge case.
2024-07-02Add testBoxy-0/+69
2024-07-02Auto merge of #127232 - tgross35:netbsd-cdn-workaround, r=Kobzolbors-12/+42
Change to the NetBSD archive URL rather than the CDN The CDN has been down for a few hours. Switch to an alternative for the time being so we can unblock CI. It appears that the CDN is quite a bit faster, so we will likely want to switch back when available. Context: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/dist-x86_64-netbsd.20is.20borked try-job: dist-x86_64-netbsd
2024-07-02Change to the NetBSD archive URL rather than the CDNTrevor Gross-12/+42
The CDN has been down for a few hours. Switch to an alternative for the time being so we can unblock CI. It appears that the CDN is quite a bit faster, so we will likely want to switch back when available.
2024-07-02Use `cfg!(windows)`Chris Denton-1/+1
2024-07-02chore: remove duplicate wordshattizai-26/+26
2024-07-01Parenthesize break values containing leading labelDavid Tolnay-5/+86
2024-07-02Use the aligned size for alloca at ret when the pass mode is cast.DianQK-16/+34
2024-07-02Use the aligned size for alloca at args when the pass mode is cast.DianQK-31/+21
The `load` and `store` instructions in LLVM access the aligned size.
2024-07-02Add the definition for `extern "C"` at `cast-target-abi.rs`.DianQK-24/+358
2024-07-01Make `FloatTy` checks exhaustive in pretty printTrevor Gross-16/+18
This should prevent the default fallback if we add more float types in the future.
2024-07-01Auto merge of #126941 - GuillaumeGomez:migrate-run-make-llvm-ident, r=Kobzolbors-20/+48
Migrate `run-make/llvm-ident` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? `@Kobzol` try-job: armhf-gnu
2024-07-01Auto merge of #127216 - GuillaumeGomez:rollup-iw9f2ed, r=GuillaumeGomezbors-521/+528
Rollup of 8 pull requests Successful merges: - #126732 (Stabilize `PanicInfo::message()` and `PanicMessage`) - #126753 (Add nightly style guide section for `precise_capturing` `use<>` syntax) - #126832 (linker: Refactor interface for passing arguments to linker) - #126880 (Migrate `volatile-intrinsics`, `weird-output-filenames`, `wasm-override-linker`, `wasm-exceptions-nostd` to `rmake`) - #127128 (Stabilize `duration_abs_diff`) - #127129 (Use full expr span for return suggestion on type error/ambiguity) - #127188 ( improve the way bootstrap handles rustlib components) - #127201 (Improve run-make-support API) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-01Rollup merge of #127201 - GuillaumeGomez:improve-run-make-support, r=KobzolGuillaume Gomez-14/+22
Improve run-make-support API I think I'll slowly continue this work. Makes things a bit nicer for contributors, so why not. :D r? ``@Kobzol``
2024-07-01Rollup merge of #127188 - onur-ozkan:rustc-src-fix, r=KobzolGuillaume Gomez-28/+31
improve the way bootstrap handles rustlib components When CI rustc is enabled, bootstrap tries to symlink the rust source (project root) into target sysroot right before copying it from the CI rustc's sysroot. This becomes a problem in CI builders (which we currently don't see because they don't use CI rustc) because the copying part will fail as [they run on read-only mode](https://github.com/rust-lang/rust/blob/ef3d6fd7002500af0a985f70d3ac5152623c1396/src/ci/docker/run.sh#L233). This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking `rustc-src` from the rust source when download-rustc is not enabled. r? ``@Kobzol`` (we talked about this already on Zulip, he knows the context) Blocker for https://github.com/rust-lang/rust/pull/122709
2024-07-01Rollup merge of #127129 - compiler-errors:full-expr-span, r=jieyouxuGuillaume Gomez-16/+56
Use full expr span for return suggestion on type error/ambiguity We sometimes use parts of an expression rather than the whole thing for an obligation span. For example, a method obligation will just point to the path segment corresponding to the `method` in `rcvr.method(args)`. So let's not use that assuming it'll point to the *whole* expression span, which we can access from the expr hir id we store in `ObligationCauseCode::WhereClauseInExpr`. Fixes #127109
2024-07-01Rollup merge of #127128 - elomatreb:elomatreb/stabilize-duration_abs_diff, ↵Guillaume Gomez-3/+3
r=joboet Stabilize `duration_abs_diff` Stabilize `duration_abs_diff` following FCP in #117618. Closes #117618.
2024-07-01Rollup merge of #126880 - Rejyr:migrate-rmake-vw, r=KobzolGuillaume Gomez-69/+80
Migrate `volatile-intrinsics`, `weird-output-filenames`, `wasm-override-linker`, `wasm-exceptions-nostd` to `rmake` Also refactors `wasm-abi` and `compressed-debuginfo`. Part of #121876. r? ``@jieyouxu`` try-job: x86_64-gnu-debug try-job: dist-various-2
2024-07-01Rollup merge of #126832 - petrochenkov:linkarg, r=jieyouxuGuillaume Gomez-383/+318
linker: Refactor interface for passing arguments to linker Separate arguments into passed to the underlying linker, to cc wrapper, or supported by both. Also avoid allocations in all the argument passing functions. The interfaces would look nicer if not the limitations on returning `&mut Self` in `dyn`-compatible traits, and unnecessary conflicts between `Trait` and `dyn Trait` methods. try-job: armhf-gnu try-job: aarch64-gnu try-job: dist-x86_64-linux try-job: x86_64-msvc try-job: i686-msvc try-job: dist-x86_64-apple try-job: test-various
2024-07-01Rollup merge of #126753 - compiler-errors:use-style-guide, ↵Guillaume Gomez-0/+12
r=joshtriplett,calebcartwright Add nightly style guide section for `precise_capturing` `use<>` syntax r? style Tracking: - https://github.com/rust-lang/rust/issues/123432
2024-07-01Rollup merge of #126732 - StackOverflowExcept1on:master, r=m-ou-seGuillaume Gomez-8/+6
Stabilize `PanicInfo::message()` and `PanicMessage` Resolves #66745 This stabilizes the [`PanicInfo::message()`](https://doc.rust-lang.org/nightly/core/panic/struct.PanicInfo.html#method.message) and [`PanicMessage`](https://doc.rust-lang.org/nightly/core/panic/struct.PanicMessage.html). Demonstration of [custom panic handler](https://github.com/StackOverflowExcept1on/panicker): ```rust #![no_std] #![no_main] extern crate libc; #[no_mangle] extern "C" fn main() -> libc::c_int { panic!("I just panic every time"); } #[panic_handler] fn my_panic(panic_info: &core::panic::PanicInfo) -> ! { use arrayvec::ArrayString; use core::fmt::Write; let message = panic_info.message(); let location = panic_info.location().unwrap(); let mut debug_msg = ArrayString::<1024>::new(); let _ = write!(&mut debug_msg, "panicked with '{message}' at '{location}'"); if debug_msg.try_push_str("\0").is_ok() { unsafe { libc::puts(debug_msg.as_ptr() as *const _); } } unsafe { libc::exit(libc::EXIT_FAILURE) } } ``` ``` $ cargo +stage1 run --release panicked with 'I just panic every time' at 'src/main.rs:8:5' ``` - [x] FCP: https://github.com/rust-lang/rust/issues/66745#issuecomment-2198143725 r? libs-api
2024-07-01Update booksrustbot-0/+0
2024-07-01Auto merge of #127113 - scottmcm:retune-inlining-again, r=oli-obkbors-845/+385
Avoid MIR bloat in inlining In #126578 we ended up with more binary size increases than expected. This change attempts to avoid inlining large things into small things, to avoid that kind of increase, in cases when top-down inlining will still be able to do that inlining later. r? ghost
2024-07-01Migrate `run-make/llvm-ident` to `rmake.rs`Guillaume Gomez-20/+41
2024-07-01Add `input_file` method on `LlvmFileCheck`Guillaume Gomez-0/+7
2024-07-01Avoid MIR bloat in inliningScott McMurray-845/+385
In 126578 we ended up with more binary size increases than expected. This change attempts to avoid inlining large things into small things, to avoid that kind of increase, in cases when top-down inlining will still be able to do that inlining later.
2024-07-01Fix import suggestion error when failed not from startingyukang-1/+45
2024-07-01linker: Bail out of rpath logic early if the target doesn't support rpathVadim Petrochenkov-10/+4
2024-07-01linker: Refactor interface for passing arguments to linkerVadim Petrochenkov-373/+314
2024-07-01fail on component linking errorsonur-ozkan-3/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-07-01improve the way bootstrap handles rustlib componentsonur-ozkan-26/+26
When CI rustc is enabled, bootstrap tries to symlink the rust source (project root) into target sysroot right before copying it from the CI rustc's sysroot. This becomes a problem in CI builders (which we currently don't see because they don't use CI rustc) because the copying part will fail as they run on read-only mode. This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking `rustc-src` from the rust source when download-rustc is not enabled. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-07-01Add description for why this PR was madeAmanda Stjerna-3/+25
2024-07-01Code review: rename the method `min_universe()`Amanda Stjerna-7/+9