Commit Graph

223601 Commits

Author SHA1 Message Date
SparrowLii
089a38880b correct literals for dyn thread safe 2023-05-06 09:34:53 +08:00
SparrowLii
9f8ab2a8d3 rename relative names in sync 2023-05-06 09:34:24 +08:00
SparrowLii
f196e27d87 fix parallel! 2023-05-06 09:34:22 +08:00
SparrowLii
261b727d76 fix some nits 2023-05-06 09:34:21 +08:00
SparrowLii
b9746ce039 introduce DynSend and DynSync auto trait 2023-05-06 09:34:18 +08:00
bors
963e5c0eff Auto merge of #111255 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2023-05-05 21:50:14 +00:00
bors
f9a6b71580 Auto merge of #111258 - weihanglo:update-cargo, r=weihanglo
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-05 18:48:07 +00:00
Weihang Lo
31c85fd0ef
Update cargo 2023-05-05 18:00:19 +01:00
bors
4b94c23219 Auto merge of #111248 - Dylan-DPC:rollup-lbp0ui3, r=Dylan-DPC
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-05 15:59:20 +00:00
Philipp Krones
b53c1bb270
Update Cargo.lock 2023-05-05 17:46:00 +02:00
Philipp Krones
4cb05193fb
Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
bors
371120bdbf Auto merge of #10749 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2023-05-05 15:30:22 +00:00
Philipp Krones
79656cc95e
Bump nightly version -> 2023-05-05 2023-05-05 17:29:40 +02:00
Philipp Krones
88c7632659
Merge remote-tracking branch 'upstream/master' into rustup 2023-05-05 17:29:35 +02:00
Dylan DPC
c99ab29e6b
Rollup merge of #111238 - workingjubilee:fix-btree-cursormut-peek-prev, 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-05 18:40:36 +05:30
Dylan DPC
ded0a9e15f
Rollup merge of #111068 - Urgau:check-cfg-improvements, r=petrochenkov
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-05 18:40:35 +05:30
Dylan DPC
65702bfd6b
Rollup merge of #110876 - mj10021:issue-110647-fix, r=b-naber
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-05 18:40:35 +05:30
Dylan DPC
de7e29e593
Rollup merge of #110773 - mj10021:issue-109502-fix, r=oli-obk
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-05 18:40:34 +05:30
Dylan DPC
4891f02cff
Rollup merge of #108801 - fee1-dead-contrib:c-str, r=compiler-errors
Implement RFC 3348, `c"foo"` literals

RFC: https://github.com/rust-lang/rfcs/pull/3348
Tracking issue: #105723
2023-05-05 18:40:33 +05:30
Dylan DPC
3502e48321
Rollup merge of #103056 - beetrees:timespec-bug-fix, r=thomcc
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-05 18:40:32 +05:30
bors
4a18324a4d Auto merge of #111113 - scottmcm:assume-align-offset, r=thomcc
`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 12:50:59 +00:00
bors
d7173e2599 Auto merge of #10747 - Alexendoo:cargo-dev-dogfood-stdout, r=flip1995
Inherit stdout/stderr for `cargo dev dogfood`

changelog: none

Prints progress as it happens and in colour, and will also show anything printed to stderr
2023-05-05 12:22:25 +00:00
Alex Macleod
0f7b61d729 Inherit stdout/stderr for cargo dev dogfood 2023-05-05 12:10:36 +00:00
Scott McMurray
a1e5c65aa4 assume the runtime range of align_offset
Found when I saw code with `align_to` having extraneous checks.
2023-05-05 04:22:51 -07:00
Urgau
53647845b9 Improve check-cfg diagnostics (part 2) 2023-05-05 13:06:48 +02:00
Urgau
a5f8dba4cd Improve check-cfg diagnostics (part 1) 2023-05-05 13:06:48 +02:00
Urgau
d327d5b168 Improve internal representation of check-cfg
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-05 13:06:47 +02:00
Urgau
ad6f4b73eb Use explicit instead of implicit control-flow for check-cfg parsing 2023-05-05 13:06:47 +02:00
bors
dd9a7bf848 Auto merge of #111236 - RalfJung:miri-sysroot, r=RalfJung
bump rustc-build-sysroot to fix miri sysroot build

Fixes https://github.com/rust-lang/miri/issues/2874
2023-05-05 08:04:28 +00:00
Jubilee Young
00cb59b53b 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".
2023-05-04 23:56:04 -07:00
Ralf Jung
cdd67edce6 bump rustc-build-sysroot to fix miri sysroot build 2023-05-05 08:44:20 +02:00
bors
3320f2fab6 Auto merge of #111231 - JohnTitor:rollup-a25ff8v, r=JohnTitor
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-05 04:48:50 +00:00
Yuki Okushi
650dc01a64
Rollup merge of #111223 - jyn514:free-args, r=clubby789
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-05 12:46:28 +09:00
Yuki Okushi
17a6c08718
Rollup merge of #111213 - WaffleLapkin:fixup_dates, r=scottmcm
Fixup "since" dates for `array_tuple_conv` feature

Fixes a mistake from #97594
2023-05-05 12:46:28 +09:00
Yuki Okushi
5d85652684
Rollup merge of #111187 - krasimirgg:llvm-runtimes, r=jyn514
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-05 12:46:27 +09:00
Yuki Okushi
31e2f4d800
Rollup merge of #111173 - nnethercote:still-more-Encoder-cleanups, r=cjgillot
Still more encoder cleanups

r? ``@cjgillot``
2023-05-05 12:46:27 +09:00
Yuki Okushi
f5c50e3350
Rollup merge of #111132 - lcnr:nll-generalize, r=b-naber
cleanup nll generalizer

followup to #108861
2023-05-05 12:46:27 +09:00
Yuki Okushi
b2ee088c73
Rollup merge of #111052 - nnethercote:fix-ice-test, r=Nilstrieb
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-05 12:46:26 +09:00
Yuki Okushi
18d4e22e57
Rollup merge of #110954 - cjgillot:const-prop-ref, r=wesleywiser
Reject borrows of projections in ConstProp.

Fixes https://github.com/rust-lang/rust/issues/110947
2023-05-05 12:46:26 +09:00
Yuki Okushi
d98e174497
Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-se
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-05 12:46:25 +09:00
James Dietz
f239cd6a35 added SAFETY comment 2023-05-04 20:54:17 -04:00
James Dietz
cb74cd524f change expect() to unwrap_or_else() and update msg 2023-05-04 20:29:38 -04:00
James Dietz
9aa596a014 moved default CPU message inline 2023-05-04 20:29:38 -04:00
James Dietz
ea17aa9141 --print target-cpus shows default target cpu, updated docs 2023-05-04 20:29:38 -04:00
James Dietz
c19959f4c3 add passes to miroptfiles struct and passed to -zdump-mir args
blessed new test
2023-05-04 18:56:32 -04:00
jyn
0b6a79efbd 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.
2023-05-04 17:35:46 -05:00
Camille GILLOT
1ffe9059c3 Reject borrows of projections in ConstProp. 2023-05-04 21:51:44 +00:00
Camille GILLOT
e2caebc4a6 Add tests. 2023-05-04 21:50:46 +00:00
Nicholas Nethercote
f20738dfb9 Improve filtering in default-backtrace-ice.rs.
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-05 07:18:06 +10:00
Nicholas Nethercote
8702591e74 Don't print backtrace on ICEs in issue-86800.rs.
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-05 07:04:06 +10:00