Commit Graph

223731 Commits

Author SHA1 Message Date
Michael Goulet
6077fdd219 Mark ErrorGuaranteed constructor as deprecated so people don't use it 2023-05-05 17:58:46 +00:00
Chris Denton
26b413eb2e
Further normalize msvc-non-utf8-ouput 2023-05-05 18:54:06 +01: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
Zachary Mayhew
a183ac6f90
add hint for =< as <= 2023-05-05 11:17:14 -04:00
Bryanskiy
cff85f22f5 Populate effective visibilities in rustc_privacy 2023-05-05 17:33:10 +03:00
Santiago Pastorino
698acc645e
Add GeneratorDrop terminator to SMIR 2023-05-05 10:34:55 -03:00
Santiago Pastorino
4b85bea4ae
Add Assert terminator to SMIR 2023-05-05 10:34:52 -03: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
lcnr
6691c4cdad forbid escaping bound vars in combine
removes the `CollectAllMismatches` in favor of a slightly
more manual approach.
2023-05-05 13:51:19 +02: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
Takayuki Maeda
0a64dac604 remove unnecessary attribute from a diagnostic 2023-05-05 17:28:52 +09: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
WANG Rui
08fc451771 asm: loongarch64: Implementation of clobber_abi 2023-05-05 14:21:13 +08: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
jyn
453c632b23 Remove tidy key in PR CI
This avoids confusing error messages when adding an `auto` job to CI (as
recommended in the dev-guide: https://rustc-dev-guide.rust-lang.org/tests/ci.html#using-ci-to-test).
2023-05-04 18:17:46 -05: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