Commit graph

25238 commits

Author SHA1 Message Date
bors
a10fd83120 Auto merge of #14748 - lumenian:type-alias-layout, r=HKalbasi
Show type alias layout

This PR expands on #13490 to allow displaying layout data on hover for type aliases.
2023-05-06 19:18:30 +00:00
bors
bb66f6fc3c Auto merge of #14750 - lowr:fix/rustc_reservation_impl, r=HKalbasi
fix: ignore impls with `#[rustc_reservation_impl]`

Fixes #12247
Fixes #14279

Currently core has two blanket impls for `From`: `impl<T> From<T> for T` and `impl<T> From<!> for T`. These are conflicting and thus chalk cannot uniquely solve `S: From<?0>` for any type `S`.

The latter impl is actually a reservation impl and should not be considered during trait selection. More generally, impls attributed with perma-unstable `#[rustc_reservation_impl]` attribute should be disregarded except for coherence checks. See rust-lang/rust#64631 and rust-lang/rust#64715 for details.

I chose to entirely ignore them in hir-ty because we don't do coherence checks.
2023-05-06 17:44:48 +00:00
Ryo Yoshida
9360adccda
Ignore impls with #[rustc_reservation_impl] 2023-05-07 01:31:36 +09:00
bors
5ee39a6ee5 Auto merge of #14749 - matklad:matklad/panic-is-a-problem, r=lnicola
feat: define problem matcher for panics in VS Code

Now in VS Code "go to next error" (`F8`) will bring you to the source of a panic.
2023-05-06 15:54:00 +00:00
Aleksey Kladov
7bc60f512e feat: define problem matcher for panics in VS Code
Now in VS Code "go to next error" (`F8`) will bring you to the source of
a panic.
2023-05-06 16:49:42 +01:00
Alexis (Poliorcetics) Bourget
3d70ba7f94 chore: remove unused method 2023-05-06 16:02:34 +02:00
oxalica
add94d3b9c Impl FusedIterator for IdxRange 2023-05-06 22:02:30 +08:00
oxalica
665c0cb547 Forward Iterator::{count,last,nth} for IdxRange random access 2023-05-06 22:00:04 +08:00
Yury Ivanou
ecc081d625 Show type alias layout on hover 2023-05-06 16:58:57 +03:00
Alexis (Poliorcetics) Bourget
c5e0607915 fix(todo): implement IntoIterator for ArenaMap<IDX, V> 2023-05-06 15:37:38 +02:00
oxalica
86eaf53600 Fix typo in docs 2023-05-06 21:27:35 +08:00
oxalica
4e4940e21e Add Arena::alloc_many to easily get IdxRange
There are no currently ways to get `IdxRange` without manually offseting
`Idx`. Providing a method for multiple-allocation simplifies this
process and makes it less error-prone.
2023-05-06 21:21:00 +08:00
oxalica
300f3a1b43 Impl ExactSizeIterator for IdxRange 2023-05-06 21:15:57 +08:00
Ryo Yoshida
fa2340a4df
Parse associated return type bounds 2023-05-06 20:31:11 +09:00
Ryo Yoshida
d7d8971203
Remove (..)-style return type notation 2023-05-06 20:30:17 +09:00
Ariel Davis
343976fe56 Return None for too-large offset 2023-05-06 02:08:47 -07:00
Ariel Davis
e8a93306f0 Remove 0 TextSize at front 2023-05-06 01:46:33 -07:00
Ariel Davis
6500487735 Rename 2023-05-06 01:37:25 -07:00
Ariel Davis
0ad2450396 Check for inside multibyte 2023-05-06 01:05:28 -07:00
Ariel Davis
902b3438c9 Use try_line_col 2023-05-06 01:04:41 -07:00
Ariel Davis
d683e22021 Use u32 more 2023-05-06 01:03:18 -07:00
Ariel Davis
8012acc90e Use a from 2023-05-06 01:02:37 -07:00
Ariel Davis
84a6cb3bfc Inline 2023-05-06 00:59:56 -07:00
Ariel Davis
02e8bb0c6e Return Option 2023-05-06 00:57:57 -07:00
Ariel Davis
9de213c4fe Swap, tweak comments 2023-05-06 00:56:30 -07:00
Ariel Davis
fcbe73ec1c Refactor position 2023-05-06 00:52:32 -07:00
Ariel Davis
0bb21533c6 Tweak comments, swap 2023-05-06 00:52:11 -07:00
Ariel Davis
594a41e7bf Use pre.1, tweak comment 2023-05-06 00:51:25 -07:00
Ariel Davis
1ad0779a00 Make WideEncoding non-exhaustive 2023-05-06 00:49:23 -07:00
Ariel Davis
59b4916294 Swap 2023-05-06 00:49:23 -07:00
Ariel Davis
663e11c4b0 Move some tests 2023-05-06 00:49:23 -07:00
Ariel Davis
da5c63c8f9 Use boxed slice
As well as doing the shrink_to_fit, we also don't have to keep track of
the capacity anymore.
2023-05-06 00:49:23 -07:00
Ariel Davis
d9c88460e4 Use cur 2023-05-06 00:49:23 -07:00
Ariel Davis
4b7c759f2f Un-doc a comment 2023-05-06 00:49:23 -07:00
Ariel Davis
4a1922fd1a Depend on nohash-hasher individually 2023-05-06 00:49:23 -07:00
Ariel Davis
1d678cf6a0 Allow clippy 2023-05-06 00:49:23 -07:00
Ariel Davis
71c4a8968d Pub use TextRange, TextSize 2023-05-06 00:49:23 -07:00
Ariel Davis
5e2c68f4d4 Use less 2023-05-06 00:49:23 -07:00
Ariel Davis
39ef368e75 Remove pub(crate) 2023-05-06 00:49:23 -07:00
Ariel Davis
b26cded8d1 Swap 2023-05-06 00:49:23 -07:00
Ariel Davis
4b28ad92e9 Make text-size a workspace dep 2023-05-06 00:49:23 -07:00
Ariel Davis
85dd7b22b4 Use nohash_hasher, rm comment 2023-05-06 00:49:23 -07:00
Ariel Davis
7e1992a0d9 Make line-index an external lib 2023-05-06 00:49:23 -07:00
Ariel Davis
29256f22e4 Make non-hash an external lib 2023-05-06 00:49:23 -07:00
bors
a4966c9282 Auto merge of #14745 - rkstgr:rust-dependencies-sorted, r=HKalbasi
Sort rust dependencies in vscode tree view

Sorts alphabetically based on dependency name. Fixes #14729
2023-05-05 21:22:34 +00:00
Erik Steiger
91b4a169cd Fix formatting 2023-05-05 14:49:42 +02:00
Erik Steiger
06cfeb47b2 Sort rust dependencies in tree view 2023-05-05 14:41:03 +02:00
Lukas Wirth
abcdb4bc7d Fix test fixtures 2023-05-05 14:18:27 +02:00
Lukas Wirth
8081a654da feat: Closure capture inlay hints 2023-05-05 13:38:22 +02:00
bors
e461e53f01 Auto merge of #14739 - lowr:fix/type-with-leading-lifetime, r=Veykril
Parse bare dyn types with leading lifetime

TIL types may start with a lifetime identifier e.g. `type A = 'static + Trait;`. When parsing types, leading lifetime followed by a plus sign should be parsed as a bare dyn type rather than a generic lifetime argument or error type (which is what we produce today).

Although it's no longer accepted since Rust 2021, it wouldn't hurt to support this obsolete syntax.
2023-05-05 09:23:32 +00:00