Commit Graph

212471 Commits

Author SHA1 Message Date
Esteban Küber
40a62758a7 rename argument 2022-12-13 13:23:19 -08:00
Esteban Küber
165efabbee review comments 2022-12-13 11:36:43 -08:00
Esteban Küber
7d1e47aeb0 Suggest : Type instead of : _ 2022-12-13 10:39:44 -08:00
Esteban Küber
3e25bcb020 Mention implementations that satisfy the trait 2022-12-13 10:39:44 -08:00
Esteban Küber
b3fba5e18a Remove unnecessary code and account for turbofish suggestion
Remove previously existing fallback that tried to give a good turbofish
suggestion, `need_type_info` is already good enough.

Special case `::<Vec<_>` suggestion for `Iterator::collect`.
2022-12-13 10:39:44 -08:00
Esteban Küber
9d5e7d3c04 Suggest collecting into Vec<_> 2022-12-13 10:39:44 -08: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
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
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
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
Matthias Krüger
2ea368e53c minor code cleanups 2022-12-12 19:49:53 +01:00
Matthias Krüger
ab29c0459c
Rollup merge of #105619 - notriddle:notriddle/source-pre-overflow, r=GuillaumeGomez
rustdoc: remove no-op CSS `.source pre { overflow: auto }`

Since source pages use the `example-wrap` wrapper, this rule became redundant because there is already an `overflow-x: auto` rule.
2022-12-12 19:20:38 +01:00
Matthias Krüger
f5852c41a0
Rollup merge of #105616 - est31:add_the, r=Dylan-DPC
Add a "the" to proc_macro documentation
2022-12-12 19:20:37 +01:00
Matthias Krüger
666366444c
Rollup merge of #105615 - WaffleLapkin:remove_opt_scope_span_mention, r=compiler-errors
Fixup method doc that mentions removed param

The param was removed in https://github.com/rust-lang/rust/pull/61872 (101a2f59b4)
2022-12-12 19:20:36 +01:00
Matthias Krüger
c8b07c0529
Rollup merge of #105614 - lukas-code:ascription, r=Nilstrieb
delete mentions of type ascription from lint descriptions

Tracking Issue: https://github.com/rust-lang/rust/issues/101728
2022-12-12 19:20:36 +01:00
Matthias Krüger
968ba7d2db
Rollup merge of #105597 - albertlarsan68:patch-1, r=Dylan-DPC
Correct typos in `core::sync::Exclusive::get_{pin_mut, mut}`
2022-12-12 19:20:35 +01:00
Matthias Krüger
38d97d3ea7
Rollup merge of #105593 - jruderman:patch-3, r=Dylan-DPC
Fix typo in comment: length_limit
2022-12-12 19:20:35 +01:00
Matthias Krüger
f4cca46078
Rollup merge of #105561 - TaKO8Ki:fix-105449, r=fee1-dead
Normalize receiver substs and erase the regions

Fixes #105449
2022-12-12 19:20:34 +01:00
Matthias Krüger
d539628960
Rollup merge of #104405 - Mark-Simulacrum:relnotes, r=pietroalbini
1.66.0 release notes

r? ``@tmandry`` ``@rust-lang/release``
2022-12-12 19:20:33 +01:00
Esteban Küber
348386985d Move logic to their own methods 2022-12-12 09:23:36 -08:00
Takayuki Maeda
ee40a67cd9 remove unnecessary uses of clone 2022-12-13 02:06:24 +09:00
Michael Howell
bfc50d0534 rustdoc: remove no-op CSS .source pre { overflow: auto }
Since source pages use the `example-wrap` wrapper, this rule became
redundant because there is already an `overflow-x: auto` rule.
2022-12-12 10:02:04 -07:00
Lukas Markeffsky
6abffffdff delete mentions of type ascription from lint descriptions
Move it to the historical context section instead.
2022-12-12 17:43:15 +01:00
Maybe Waffle
613c1216b7 Fixup method doc that mentions removed param 2022-12-12 15:43:04 +00:00
est31
3c809b3c5c Add a "the" to proc_macro documentation 2022-12-12 16:19:18 +01:00
Oli Scherer
30754517d1 Avoid trying to normalize unnormalizable types 2022-12-12 14:39:08 +00:00
Oli Scherer
21917b0866 Round 3: require binders for substs 2022-12-12 13:20:36 +00:00
Takayuki Maeda
3bc54baa61 normalize receiver substs and erase the regions
use a smaller example
2022-12-12 22:16:51 +09:00
Mark Rousskov
4264f0850d 1.66.0 release notes 2022-12-12 08:15:54 -05:00
Oli Scherer
8b098325ec Round 2: make clean_middle_ty take a binder 2022-12-12 12:55:47 +00:00
Oli Scherer
dbf4b8a436 Round 1: add some binders (fails due to losing bound vars and then rebinding them with Binder::dummy) 2022-12-12 12:12:40 +00:00
bors
37d7de3379 Auto merge of #105252 - bjorn3:codegen_less_pair_values, r=nagisa
Use struct types during codegen in less places

This makes it easier to use cg_ssa from a backend like Cranelift that doesn't have any struct types at all. After this PR struct types are still used for function arguments and return values. Removing those usages is harder but should still be doable.
2022-12-12 10:38:31 +00:00
Albert Larsan
736342bb46
Correct typos in core::sync::Exclusive::get_{pin_mut, mut} 2022-12-12 09:19:17 +01:00
bors
2176e3a7a4 Auto merge of #105592 - matthiaskrgr:rollup-1cazogq, r=matthiaskrgr
Rollup of 2 pull requests

Successful merges:

 - #104997 (Move tests)
 - #105569 (`bug!` with a better error message for failing `Instance::resolve`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-12 07:57:41 +00:00
Matthias Krüger
5877a3fce1
Rollup merge of #105569 - compiler-errors:resolve-bug-better, r=TaKO8Ki
`bug!` with a better error message for failing `Instance::resolve`

Better ICE message when `.unwrap().unwrap()` fails.
2022-12-12 08:21:32 +01:00