Commit Graph

212560 Commits

Author SHA1 Message Date
akida31
05bc2513ef
fix tests 2022-12-13 18:24:18 +01:00
bors
aa5b179599 Auto merge of #105646 - lqd:revert-thinlto, r=Mark-Simulacrum
Revert "enable ThinLTO for rustc on x86_64-apple-darwin dist builds"

Apparently ThinLTO on x64 mac can regress some of the ICEs' output. This reverts #103647 to allow for investigation, and helps with #105637 in the meantime.
2022-12-13 15:50:16 +00:00
akida31
757396f5fe
tidy: ignore filelength 2022-12-13 16:37:44 +01:00
akida31
f780faa8c4
reduce to single suggestion for all arguments 2022-12-13 16:30:04 +01:00
akida31
4d87fb5d11
remove manual fn_decl extraction 2022-12-13 16:29:13 +01:00
akida31
7822822d51
change error message 2022-12-13 16:29:10 +01:00
akida31
b1d7430657
move changes to an extra function 2022-12-13 16:28:34 +01:00
akida31
e326e8c885
Remove hint from help message 2022-12-13 16:28:31 +01:00
akida31
e50f5756aa
Fix stderr of tests which have improved diagnostics 2022-12-13 16:27:21 +01:00
akida31
1e5d772417
Improve diagnostic when passing arg to closure and missing borrow.
This checks the number of references for the given and expected type and
shows hints to the user if the numbers don't match.
2022-12-13 16:24:38 +01:00
bors
ed620cf969 Auto merge of #105612 - oli-obk:bind_rustdoc, r=GuillaumeGomez
use ty::Binder in rustdoc instead of `skip_binder`

r? `@GuillaumeGomez`

this is a preliminary cleanup required to be able to normalize correctly/conveniently in rustdoc
2022-12-13 13:09:40 +00:00
Santiago Pastorino
b22769a7bd
Clarify explicit_predicates_of is_assoc_item_ty comment 2022-12-13 09:41:12 -03:00
Santiago Pastorino
4ae0c5518d
Make InternalSubsts rust docs a bit clearer 2022-12-13 09:28:25 -03:00
Jakob Degen
3522d48112 Don't require owned data in MaybeStorageLive 2022-12-13 04:22:47 -08:00
Oli Scherer
82ce70af62 bless fulldeps tests 2022-12-13 10:11:19 +00:00
Oli Scherer
1f5cb9e50e Use a label instead of a note for the drop site to create denser diagnostics 2022-12-13 10:08:46 +00:00
Oli Scherer
6984085088 Stop pointing to operators if their libcore method source is not available 2022-12-13 10:06:11 +00:00
Oli Scherer
59554a2b54 Avoid rendering empty annotations 2022-12-13 10:06:08 +00:00
Oli Scherer
2e2a4797a2 Don't emit empty notes 2022-12-13 09:53:36 +00:00
Oli Scherer
063b1675b2 Clarify what "this" means 2022-12-13 09:51:03 +00:00
Oli Scherer
717294fa04 Inform the user which trait is meant in the diagnostic itself instead of relying on the span making it obvious 2022-12-13 09:48:26 +00:00
Oli Scherer
cb26b35b12 Make some diagnostics not depend on the source of what they reference being available 2022-12-13 09:48:22 +00:00
bors
109cccbe4f Auto merge of #105350 - compiler-errors:faster-binder-relate, r=oli-obk
Fast-path some binder relations

A simpler approach than #104598

Fixes #104583

r? types
2022-12-13 07:10:53 +00:00
Michael Goulet
a8a45100a0 Move some codegen-y methods from rustc_hir_analysis::collect -> rustc_codegen_ssa 2022-12-13 05:01:36 +00:00
Cassaundra Smith
52a9280fb2
Refine when invalid prefix case error arises
Fix cases where the "invalid base prefix for number literal" error arises with
suffixes that look erroneously capitalized but which are in fact invalid.
2022-12-12 19:32:12 -08:00
bors
71ec1457ee Auto merge of #105436 - nnethercote:inline-place_contents_drop_state_cannot_differ, r=spastorino
Inline and remove `place_contents_drop_state_cannot_differ`.

It has a single call site and is hot enough to be worth inlining. And make sure `is_terminal_path` is inlined, too.

r? `@ghost`
2022-12-13 03:28:57 +00:00
Michael Goulet
2025a96ee1 Fast path some binder relations 2022-12-13 03:17:14 +00:00
Gary Guo
d6dc9124b7 Extract shared logic into a new function 2022-12-13 02:34:43 +00:00
Gary Guo
d2830cb204 Add tests (currently broken) for unsafe + inline const pat 2022-12-13 01:38:38 +00:00
Gary Guo
5c58a1b003 Remove unnecessary recursive call to parent unsafeck
All bodies are unsafe checked anyway. Current MIR unsafeck also just
returns for closures.
2022-12-13 01:38:38 +00:00
Gary Guo
adf1717219 Ensure valid local_data is set for custom mir building
MIR unsafety checking requires this to be valid
2022-12-13 01:38:38 +00:00
Gary Guo
f03c2aef47 Add tests 2022-12-13 01:38:38 +00:00
Gary Guo
aa5af2a003 Allow unsafe through inline const for THIR unsafety checker
The closure handling code is changed slightly to avoid allocation
when THIR building failed.
2022-12-13 01:38:38 +00:00
Gary Guo
9342d1e73e Allow unsafe through inline const
This is handled similar to closures
2022-12-13 01:38:38 +00:00
Rémy Rakic
ddb6fe2e1d Revert "enable ThinLTO for rustc on x86_64-apple-darwin dist builds"
This reverts commit 3a085f7695.
2022-12-13 01:11:54 +00:00
bors
b96d9e0e20 Auto merge of #105644 - matthiaskrgr:rollup-qc6hlzq, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #104864 (Account for item-local in inner scope for E0425)
 - #105332 (Point out the type of associated types in every method call of iterator chains)
 - #105620 (Remove unnecessary uses of `clone`)
 - #105625 (minor code cleanups)
 - #105629 (rustdoc: stop treating everything in a trait item as a method)
 - #105636 (Add check for local-storage value when changing "display line numbers" settings)
 - #105639 (rustdoc: remove `type="text/css" from stylesheet links)
 - #105640 (Adjust miri to still be optional)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-13 00:29:28 +00:00
Matthias Krüger
5af04471aa
Rollup merge of #105640 - lukas-code:miri-beta, r=Mark-Simulacrum
Adjust miri to still be optional

r? `@pietroalbini`
2022-12-13 01:17:12 +01:00
Matthias Krüger
84a725e4e3
Rollup merge of #105639 - notriddle:notriddle/text-css, r=GuillaumeGomez
rustdoc: remove `type="text/css" from stylesheet links

MDN directly recommends this in <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link>, since "CSS is the only stylesheet language used on the web."

Like 07a243b2a4, but a few places that were missed the first time.
2022-12-13 01:17:12 +01:00
Matthias Krüger
8ba9c211bb
Rollup merge of #105636 - GuillaumeGomez:extend-gui-test, r=notriddle
Add check for local-storage value when changing "display line numbers" settings

r? `@notriddle`
2022-12-13 01:17:11 +01:00
Matthias Krüger
105e398349
Rollup merge of #105629 - notriddle:notriddle/method-toggle-trait, r=GuillaumeGomez
rustdoc: stop treating everything in a trait item as a method

This was added in 0b9b4b7068 to fix the spacing on trait pages, but stopped being needed because 791f04e5a4 stopped styling method-toggle. By only putting the method-toggle class on actual methods, the JS setting does the right thing.
2022-12-13 01:17:11 +01:00
Matthias Krüger
2707801858
Rollup merge of #105625 - matthiaskrgr:clippy_dec12, r=compiler-errors
minor code cleanups

r? `@compiler-errors`
2022-12-13 01:17:10 +01:00
Matthias Krüger
4069792d73
Rollup merge of #105620 - TaKO8Ki:remove-unnecessary-uses-of-clone, r=compiler-errors
Remove unnecessary uses of `clone`
2022-12-13 01:17:10 +01:00
Matthias Krüger
8917cc0f23
Rollup merge of #105332 - estebank:iterator-chains, r=oli-obk
Point out the type of associated types in every method call of iterator chains

Partially address #105184 by pointing out the type of associated types in every method call of iterator chains:

```
note: the expression is of type `Map<std::slice::Iter<'_, {integer}>, [closure@src/test/ui/iterators/invalid-iterator-chain.rs:12:18: 12:21]>`
    --> src/test/ui/iterators/invalid-iterator-chain.rs:12:14
     |
10   |         vec![0, 1]
     |         ---------- this expression has type `Vec<{integer}>`
11   |             .iter()
     |              ------ associated type `std::iter::Iterator::Item` is `&{integer}` here
12   |             .map(|x| { x; })
     |              ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `()` here
```

We also reduce the number of impls we mention when any of the candidates is an "exact match". This benefits the output of cases with numerics greatly.

Outstanding work would be to provide a structured suggestion for appropriate changes, like in this case detecting the spurious `;` in the closure.
2022-12-13 01:17:09 +01:00
Matthias Krüger
6dbaf86672
Rollup merge of #104864 - chenyukang:yukang/fix-104700-binding, r=estebank
Account for item-local in inner scope for E0425

Fixes #104700
2022-12-13 01:17:08 +01:00
Mark Rousskov
4ac8190287 Adjust miri to still be optional
We don't distribute a miri build for beta/stable so it needs to be kept
optional. In the future it likely makes sense to switch the miri
*artifacts* to always be built, but the rustup component to not be
included -- this will avoid some of this pain.
2022-12-13 00:01:20 +01:00
Michael Howell
46b4a3b831 rustdoc: remove `type="text/css" from stylesheet links
MDN directly recommends this in <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link>,
since "CSS is the only stylesheet language used on the web."

Like 07a243b2a4, but a few places that were
missed the first time.
2022-12-12 15:17:49 -07:00
Guillaume Gomez
21a2b64209 Add check for local-storage value when changing "display line numbers" settings 2022-12-12 22:49:19 +01:00
bors
ed9749324a Auto merge of #105622 - matthiaskrgr:rollup-a6i81q7, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #104405 (1.66.0 release notes)
 - #105561 (Normalize receiver substs and erase the regions)
 - #105593 (Fix typo in comment: length_limit)
 - #105597 (Correct typos in `core::sync::Exclusive::get_{pin_mut, mut}`)
 - #105614 (delete mentions of type ascription from lint descriptions)
 - #105615 (Fixup method doc that mentions removed param)
 - #105616 (Add a "the" to proc_macro documentation)
 - #105619 (rustdoc: remove no-op CSS `.source pre { overflow: auto }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-12 21:34:28 +00:00
Esteban Küber
f4ed2d1cca Do not skip_binders 2022-12-12 11:53:39 -08:00
Michael Howell
7e64cebf97 rustdoc: stop treating everything in a trait item as a method
This was added in 0b9b4b7068 to fix the
spacing on trait pages, but stopped being needed because
791f04e5a4 stopped styling method-toggle.
By only putting the method-toggle class on actual methods, the JS setting
does the right thing.
2022-12-12 12:49:29 -07:00