Commit Graph

197509 Commits

Author SHA1 Message Date
Michael Goulet
e248c7f9ae
Rollup merge of #100367 - fmease:fix-100365, r=compiler-errors
Suggest the path separator when a dot is used on a trait

Fixes #100365.

`@rustbot` label A-diagnostics
r? diagnostics
2022-08-13 21:06:49 -07:00
Michael Goulet
4989f6a724
Rollup merge of #100335 - aDotInTheVoid:rdj-resolved-path, r=GuillaumeGomez
Rustdoc-Json: Add `Path` type for traits.

Avoids using `Type` for trait fields, as a trait must always be a path, and not any other kind of type.

``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc

Closes #100106
2022-08-13 21:06:48 -07:00
Michael Goulet
d496c4eee8
Rollup merge of #100299 - compiler-errors:issue-100283, r=notriddle
make `clean::Item::span` return `Option` instead of dummy span

Fixes #100283
2022-08-13 21:06:47 -07:00
Michael Goulet
2af344595a
Rollup merge of #99646 - compiler-errors:arg-mismatch-single-arg-label, r=estebank
Only point out a single function parameter if we have a single arg incompatibility

Fixes #99635
2022-08-13 21:06:46 -07:00
bors
d70c0ecfae Auto merge of #100495 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/100424
2022-08-14 04:00:04 +00:00
bors
b76fec3ca8 Auto merge of #100511 - compiler-errors:rollup-vrte4w5, r=compiler-errors
Rollup of 11 pull requests

Successful merges:

 - #100355 (rustdoc: Rename ``@has` FILE PATTERN` to ``@hasraw` FILE PATTERN`)
 - #100407 (avoid some int2ptr casts in thread_local_key tests)
 - #100434 (Fix HIR pretty printing of let else)
 - #100438 (Erase regions better in `promote_candidate`)
 - #100445 (adapt test for msan message change)
 - #100447 (Remove more Clean trait implementations)
 - #100464 (Make `[rust] use-lld=true` work on windows)
 - #100475 (Give a helpful diagnostic when the next struct field has an attribute)
 - #100490 (wf: correctly `shallow_resolve` consts)
 - #100501 (nicer Miri backtraces for from_exposed_addr)
 - #100509 (merge two test directories that mean the same thing)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-14 01:29:58 +00:00
Michael Goulet
c436930f91 Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls 2022-08-13 22:11:42 +00:00
Michael Goulet
752b0e0672 make clean::Item::span return option instead of dummy span 2022-08-13 22:03:47 +00:00
Michael Goulet
860e093efb
Rollup merge of #100509 - BoxyUwU:merge_hrtb_with_higher_rank_trait_bound, r=compiler-errors
merge two test directories that mean the same thing

hopefully `hrtb` doesnt have a secret second meaning that i'm not aware of 😆

r? `@compiler-errors`
2022-08-13 14:10:15 -07:00
Michael Goulet
f8bdd9c680
Rollup merge of #100501 - RalfJung:miri-from-exposed-addr, r=Mark-Simulacrum
nicer Miri backtraces for from_exposed_addr

Miri by default warns about using from_exposed_addr; this makes the span for that a bit nicer.
2022-08-13 14:10:14 -07:00
Michael Goulet
aafaec38bb
Rollup merge of #100490 - lcnr:wf-consts, r=jackh726
wf: correctly `shallow_resolve` consts

`shallow_resolve` on `InferConst` is always a noop. this is mostly irrelevant as inference vars should already be resolved at most - if not all - call sites. Haven't actually looked too deeply into whether this was a problem.
2022-08-13 14:10:13 -07:00
Michael Goulet
29f905bfaf
Rollup merge of #100475 - chenyukang:fix-100461, r=fee1-dead
Give a helpful diagnostic when the next struct field has an attribute

Fixes #100461
2022-08-13 14:10:12 -07:00
Michael Goulet
7a34d39278
Rollup merge of #100464 - khyperia:lld-icf-on-windows, r=jyn514
Make `[rust] use-lld=true` work on windows

Before, it would fail with "error: ignoring unknown argument '-Wl,--icf=all'"

This option was introduced in https://github.com/rust-lang/rust/pull/99062 (well, technically https://github.com/rust-lang/rust/pull/99680)

See zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/rust-lld.3A.20error.3A.20ignoring.20unknown.20argument.20'-Wl.2C--icf.3Dall'
2022-08-13 14:10:11 -07:00
Michael Goulet
b1d77dd2dc
Rollup merge of #100447 - GuillaumeGomez:rm-clean-impl, r=Dylan-DPC
Remove more Clean trait implementations

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? ``@Dylan-DPC``
2022-08-13 14:10:10 -07:00
Michael Goulet
ef72484f08
Rollup merge of #100445 - krasimirgg:llvm-16-msan, r=tmiasko
adapt test for msan message change

LLVM commit 057cabd997 removed the function from the msan error message. This adapts our test accordingly.

Found via our experimental rust + llvm @ HEAD bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12634#018289fe-b0bc-4bab-89b3-fb1d4e38f6db
2022-08-13 14:10:08 -07:00
Michael Goulet
9ab54df8d7
Rollup merge of #100438 - compiler-errors:issue-100360, r=lcnr
Erase regions better in `promote_candidate`

Use `tcx.erase_regions` instead of manually walking through the substs.... this also makes the code slightly simpler 🙈

Fixes #100360
Fixes #89851
2022-08-13 14:10:07 -07:00
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