Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAM: parse of generic parameters for assoc types / type aliases and assoc type bindings #8542

Merged
merged 1 commit into from Apr 29, 2022

Conversation

mchernyavsky
Copy link
Member

@mchernyavsky mchernyavsky commented Feb 10, 2022

Relates to #6633.

changelog: Parse of generic parameters for assoc types / type aliases and assoc type bindings

@mchernyavsky mchernyavsky added the fix Pull requests that fix some bug(s) label Feb 10, 2022
@mchernyavsky mchernyavsky added this to In Progress in To test via automation Feb 10, 2022
@mchernyavsky mchernyavsky assigned dima74 and vlad20012 and unassigned vlad20012 and dima74 Feb 16, 2022
@vlad20012
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Feb 21, 2022
7816: IDE: convert JSON object to Rust struct after paste r=dima74 a=Kobzol

This PR adds a copy paste processor that tries to convert pasted JSON-like text to a Rust struct (according to the `serde` data model). Currently it does not actually implement any `serde` things on the struct to keep this PR simpler (but it's easy to add `Serialize/Deserialize` derive to the struct using existing intentions and completion).

It currently works like this:
![json](https://user-images.githubusercontent.com/4539057/136369971-6dd99a4d-372d-4ebc-ba78-aed3bbb17850.gif)

Improvements (possibly for follow-up PRs):
- [ ] Add `#[derive(Serialize, Deserialize)]`, possibly with auto import of these traits.
- [ ] Add `serde` with `derive` feature (or `serde_derive` in edition 2015) to `Cargo.toml` if it's not already included (#7405)
- [ ] Parametrize the behaviour in settings (allow to turn it off). Not sure if this is needed `@Undin?`

Fixes: #7783

changelog: You can now paste JSON objects into Rust files and convert them to a Rust struct.

8542: GRAM: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings r=vlad20012 a=mchernyavsky

Relates to #6633.

changelog: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings


8571: ANN: Fix incorrectly providing `Add unsafe to function` in the main function r=Undin a=Stzx

changelog:

Fixed: #8530 


8586: UI: fix wrong indents in new project panel with new project wizard r=ozkriff a=Undin

It's a temporary workaround. The proper solution should be done as part of #8585

| Before | After |
| - | - |
| <img width="889" alt="Screen Shot 2022-02-21 at 15 58 18" src="https://user-images.githubusercontent.com/2539310/154959839-c43eb073-2a8d-46d0-b206-ad9d62cde61b.png"> | <img width="890" alt="Screen Shot 2022-02-21 at 15 55 52" src="https://user-images.githubusercontent.com/2539310/154959488-26d3712a-5ca6-4451-b6ae-cd8edfa08d41.png"> |


Fixes #8508



changelog: Fix wrong indents in UI during creation of a new Rust project in IDEA


Co-authored-by: Jakub Beránek <berykubik@gmail.com>
Co-authored-by: mhernyavsky <chernyavsky.mikhail@gmail.com>
Co-authored-by: Stzx <silence.m@hotmail.com>
Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
@bors
Copy link
Contributor

bors bot commented Feb 21, 2022

Build failed (retrying...):

bors bot added a commit that referenced this pull request Feb 21, 2022
7816: IDE: convert JSON object to Rust struct after paste r=dima74 a=Kobzol

This PR adds a copy paste processor that tries to convert pasted JSON-like text to a Rust struct (according to the `serde` data model). Currently it does not actually implement any `serde` things on the struct to keep this PR simpler (but it's easy to add `Serialize/Deserialize` derive to the struct using existing intentions and completion).

It currently works like this:
![json](https://user-images.githubusercontent.com/4539057/136369971-6dd99a4d-372d-4ebc-ba78-aed3bbb17850.gif)

Improvements (possibly for follow-up PRs):
- [ ] Add `#[derive(Serialize, Deserialize)]`, possibly with auto import of these traits.
- [ ] Add `serde` with `derive` feature (or `serde_derive` in edition 2015) to `Cargo.toml` if it's not already included (#7405)
- [ ] Parametrize the behaviour in settings (allow to turn it off). Not sure if this is needed `@Undin?`

Fixes: #7783

changelog: You can now paste JSON objects into Rust files and convert them to a Rust struct.

8542: GRAM: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings r=vlad20012 a=mchernyavsky

Relates to #6633.

changelog: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings


Co-authored-by: Jakub Beránek <berykubik@gmail.com>
Co-authored-by: mhernyavsky <chernyavsky.mikhail@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 21, 2022

Build failed (retrying...):

bors bot added a commit that referenced this pull request Feb 22, 2022
8542: GRAM: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings r=vlad20012 a=mchernyavsky

Relates to #6633.

changelog: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings


Co-authored-by: mhernyavsky <chernyavsky.mikhail@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 22, 2022

Build failed:

@mchernyavsky
Copy link
Member Author

bors retry

bors bot added a commit that referenced this pull request Feb 22, 2022
8542: GRAM: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings r=vlad20012 a=mchernyavsky

Relates to #6633.

changelog: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings


Co-authored-by: mhernyavsky <chernyavsky.mikhail@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 22, 2022

Build failed:

@mchernyavsky mchernyavsky force-pushed the fix-parsing-gat branch 2 times, most recently from 57718d1 to 959f2fb Compare April 29, 2022 11:43
…iases and assoc type bindings

Co-authored-by: vlad20012 <beskvlad@gmail.com>
Copy link
Member

@vlad20012 vlad20012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot added a commit that referenced this pull request Apr 29, 2022
8542: GRAM: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings r=vlad20012 a=mchernyavsky

Relates to #6633.

changelog: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings


Co-authored-by: mhernyavsky <chernyavsky.mikhail@gmail.com>
@bors
Copy link
Contributor

bors bot commented Apr 29, 2022

Build failed:

@mchernyavsky
Copy link
Member Author

bors retry

@bors
Copy link
Contributor

bors bot commented Apr 29, 2022

Build succeeded:

@bors bors bot merged commit 484384d into master Apr 29, 2022
To test automation moved this from In Progress to Test Apr 29, 2022
@bors bors bot deleted the fix-parsing-gat branch April 29, 2022 16:16
@github-actions github-actions bot added this to the v170 milestone Apr 29, 2022
@Undin Undin added feature and removed fix Pull requests that fix some bug(s) labels Apr 30, 2022
@Undin Undin changed the title GRAM: Fix parsing of generic parameters for assoc types / type aliases and assoc type bindings GRAM: parse of generic parameters for assoc types / type aliases and assoc type bindings Apr 30, 2022
@mili-l mili-l moved this from Test to Done in To test May 9, 2022
bors bot added a commit that referenced this pull request Dec 9, 2022
8544: TY: Support type inference for GATs r=vlad20012 a=mchernyavsky

Relates to #6633.

Depends on #8542.

changelog: Provide initial type inference support for [GATs](https://blog.rust-lang.org/2022/10/28/gats-stabilization.html)


Co-authored-by: Mikhail Chernyavsky <mikhail.chernyavsky@jetbrains.com>
Co-authored-by: vlad20012 <beskvlad@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants