about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-05-05Auto merge of #2876 - RalfJung:varnames, r=RalfJungbors-74/+98
clearer variable names in data_race
2023-05-05clearer variable names in data_raceRalf Jung-74/+98
2023-05-05Auto merge of #2875 - RalfJung:rustup, r=RalfJungbors-4438/+6131
Rustup This *should* fail because of https://github.com/rust-lang/miri/issues/2874 but it seems we don't actually cover that in our tests...
2023-05-05update dependenciesRalf Jung-139/+524
2023-05-05ensure that the proc_macro crate exists in the sysrootRalf Jung-1/+21
2023-05-05Merge from rustcRalf Jung-4297/+5585
2023-05-06Remove some `assume`s from slice iterators that don't do anythingScott McMurray-10/+48
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-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-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-05Preparing for merge from rustcRalf Jung-1/+1
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-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
2023-05-04Rollup merge of #111100 - BoxyUwU:array_repeat_expr_wf, r=compiler-errorsMatthias Krüger-6/+94
check array type of repeat exprs is wf Fixes #111091 Also makes sure that we actually renumber regions in the length of repeat exprs which we previously weren't doing and would cause ICEs in `adt_const_params` + `generic_const_exprs` from attempting to prove the wf goals when the length was an unevaluated constant with `'erased` in the `ty` field of `Const` The duplicate errors are caused by the fact that `const_arg_to_const`/`array_len_to_const` in `FnCtxt` adds a `WellFormed` goal for the created `Const` which is also checked by the added `WellFormed(array_ty)`. I don't want to change this to just emit a `T: Sized` goal for the element type since that would ignore `ConstArgHasType` wf requirements and generally uncomfortable with the idea of trying to sync up `wf::obligations` for arrays and the code in hir typeck for repeat exprs. r? `@compiler-errors`
2023-05-04Rollup merge of #111009 - scottmcm:ascii-char, r=BurntSushiMatthias Krüger-1/+724
Add `ascii::Char` (ACP#179) ACP second: https://github.com/rust-lang/libs-team/issues/179#issuecomment-1527900570 New tracking issue: https://github.com/rust-lang/rust/issues/110998 For now this is an `enum` as `@kupiakos` [suggested](https://github.com/rust-lang/libs-team/issues/179#issuecomment-1527959724), with the variants under a different feature flag. There's lots more things that could be added here, and place for further doc updates, but this seems like a plausible starting point PR. I've gone through and put an `as_ascii` next to every `is_ascii`: on `u8`, `char`, `[u8]`, and `str`. As a demonstration, made a commit updating some formatting code to use this: https://github.com/scottmcm/rust/commit/ascii-char-in-fmt (I don't want to include that in this PR, though, because that brings in perf questions that don't exist if this is just adding new unstable APIs.)
2023-05-04Rollup merge of #110982 - cjgillot:elided-self-const, r=petrochenkovMatthias Krüger-0/+55
Do not recurse into const generic args when resolving self lifetime elision. Fixes https://github.com/rust-lang/rust/issues/110899 r? `@petrochenkov`
2023-05-04Rollup merge of #110826 - cjgillot:place-mention-use, r=JakobDegen,lcnrMatthias Krüger-10/+49
Make PlaceMention a non-mutating use. Fixes https://github.com/rust-lang/rust/issues/110781 r? `@JakobDegen` I don't agree with your statement in https://github.com/rust-lang/rust/issues/110781#issuecomment-1520841434. I suggest that we start fixing `PlaceContext` to be accurate enough for optimizations to use it. This structure is very convenient to use in visitors, and we perhaps have an opportunity to make it less of a footgun.
2023-05-04Rollup merge of #110651 - durin42:xunit-stdout, r=cuviperMatthias Krüger-5/+91
libtest: include test output in junit xml reports Fixes #110336.
2023-05-04Rollup merge of #108865 - Zoxc:library-dummy-crate, r=jyn514Matthias Krüger-28/+44
Add a `sysroot` crate to represent the standard library crates This adds a dummy crate named `sysroot` to represent the standard library target instead of using the `test` crate. This allows the removal of `proc_macro` as a dependency of `test` allowing these 2 crates to build in parallel saving around 9 seconds locally.
2023-05-04Auto merge of #111174 - matthiaskrgr:rollup-ncnqivh, r=matthiaskrgrbors-182/+326
Rollup of 8 pull requests Successful merges: - #110859 (Explicitly reject negative and reservation drop impls) - #111020 (Validate resolution for SelfCtor too.) - #111024 (Use the full Fingerprint when stringifying Svh) - #111027 (Remove `allow(rustc::potential_query_instability)` for `builtin_macros`) - #111039 (Encode def span for foreign return-position `impl Trait` in trait) - #111070 (Don't suffix `RibKind` variants) - #111094 (Add needs-unwind annotations to tests that need stack unwinding) - #111103 (correctly recurse when expanding anon consts) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-05-04bootstrap: add .gitmodules to the sourcesKrasimir Georgiev-0/+1
The bootstrap builder now expects this file to exist: https://github.com/rust-lang/rust/blob/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/src/bootstrap/builder.rs#L494
2023-05-04bootstrap: add llvm-project/runtimes to the sourcesKrasimir Georgiev-0/+2
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 Doesn't work: with this, running `python3 x.py dist` produces a tar archive that still doesn't contain the runtimes subdirectory?
2023-05-04Add `is_positive` method for signed non-zero integers.John Millikin-0/+26
2023-05-04do not allow rustc::pass_by_value lintBoxy-6/+4
2023-05-04check array type of repeat exprs is wfBoxy-6/+96
2023-05-04Rollup merge of #111103 - BoxyUwU:normal_fold_with_gce_norm, r=compiler-errorsMatthias Krüger-12/+15
correctly recurse when expanding anon consts recursing with `super_fold_with` is wrong in case `bac` is itself normalizable, the test that was supposed to test for this being wrong did not actually test for this in reality because of the usage of `{ (N) }` instead of `{{ N }}`. The former resulting in a simple `ConstKind::Param` instead of `ConstKind::Unevaluated`. Tbh generally this test seems very brittle and it will be a lot easier to test once we have normalization of assoc consts since then we can just test that `T::ASSOC` normalizes to some `U::OTHER` which normalizes to some third thing. r? `@compiler-errors`
2023-05-04Rollup merge of #111094 - bjorn3:fix_test_annotations, r=jyn514Matthias Krüger-0/+13
Add needs-unwind annotations to tests that need stack unwinding This allows filtering them out when running the rustc test suite for cg_clif.
2023-05-04Rollup merge of #111070 - WaffleLapkin:break_ribs, r=lcnrMatthias Krüger-116/+113
Don't suffix `RibKind` variants This PR - Removes `use RibKind::*` - Renames `RibKind::{SomethingRibKind => Something}` It seems unnecessary to have "RibKind" in the end of all variants, if we can just use it as a normal enum. Additionally previously it was weird that `MacroDefinition` is the only unsuffixed variant.
2023-05-04Rollup merge of #111039 - compiler-errors:foreign-span-rpitit, r=tmiaskoMatthias Krüger-7/+32
Encode def span for foreign return-position `impl Trait` in trait Fixes #111031, yet another def-span encoding issue :/ Includes a smaller repro than the issue, but I can confirm it ICEs: ``` query stack during panic: #0 [def_span] looking up span for `rpitit::Foo::bar::{opaque#0}` #1 [object_safety_violations] determining object safety of trait `rpitit::Foo` #2 [check_is_object_safe] checking if trait `rpitit::Foo` is object safe #3 [typeck] type-checking `main` #4 [used_trait_imports] finding used_trait_imports `main` #5 [analysis] running analysis passes on this crate ``` Luckily since this only affects nightly, this desn't need to be backported.
2023-05-04Rollup merge of #111027 - clubby789:query-instability-builtin-macros, ↵Matthias Krüger-11/+13
r=petrochenkov Remove `allow(rustc::potential_query_instability)` for `builtin_macros` cc #84447
2023-05-04Rollup merge of #111024 - saethlin:stringify-full-svh, r=oli-obkMatthias Krüger-6/+11
Use the full Fingerprint when stringifying Svh Finally circling back, per https://github.com/rust-lang/rust/pull/110367#discussion_r1168340739 r? `@oli-obk`
2023-05-04Rollup merge of #111020 - cjgillot:validate-self-ctor, r=petrochenkovMatthias Krüger-2/+55
Validate resolution for SelfCtor too. Fixes https://github.com/rust-lang/rust/issues/89868 r? `@petrochenkov`