about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-05-06Rollup merge of #111246 - lcnr:no-escaping-bound-vars, r=compiler-errorsYuki Okushi-131/+46
forbid escaping bound vars in combine removes the `CollectAllMismatches` in favor of a slightly more manual approach. r? types cc ``@estebank``
2023-05-06Rollup merge of #111239 - TaKO8Ki:fix-111232, r=compiler-errorsYuki Okushi-1/+22
Remove unnecessary attribute from a diagnostic Fixes #111232 ref: https://github.com/rust-lang/rust/commit/06ff310cf95349da078e4cac0c5377172766fa94
2023-05-06Rollup merge of #111139 - ↵Yuki Okushi-1/+5
fortanix:raoul/fix_mxcsr_configuration_dependent_timing, r=thomcc Fix MXCSR configuration dependent timing Dependent on the (potentially secret) data some vector instructions operate on, and the content in MXCSR, instruction retirement may be delayed by one cycle. This is a potential side channel. This PR fixes this vulnerability for the `x86_64-fortanix-unknown-sgx` platform by loading MXCSR with `0x1fbf` through an `xrstor` instruction when the enclave is entered and executing an `lfence` immediately after. Other changes of the MXCSR happen only when the enclave is about to be exited and no vector instructions will be executed before it will actually do so. Users of EDP who change the MXCSR and do wish to defend against this side channel, will need to implement the software mitigation described [here](https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/best-practices/mxcsr-configuration-dependent-timing.html). cc: `@jethrogb` `@monokles`
2023-05-06Rollup merge of #110830 - Freaky:freebsd-cpuset, r=thomccYuki Okushi-0/+19
Add FreeBSD cpuset support to `std::thread::available_concurrency` Use libc::cpuset_getaffinity to determine the CPUs available to the current process. The existing sysconf and sysctl paths are left as fallback.
2023-05-06Rollup merge of #110780 - notriddle:notriddle/slice-index, r=GuillaumeGomezYuki Okushi-2/+109
rustdoc-search: add slices and arrays to index This indexes them as primitives with generics, so `slice<u32>` is how you search for `[u32]`, and `array<u32>` for `[u32; 1]`. A future commit will desugar the square bracket syntax to search both arrays and slices at once.
2023-05-06Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wesleywiserYuki Okushi-223/+146
Stabilize raw-dylib, link_ordinal, import_name_type and -Cdlltool This stabilizes the `raw-dylib` feature (#58713) for all architectures (i.e., `x86` as it is already stable for all other architectures). Changes: * Permit the use of the `raw-dylib` link kind for x86, the `link_ordinal` attribute and the `import_name_type` key for the `link` attribute. * Mark the `raw_dylib` feature as stable. * Stabilized the `-Zdlltool` argument as `-Cdlltool`. * Note the path to `dlltool` if invoking it failed (we don't need to do this if `dlltool` returns an error since it prints its path in the error message). * Adds tests for `-Cdlltool`. * Adds tests for being unable to find the dlltool executable, and dlltool failing. * Fixes a bug where we were checking the exit code of dlltool to see if it failed, but dlltool always returns 0 (indicating success), so instead we need to check if anything was written to `stderr`. NOTE: As previously noted (https://github.com/rust-lang/rust/pull/104218#issuecomment-1315895618) using dlltool within rustc is temporary, but this is not the first time that Rust has added a temporary tool use and argument: https://github.com/rust-lang/rust/pull/104218#issuecomment-1318720482 Big thanks to ``````@tbu-`````` for the first version of this PR (#104218)
2023-05-05Auto merge of #111258 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 10 commits in ac84010322a31f4a581dafe26258aa4ac8dea9cd..569b648b5831ae8a515e90c80843a5287c3304ef 2023-05-02 13:41:16 +0000 to 2023-05-05 15:49:44 +0000 - xtask-unpublished: output a markdown table (rust-lang/cargo#12085) - fix: hack around `libsysroot` instead of `libtest` (rust-lang/cargo#12088) - Optimize usage under rustup. (rust-lang/cargo#11917) - Update lock to normalize `home` dep (rust-lang/cargo#12084) - fix: doc-test failures (rust-lang/cargo#12055) - feat(cargo-metadata): add `workspace_default_members` (rust-lang/cargo#11978) - doc: clarify implications of `cargo-yank` (rust-lang/cargo#11862) - chore: Use `[workspace.dependencies]` (rust-lang/cargo#12057) - support for shallow clones and fetches with `gitoxide` (rust-lang/cargo#11840) - Build by PackageIdSpec, not name, to avoid ambiguity (rust-lang/cargo#12015) r? `@ghost`
2023-05-05Update cargoWeihang Lo-0/+0
2023-05-05Auto merge of #111248 - Dylan-DPC:rollup-lbp0ui3, r=Dylan-DPCbors-524/+1164
Rollup of 6 pull requests Successful merges: - #103056 (Fix `checked_{add,sub}_duration` incorrectly returning `None` when `other` has more than `i64::MAX` seconds) - #108801 (Implement RFC 3348, `c"foo"` literals) - #110773 (Reduce MIR dump file count for MIR-opt tests) - #110876 (Added default target cpu to `--print target-cpus` output and updated docs) - #111068 (Improve check-cfg implementation) - #111238 (btree_map: `Cursor{,Mut}::peek_prev` must agree) Failed merges: - #110694 (Implement builtin # syntax and use it for offset_of!(...)) r? `@ghost` `@rustbot` modify labels: rollup
2023-05-05Rollup merge of #111238 - workingjubilee:fix-btree-cursormut-peek-prev, ↵Dylan DPC-2/+21
r=Amanieu btree_map: `Cursor{,Mut}::peek_prev` must agree Our `Cursor::peek_prev` and `CursorMut::peek_prev` must agree on how to behave when they are called on the "null element". This will fix rust-lang#111228. r? `@Amanieu`
2023-05-05Rollup merge of #111068 - Urgau:check-cfg-improvements, r=petrochenkovDylan DPC-236/+420
Improve check-cfg implementation This PR makes multiple improvements into the implementation of check-cfg, it is a prerequisite to a follow-up PR that will introduce a simpler and more explicit syntax. The 2 main area of improvements are: 1. Internal representation of expected values: - now uses `FxHashSet<Option<Symbol>>` instead of `FxHashSet<Symbol>`, it made the no value expected case only possible when no values where in the `HashSet` which is now represented as `None` (same as cfg represent-it). - a enum with `Some` and `Any` makes it now clear if some values are expected or not, necessary for `feature` and `target_feature`. 2. Diagnostics: Improve the diagnostics in multiple case and fix case where a missing value could have had a new name suggestion instead of the value diagnostic; and some drive by improvements I highly recommend reviewing commit by commit. r? `@petrochenkov`
2023-05-05Rollup merge of #110876 - mj10021:issue-110647-fix, r=b-naberDylan DPC-7/+24
Added default target cpu to `--print target-cpus` output and updated docs Added default target cpu info as requested in issue #110647 and noted the new output in the documentation
2023-05-05Rollup merge of #110773 - mj10021:issue-109502-fix, r=oli-obkDylan DPC-102/+164
Reduce MIR dump file count for MIR-opt tests As referenced in issue #109502 , mir-opt tests previously used the -Zdump-mir=all flag, which generates very large output. This PR only dumps the passes under test, greatly reducing dump output.
2023-05-05Rollup merge of #108801 - fee1-dead-contrib:c-str, r=compiler-errorsDylan DPC-153/+500
Implement RFC 3348, `c"foo"` literals RFC: https://github.com/rust-lang/rfcs/pull/3348 Tracking issue: #105723
2023-05-05Rollup merge of #103056 - beetrees:timespec-bug-fix, r=thomccDylan DPC-24/+35
Fix `checked_{add,sub}_duration` incorrectly returning `None` when `other` has more than `i64::MAX` seconds Use `checked_{add,sub}_unsigned` in `checked_{add,sub}_duration` so that the correct result is returned when adding/subtracting durations with more than `i64::MAX` seconds.
2023-05-05Auto merge of #111113 - scottmcm:assume-align-offset, r=thomccbors-4/+89
`assume` the runtime range of `align_offset` Found when I saw code with `align_to` having extraneous checks. Demo that LLVM can't do this today: <https://rust.godbolt.org/z/6dnG749bq> (It's filed as https://github.com/llvm/llvm-project/issues/62502.)
2023-05-05forbid escaping bound vars in combinelcnr-131/+46
removes the `CollectAllMismatches` in favor of a slightly more manual approach.
2023-05-05`assume` the runtime range of `align_offset`Scott McMurray-4/+89
Found when I saw code with `align_to` having extraneous checks.
2023-05-05Improve check-cfg diagnostics (part 2)Urgau-47/+192
2023-05-05Improve check-cfg diagnostics (part 1)Urgau-38/+40
2023-05-05Improve internal representation of check-cfgUrgau-153/+173
This is done to simplify to relationship between names() and values() but also make thing clearer (having an Any to represent that any values are allowed) but also to allow the (none) + values expected cases that wasn't possible before.
2023-05-05Use explicit instead of implicit control-flow for check-cfg parsingUrgau-23/+40
2023-05-05remove unnecessary attribute from a diagnosticTakayuki Maeda-1/+22
2023-05-05Auto merge of #111236 - RalfJung:miri-sysroot, r=RalfJungbors-2/+2
bump rustc-build-sysroot to fix miri sysroot build Fixes https://github.com/rust-lang/miri/issues/2874
2023-05-04btree_map: `Cursor{,Mut}::peek_prev` must agreeJubilee Young-2/+21
Our `Cursor::peek_prev` and `CursorMut::peek_prev` must agree on how to behave when they are called on the "null element".
2023-05-05bump rustc-build-sysroot to fix miri sysroot buildRalf Jung-2/+2
2023-05-05Auto merge of #111231 - JohnTitor:rollup-a25ff8v, r=JohnTitorbors-316/+238
Rollup of 8 pull requests Successful merges: - #110946 (avoid duplicating TLS state between test std and realstd) - #110954 (Reject borrows of projections in ConstProp.) - #111052 (Fix problems with backtraces in two ui tests.) - #111132 (cleanup nll generalizer) - #111173 (Still more encoder cleanups) - #111187 (bootstrap: add llvm-project/runtimes to the sources) - #111213 (Fixup "since" dates for `array_tuple_conv` feature) - #111223 (Use `free-args` consistently in bootstrap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-05-05Rollup merge of #111223 - jyn514:free-args, r=clubby789Yuki Okushi-28/+30
Use `free-args` consistently in bootstrap Previously, this was only passed to miri and compiletest. Extended it to all other tests and binaries as well. cc https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Running.20a.20single.20doctest r? `@clubby789`
2023-05-05Rollup merge of #111213 - WaffleLapkin:fixup_dates, r=scottmcmYuki Okushi-2/+2
Fixup "since" dates for `array_tuple_conv` feature Fixes a mistake from #97594
2023-05-05Rollup merge of #111187 - krasimirgg:llvm-runtimes, r=jyn514Yuki Okushi-0/+2
bootstrap: add llvm-project/runtimes to the sources This is needed to build libunwind for LLVM 16: https://discourse.llvm.org/t/runtimes-removed-support-for-llvm-enable-projects-in-libcxx-libcxxabi-and-libunwind/65707 Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/missing.20llvm-project.2Fruntimes.20in.20beta.20srcs Checked by running `x.py dist` and verifying the produced source archive (build/dist/rustc-1.71.0-dev-src.tar.gz) contains the new directory.
2023-05-05Rollup merge of #111173 - nnethercote:still-more-Encoder-cleanups, r=cjgillotYuki Okushi-127/+59
Still more encoder cleanups r? ``@cjgillot``
2023-05-05Rollup merge of #111132 - lcnr:nll-generalize, r=b-naberYuki Okushi-113/+20
cleanup nll generalizer followup to #108861
2023-05-05Rollup merge of #111052 - nnethercote:fix-ice-test, r=NilstriebYuki Okushi-20/+23
Fix problems with backtraces in two ui tests. `default-backtrace-ice.rs` started started failing for me recently, because on my Ubuntu 23.04 system there are 100 stack frames, and the current stack filtering pattern doesn't match on a stack frame with a three digit number. `issue-86800.rs` can also be improved, backtrace-wise. r? `@Nilstrieb`
2023-05-05Rollup merge of #110954 - cjgillot:const-prop-ref, r=wesleywiserYuki Okushi-9/+80
Reject borrows of projections in ConstProp. Fixes https://github.com/rust-lang/rust/issues/110947
2023-05-05Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-seYuki Okushi-17/+22
avoid duplicating TLS state between test std and realstd This basically re-lands https://github.com/rust-lang/rust/pull/100201 and https://github.com/rust-lang/rust/pull/106638, which got reverted by https://github.com/rust-lang/rust/pull/110861. This works around 2 Miri limitations: - Miri doesn't support the magic linker section that our Windows TLS support relies on, and instead knows where in std to find the symbol that stores the thread callback. - For macOS, Miri only supports at most one destructor to be registered per thread. The 2nd would not be very hard to fix (though the intended destructor order is unclear); the first would be a lot of work to fix. Neither of these is a problem for regular Rust code, but in the std test suite we have essentially 2 copies of the std code and then these both become issues. To avoid that we have the std test crate import the TLS code from the real std instead of having its own copy. r? ``````@m-ou-se``````
2023-05-04added SAFETY commentJames Dietz-0/+3
2023-05-04change expect() to unwrap_or_else() and update msgJames Dietz-3/+7
2023-05-04moved default CPU message inlineJames Dietz-15/+11
2023-05-04`--print target-cpus` shows default target cpu, updated docsJames Dietz-4/+18
2023-05-04add passes to miroptfiles struct and passed to -zdump-mir argsJames Dietz-102/+164
blessed new test
2023-05-04Use `free-args` consistently in bootstrapjyn-28/+30
Previously, this was only passed to miri and compiletest. Extended it to all other tests and binaries as well.
2023-05-04Reject borrows of projections in ConstProp.Camille GILLOT-19/+22
2023-05-04Add tests.Camille GILLOT-0/+68
2023-05-05Improve filtering in `default-backtrace-ice.rs`.Nicholas Nethercote-1/+18
This test is supposed to ensure that full backtraces are used for ICEs. But it doesn't actually do that -- the filtering done cannot distinguish between a full backtrace versus a short backtrace. So this commit changes the filtering to preserve the existence of `__rust_{begin,end}_short_backtrace` markers, which only appear in full backtraces. This change means the test now tests what it is supposed to test. Also, the existing filtering included a rule that excluded any line starting with two spaces. This was too strong because it filtered out some parts of the error message. (This was not a showstopper). It was also not strong enough because it didn't work with three digit stack frame numbers, which just started seeing after upgrading my Ubuntu distro to 23.04 machine (this *was* a showstopper). So the commit replaces that rule with two more precise rules, one for lines with stack frame numbers, and one for "at ..." lines.
2023-05-05Don't print backtrace on ICEs in `issue-86800.rs`.Nicholas Nethercote-19/+5
Because it then just has to be filtered out. This change makes this test more like these other tests: - tests/ui/treat-err-as-bug/err.rs - tests/ui/treat-err-as-bug/delay_span_bug.rs - tests/ui/mir/validate/storage-live.rs - tests/ui/associated-inherent-types/bugs/ice-substitution.rs - tests/ui/layout/valid_range_oob.rs
2023-05-04Auto merge of #111014 - klensy:no-rc, r=WaffleLapkinbors-28/+24
try to downgrade Arc -> Lrc -> Rc -> no-Rc in few places Expecting this be not slower on non-parallel compiler and probably faster on parallel (checked that this PR builds on it).
2023-05-04Fixup "since" dates for `array_tuple_conv` featureMaybe Waffle-2/+2
2023-05-04Auto merge of #111210 - matthiaskrgr:rollup-doquh2n, r=matthiaskrgrbors-50/+1084
Rollup of 8 pull requests Successful merges: - #108865 (Add a `sysroot` crate to represent the standard library crates) - #110651 (libtest: include test output in junit xml reports) - #110826 (Make PlaceMention a non-mutating use.) - #110982 (Do not recurse into const generic args when resolving self lifetime elision.) - #111009 (Add `ascii::Char` (ACP#179)) - #111100 (check array type of repeat exprs is wf) - #111186 (Add `is_positive` method for signed non-zero integers.) - #111201 (bootstrap: add .gitmodules to the sources) Failed merges: - #110954 (Reject borrows of projections in ConstProp.) r? `@ghost` `@rustbot` modify labels: rollup
2023-05-04Rollup merge of #111201 - krasimirgg:add_gitmodules, r=jyn514Matthias Krüger-0/+1
bootstrap: add .gitmodules to the sources The bootstrap builder now expects this file to exist: https://github.com/rust-lang/rust/blob/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/src/bootstrap/builder.rs#L494 Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/missing.20llvm-project.2Fruntimes.20in.20beta.20srcs
2023-05-04Rollup merge of #111186 - jmillikin:nonzero-is-positive, r=dtolnayMatthias Krüger-0/+26
Add `is_positive` method for signed non-zero integers. ACP: https://github.com/rust-lang/libs-team/issues/105