3287: Omit type hints for enum variant bind pats r=matklad a=SomeoneToIgnore
After using new hints for a while, I've started to think that hints for enum variants are an overkill.
Another user also shares the same toughts: https://github.com/rust-analyzer/rust-analyzer/issues/3273#issuecomment-590172297
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3282: Add suggestion for failed path resolution r=matklad a=yoshuawuyts
This adds https://github.com/rust-analyzer/rust-analyzer/issues/3245 as an inline help text for when path resolution fails. I saw this error, but also `"Failed to read Cargo metadata from Cargo.toml file"` several times while trying to debug what was failing.
There's probably a more structured way of displaying help texts in VS Code popups. But this would've saved me 20 mins of debugging when installing `rust-analyzer` under WSL today. Thanks!
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
3275: Add Structural Search and Replace doc r=matklad a=adamrk
Addresses the first point of https://github.com/rust-analyzer/rust-analyzer/issues/3186.
Co-authored-by: adamrk <ark.email@gmail.com>
Co-authored-by: Adam Bratschi-Kaye <ark.email@gmail.com>
3276: Bump crossbeam crates r=kjeremy a=lnicola
This removes a duplicate `autocfg` dependency and was supposed to upgrade `rand`, but it got reverted in `crossbeam` to keep it compiling on pre-2018 edition compilers.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3263: Implement unsizing coercions using Chalk r=matklad a=flodiebold
These are coercions like `&[T; n] -> &[T]`, which are handled by the `Unsize` and `CoerceUnsized` traits. The impls for `Unsize` are all built in to the compiler and require special handling, so we need to provide them to Chalk.
This adds the following `Unsize` impls:
- `Unsize<[T]> for [T; _]`
- `Unsize<dyn Trait> for T where T: Trait`
- `Unsize<dyn SuperTrait> for dyn SubTrait`
Hence we are still missing the 'unsizing the last field of a generic struct' case.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
3260: Refactor how builtins are resolved r=matklad a=flodiebold
This fixes autocompletion suggesting e.g. `self::usize`. (I thought we had a bug for that, but I didn't find it.)
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>