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
Keith T. Star
c3329ba63a
Minor grammar nit.
2022-12-12 16:22:01 -07: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_binder
s
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
Santiago Pastorino
b0c3228404
Join match arms since they do the same thing
2022-12-12 16:44:39 -03:00
Santiago Pastorino
893772025d
Fix typo
2022-12-12 16:43:38 -03: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
Boxy
5573485354
what is unstable_features
lol
2022-12-12 14:41:34 +00:00
Oli Scherer
30754517d1
Avoid trying to normalize unnormalizable types
2022-12-12 14:39:08 +00:00
Boxy
dd19656df3
fold instead of obliterating args
2022-12-12 14:30:01 +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
Matthias Krüger
139ff9d6e8
Rollup merge of #104997 - c410-f3r:moar-errors, r=petrochenkov
...
Move tests
r? `@petrochenkov`
2022-12-12 08:21:31 +01:00
Jesse Ruderman
c27d7949a1
Fix typo in comment: length_limit
2022-12-11 23:21:10 -08:00
bors
2cd2070af7
Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov
...
Remove `token::Lit` from `ast::MetaItemLit`.
Currently `ast::MetaItemLit` represents the literal kind twice. This PR removes that redundancy. Best reviewed one commit at a time.
r? `@petrochenkov`
2022-12-12 05:16:50 +00:00
bors
b397bc0727
Auto merge of #105485 - nnethercote:fix-lint-perf-regressions, r=cjgillot
...
Fix lint perf regressions
#104863 caused small but widespread regressions in lint performance. I tried to improve things in #105291 and #105416 with minimal success, before fully understanding what caused the regression. This PR effectively reverts all of #105291 and part of #104863 to fix the perf regression.
r? `@cjgillot`
2022-12-12 02:17:08 +00:00
bors
ee6533d740
Auto merge of #105579 - matthiaskrgr:rollup-vw5dlqc, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- #101648 (Better documentation for env::home_dir()'s broken behaviour)
- #105283 (Don't call `diagnostic_hir_wf_check` query if we have infer variables)
- #105369 (Detect spurious ; before assoc fn body)
- #105472 (Make encode_info_for_trait_item use queries instead of accessing the HIR)
- #105521 (separate heading from body)
- #105555 (llvm-wrapper: adapt for LLVM API changes)
- #105560 (Extend rustdoc hashtag prepended line test)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-11 23:36:15 +00:00
Esteban Küber
2838b8e515
Point at method call when it is the source of the bound error
2022-12-11 14:49:50 -08:00
Caio
645fac3e1d
Move tests
2022-12-11 19:43:42 -03:00
Matthias Krüger
427ea68278
Rollup merge of #105560 - GuillaumeGomez:extend-rustdoc-hashtag-prep-line, r=notriddle
...
Extend rustdoc hashtag prepended line test
Follow-up of https://github.com/rust-lang/rust/pull/105539 . This case wasn't checked so better add it.
r? `@notriddle`
2022-12-11 23:36:48 +01:00
Matthias Krüger
79f99e7969
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
...
llvm-wrapper: adapt for LLVM API changes
This is a follow-up of 75aec4703d
. There, I updated the wrapper to only include llvm/ADT/Optional.h for LLVM version below 16. But I missed updating some of the None references.
Found by our experimental rust + llvm at HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/15587#0185006b-e0af-49e5-8b06-280ed125ff0d/200-539
2022-12-11 23:36:47 +01:00
Matthias Krüger
6042f5bca7
Rollup merge of #105521 - tshepang:keep-heading-separate, r=nagisa
...
separate heading from body
2022-12-11 23:36:46 +01:00
Matthias Krüger
6ed8cb6616
Rollup merge of #105472 - spastorino:make-encoder-use-queries, r=oli-obk
...
Make encode_info_for_trait_item use queries instead of accessing the HIR
This change avoids accessing the HIR on `encode_info_for_trait_item` and uses queries. We will need to execute this function for elements that have no HIR and by using queries we will be able to feed for definitions that have no HIR.
r? ``@oli-obk``
2022-12-11 23:36:46 +01:00
Matthias Krüger
4154e14f9a
Rollup merge of #105369 - chenyukang:yukang/fix-105226, r=TaKO8Ki
...
Detect spurious ; before assoc fn body
Fixes #105226
r? ``@TaKO8Ki``
2022-12-11 23:36:46 +01:00