Commit Graph

197469 Commits

Author SHA1 Message Date
Ralf Jung
2dc9bf0fa0 nicer Miri backtraces for from_exposed_addr 2022-08-13 12:55:43 -04:00
bors
5941dec0c1 Auto merge of #13010 - Veykril:build-script-probes, r=Veykril
Do not unconditionally succeed RUSTC_WRAPPER checks when run by build scripts

rust-analyzer's RUSTC_WRAPPER unconditionally succeeds `cargo check`
invocations tripping up build scripts using `cargo check` to probe for
successful compilations. To prevent this from happening the RUSTC_WRAPPER
now checks if it's run from a build script by looking for the
`CARGO_CFG_TARGET_ARCH` env var that cargo sets only when running build
scripts.
2022-08-13 14:12:38 +00:00
Ralf Jung
f3fc1cd0c4 update Miri 2022-08-13 10:00:48 -04:00
Takayuki Maeda
d47df26784 use span_suggestion instead of span_suggestion_verbose 2022-08-13 22:10:54 +09:00
Lukas Wirth
72ae308c73 Do not unconditionally succeed RUSTC_WRAPPER checks when run by build scripts
rust-analyzer's RUSTC_WRAPPER unconditionally succeeds `cargo check`
invocations tripping up build scripts using `cargo check` to probe for
successful compilations. To prevent this from happening the RUSTC_WRAPPER
now checks if it's run from a build script by looking for the
`CARGO_CFG_TARGET_ARCH` env var that cargo sets only when running build
scripts.
2022-08-13 12:13:48 +02:00
bors
75b7e52e92 Auto merge of #100380 - nicholasbishop:bishop-update-cb2, r=Mark-Simulacrum
Update compiler_builtins to 0.1.79

This pulls in a memcmp fix and some UEFI float-to-int fixes:
https://github.com/rust-lang/compiler-builtins/compare/0.1.78...0.1.79
2022-08-13 05:10:01 +00:00
Noah Lev
0d588e928e rustdoc: Fix incorrect usage of @!has and @!matches
`@!has` (and `@!matches`) with two arguments used to treat the second
argument as a literal string of HTML code. Now, that feature has been
renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has`
version is an error.

These uses thought the second argument was being treated as an XPath, as
with the arity-3 version, but in fact was being treated as literal HTML.
Because these were checking for the *absence* of the string, the tests
silently did nothing -- an XPath string won't ever be showing up in the
test's generated HTML!
2022-08-13 00:56:16 -04:00
Noah Lev
b34e2404fd Update @!has name in tests 2022-08-13 00:52:16 -04:00
yukang
52a15180d2 give a helpful diagnostic even when the next struct field has an attribute 2022-08-13 12:50:53 +08:00
Noah Lev
9db6061d64 Fix line lengths 2022-08-13 00:37:14 -04:00
Noah Lev
13d53273f8 Rename @hastext to @hasraw (same for matches)
I think `@hasraw` is slightly clearer than `@hastext` since it is
actually matching against the raw HTML, not the text nodes.
2022-08-13 00:37:13 -04:00
Noah Lev
37eed1d1ff Update tests: arity-2 @{has,matches} -> ...text 2022-08-13 00:36:50 -04:00
Noah Lev
01408fc627 Rename @{has,matches}-literal to ...text
Reasons:
1. It's shorter.
2. `@matches-literal` seems to contradict itself: a regex is
   intrinsically not a literal match, while it is still a textual match.
2022-08-13 00:35:03 -04:00
Noah Lev
2787eb05d5 Use different name for arity-2 @has and @matches
See #100354 for the rationale.
2022-08-13 00:35:03 -04:00
bors
e8dc8bca21 Auto merge of #100341 - andrewpollack:fuchsia-llvm-libunwind, r=tmandry
Use llvm-libunwind="in-tree" for Fuchsia targets

With updates to Fuchsia CI's Zircon libraries #99833, we can introduce `llvm-libunwind="in-tree"` for Fuchsia targets. This PR restores functionality removed from https://github.com/rust-lang/rust/pull/93604#issuecomment-1136515651.

cc `@tmandry` `@djkoloski`
2022-08-13 02:41:27 +00:00
bors
46c59bbb79 Auto merge of #100324 - Mark-Simulacrum:bootstrap-bump, r=jyn514
Bump bootstrap compiler to 1.64

r? `@jyn514` perhaps?
2022-08-13 00:12:48 +00:00
Tomasz Miąsko
6b19a48e70 assert_{inhabited,zero_valid,uninit_valid} intrinsics are safe
Those intrinsics either panic or do nothing. They are safe.
2022-08-13 00:00:00 +00:00
Josh Stone
de8dedb0a5 Use an extensionless x script for non-Windows 2022-08-12 15:39:26 -07:00
khyperia
dcead65e48 Make [rust] use-lld=true work on windows
Before, it would fail with "error: ignoring unknown argument '-Wl,--icf=all'"
2022-08-12 23:59:02 +02:00
Mark Rousskov
1c40ef70a1 Apply changes from rustfmt bump 2022-08-12 16:28:16 -04:00
Mark Rousskov
154a09dd91 Adjust cfgs 2022-08-12 16:28:15 -04:00
Mark Rousskov
7b42606758 Bump bootstrap compiler 2022-08-12 16:27:26 -04:00
est31
ca16a8d76c Change fluent_messages macro to expect _ slugs instead of - slugs
For the most part, the macro actually worked with _ slugs, but the prefix_something -> prefix::something
conversion was not implemented.

We don't want to accept - slugs for consistency reasons.
We thus error if a name is found with - inside.
This ensures a consistent style.
2022-08-12 22:26:08 +02:00
est31
75d78b9362 Fix tests 2022-08-12 22:26:08 +02:00
ridwanabdillahi
7e49c1b58f Respond to PR comments. Cleanup documentation. 2022-08-12 13:24:17 -07:00
est31
6c4fc85f9c Update rustdoc to new slug style 2022-08-12 22:22:55 +02:00
est31
cc6cff564f Replace - with _ in ftl slugs for better grepability
Having to replace - with _ (and vice versa) makes the slugs less greppable
and thus constitutes a contributor roadblock.

Result of running this repeatedly up until reaching a fixpoint:

find compiler/rustc_error_messages/locales/en-US/ -type f -exec sed -i 's/\(.+\)-\(.*\)=/\1_\2=/' {} \;

Plus some fixes to update usages of slugs leading with -.
2022-08-12 22:22:55 +02:00
ridwanabdillahi
804579ca77 Respond to RFC comments. 2022-08-12 11:34:31 -07:00
bors
f22819bcce Auto merge of #100456 - Dylan-DPC:rollup-fn17z9f, r=Dylan-DPC
Rollup of 9 pull requests

Successful merges:

 - #100022 (Optimize thread ID generation)
 - #100030 (cleanup code w/ pointers in std a little)
 - #100229 (add -Zextra-const-ub-checks to enable more UB checking in const-eval)
 - #100247 (Generalize trait object generic param check to aliases.)
 - #100255 (Adding more verbose documentation for `std::fmt::Write`)
 - #100366 (errors: don't fail on broken primary translations)
 - #100396 (Suggest const and static for global variable)
 - #100409 (rustdoc: don't generate DOM element for operator)
 - #100443 (Add two let else regression tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-12 16:32:24 +00:00
shoffmeister
fd58459373 Take into account renamed extension id when launching
Signed-off-by: Stefan Hoffmeister <stefan.hoffmeister@econos.de>
2022-08-12 18:06:58 +02:00
Vadim Petrochenkov
8fa707ab41 rustc_target: Update some old naming around self contained linking
The "fallback" naming pre-dates introduction of `-Clink-self-contained`
2022-08-12 18:47:13 +03:00
Michael Goulet
c6089189b3 Address nit 2022-08-12 15:35:27 +00:00
bors
f982c76161 Auto merge of #13007 - lnicola:node-16, r=lnicola
Use Node 16 on CI and upgrade lockfile version

Code is on 16 too, there's hopefully no need to keep using the old version.
2022-08-12 15:23:18 +00:00
Laurențiu Nicola
19da03291d Upgrade npm lockfile 2022-08-12 18:22:14 +03:00
Michael Goulet
9b0edd099d Adjust span of fn arguments 2022-08-12 15:21:39 +00:00
Laurențiu Nicola
1ce978370b Use Node 16 in CI workflows 2022-08-12 18:19:48 +03:00
Michael Goulet
237cbe91a8 Adjust span of closure param 2022-08-12 15:18:40 +00:00
Michael Goulet
262644d94a And for closures 2022-08-12 15:18:40 +00:00
Michael Goulet
20121fa781 Point out a single arg if we have a single arg incompatibility 2022-08-12 15:18:39 +00:00
Michael Woerister
6d030a51dd [debuginfo] Update src/test/debuginfo/mutex.rs for new cpp-like enum debuginfo encoding. 2022-08-12 17:16:55 +02:00
Michael Goulet
6925f4101b Check ctor for missing stability 2022-08-12 15:16:28 +00:00
Michael Goulet
b821ce6097 enum variant ctor inherits stability of variant 2022-08-12 15:15:36 +00:00
Dylan DPC
3bc30bb012
Rollup merge of #100443 - est31:let_else_regression_tests, r=Mark-Simulacrum
Add two let else regression tests

Adds a regression test for #94176, as it was fixed by #98574 but doesn't have a regression test. The PR also incorporates a commit from #94012 which added a test for an issue discovered in that PR.

Originally they have been part of #99291, but I've moved them out in the hopes of getting them merged more quickly, as that PR is already open since a month, and so that #99291 can focus on the drop order part of things.

Closes #94176
Closes #96961 -- dupe of #94176
2022-08-12 20:39:18 +05:30
Dylan DPC
03560346c4
Rollup merge of #100409 - jsha:highlight-lighter, r=GuillaumeGomez
rustdoc: don't generate DOM element for operator

In our source page highlighting, we were generating `<span class="op">` tags for all "operators", including e.g. `<` `>` around generic parameters, `*`, `&`. This contributed significantly to DOM size, but we don't actually style `.op` except in the ayu theme.

Remove the styles for `.op` in ayu, and stop generating the `<span>`s.

This reduces DOM size of an example page[1] from 265,938 HTML elements to 242,165 elements, a 9% reduction.

r? ``@GuillaumeGomez``

Demo: (warning - slow!) https://rustdoc.crud.net/jsha/highlight-lighter/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html

[1]:
https://doc.rust-lang.org/nightly/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html
2022-08-12 20:39:17 +05:30
Dylan DPC
9914c96f06
Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkov
Suggest const and static for global variable

Fixing #100394
2022-08-12 20:39:16 +05:30
Dylan DPC
9e69dbce19
Rollup merge of #100366 - davidtwco:translation-never-fail, r=compiler-errors
errors: don't fail on broken primary translations

If a primary bundle doesn't contain a message then the fallback bundle is used. However, if the primary bundle's message is broken (e.g. it refers to a interpolated variable that the compiler isn't providing) then this would just result in a compiler panic. While there aren't any primary bundles right now, this is the type of issue that could come up once translation is further along.

r? ```@compiler-errors``` (since this comes out of a in-person discussion we had at RustConf)
2022-08-12 20:39:14 +05:30
Dylan DPC
da3b89d0bf
Rollup merge of #100255 - thedanvail:issue-98861-fix, r=joshtriplett
Adding more verbose documentation for `std::fmt::Write`

Attempts to address #98861
2022-08-12 20:39:13 +05:30
Dylan DPC
caac670a16
Rollup merge of #100247 - cjgillot:verify-dyn-trait-alias-defaults, r=lcnr
Generalize trait object generic param check to aliases.

The current algorithm only checks that `Self` does not appear in defaults for traits.  This is not sufficient for trait aliases.
This PR moves the check to trait object elaboration, which sees through trait aliases.

Fixes https://github.com/rust-lang/rust/issues/82927.
Fixes https://github.com/rust-lang/rust/issues/84789.
2022-08-12 20:39:12 +05:30
Dylan DPC
392ba5f111
Rollup merge of #100229 - RalfJung:extra-const-ub-checks, r=lcnr
add -Zextra-const-ub-checks to enable more UB checking in const-eval

Cc https://github.com/rust-lang/rust/issues/99923
r? `@oli-obk`
2022-08-12 20:39:11 +05:30
Dylan DPC
51eed00ca9
Rollup merge of #100030 - WaffleLapkin:nice_pointer_sis, r=scottmcm
cleanup code w/ pointers in std a little

Use pointer methods (`byte_add`, `null_mut`, etc) to make code in std a little nicer.
2022-08-12 20:39:10 +05:30