Commit Graph

197613 Commits

Author SHA1 Message Date
Michael Goulet
2126cc62fb
Rollup merge of #100434 - compiler-errors:issue-100373, r=cjgillot
Fix HIR pretty printing of let else

Fixes #100373
Fixes #99318
Fixes #99319
2022-08-13 14:10:06 -07:00
Michael Goulet
ea42f3cfd7
Rollup merge of #100407 - RalfJung:no-int2ptr, r=Mark-Simulacrum
avoid some int2ptr casts in thread_local_key tests
2022-08-13 14:10:05 -07:00
Michael Goulet
4b51df3df0
Rollup merge of #100355 - camelid:has2-rename, r=GuillaumeGomez
rustdoc: Rename `@has FILE PATTERN` to `@hasraw FILE PATTERN`

Fixes #100354.
2022-08-13 14:10:04 -07:00
Goldstein
3e0df4b5d7
fix span_extend_to_next_char docs 2022-08-13 23:33:21 +03:00
lcnr
1ec2b9bce8 wf correctly shallow_resolve consts 2022-08-13 21:04:52 +02:00
bors
010f68cacf Auto merge of #13017 - Veykril:vscode-diag-workaround, r=Veykril
Pad empty diagnostic messages in relatedInformation as well

Follw up to https://github.com/rust-lang/rust-analyzer/pull/13016
2022-08-13 18:50:38 +00:00
Lukas Wirth
614969baa7 Pad empty diagnostic messages in relatedInformation as well 2022-08-13 20:49:00 +02:00
Ellen
40b1f612c9 move 2022-08-13 19:42:25 +01:00
bors
bbe5637bbf Auto merge of #13016 - Veykril:vscode-diag-workaround, r=Veykril
Move VSCode diagnostics workaroudn into client code
2022-08-13 18:35:09 +00:00
Lukas Wirth
ec8256dd80 Move VSCode diagnostics workaroudn into client code 2022-08-13 20:30:30 +02:00
Michael Goulet
aa1a07f114 Do not inline non-simple argument type errors into labels 2022-08-13 18:24:36 +00:00
Michael Goulet
b0cd1e192c Label argument coercion errors 2022-08-13 18:24:36 +00:00
bors
306687b640 Auto merge of #13014 - Veykril:simplify, r=Veykril
minor: Simplify `GlobalState::handle_event`
2022-08-13 18:03:56 +00:00
Lukas Wirth
038c36a1f5 Simplify GlobalState::handle_event 2022-08-13 20:03:06 +02:00
lcnr
1137fffe28 change InlineAsmCtxt to not talk about FnCtxt 2022-08-13 19:58:39 +02:00
Jeong YunWon
29398d7d33 Add Duration rounding change to release note 2022-08-14 02:12:55 +09:00
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
Nixon Enraght-Moony
760b972672 rustdoc-json: Use @ismany in tests 2022-08-12 23:56:28 +01: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
Nixon Enraght-Moony
64f790f030 Jsondocck: New @ismany command 2022-08-12 18:11:55 +01: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