-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
⬆️ rust-analyzer #102912
⬆️ rust-analyzer #102912
Commits on Sep 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ba64c93 - Browse repository at this point
Copy the full SHA ba64c93View commit details -
Configuration menu - View commit details
-
Copy full SHA for aeeb9e0 - Browse repository at this point
Copy the full SHA aeeb9e0View commit details
Commits on Sep 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 77c40f8 - Browse repository at this point
Copy the full SHA 77c40f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 447596c - Browse repository at this point
Copy the full SHA 447596cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b5a66e - Browse repository at this point
Copy the full SHA 4b5a66eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 997fc46 - Browse repository at this point
Copy the full SHA 997fc46View commit details -
Configuration menu - View commit details
-
Copy full SHA for e28046c - Browse repository at this point
Copy the full SHA e28046cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b63234e - Browse repository at this point
Copy the full SHA b63234eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f84b6e - Browse repository at this point
Copy the full SHA 2f84b6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad0a6bf - Browse repository at this point
Copy the full SHA ad0a6bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 301b889 - Browse repository at this point
Copy the full SHA 301b889View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5313bd1 - Browse repository at this point
Copy the full SHA 5313bd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 177ec82 - Browse repository at this point
Copy the full SHA 177ec82View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3931e55 - Browse repository at this point
Copy the full SHA 3931e55View commit details
Commits on Sep 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ed0cf1c - Browse repository at this point
Copy the full SHA ed0cf1cView commit details
Commits on Sep 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d9f5709 - Browse repository at this point
Copy the full SHA d9f5709View commit details -
Auto merge of rust-lang#13259 - Veykril:cargo-config-simplify, r=Veykril
Simplify feature representation in CargoConfig
Configuration menu - View commit details
-
Copy full SHA for bc6d574 - Browse repository at this point
Copy the full SHA bc6d574View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6c067c - Browse repository at this point
Copy the full SHA a6c067cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f2c86e - Browse repository at this point
Copy the full SHA 4f2c86eView commit details -
Configuration menu - View commit details
-
Copy full SHA for cdc362e - Browse repository at this point
Copy the full SHA cdc362eView commit details -
Auto merge of rust-lang#13262 - DidiBear:master, r=lnicola
Remove reference to Toggle inlay hints This simply removes the reference to the `Toggle inlay hints` action after its removal in rust-lang/rust-analyzer#13215. In fact, this reference is still visible [in the User Manual here](https://rust-analyzer.github.io/manual.html#inlay-hints).
Configuration menu - View commit details
-
Copy full SHA for 4d989b5 - Browse repository at this point
Copy the full SHA 4d989b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f87ad8d - Browse repository at this point
Copy the full SHA f87ad8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9845e37 - Browse repository at this point
Copy the full SHA 9845e37View commit details -
Auto merge of rust-lang#13264 - lowr:patch/no-dyn-without-trait, r=Ve…
…ykril Ensure at least one trait bound in `TyKind::DynTy` One would expect `TyKind::DynTy` to have at least one trait bound, but we may produce a dyn type with no trait bounds at all. This patch prevents it by returning `TyKind::Error` in such cases. An "empty" dyn type would have caused panic during method resolution without rust-lang#13257. Although already fixed, I think an invariant to never produce such types would help prevent similar problems in the future.
Configuration menu - View commit details
-
Copy full SHA for bde76b9 - Browse repository at this point
Copy the full SHA bde76b9View commit details
Commits on Sep 20, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7e8eac3 - Browse repository at this point
Copy the full SHA 7e8eac3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 027bfd6 - Browse repository at this point
Copy the full SHA 027bfd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09600a3 - Browse repository at this point
Copy the full SHA 09600a3View commit details -
Auto merge of rust-lang#12966 - OleStrohm:master, r=Veykril
feat: Display the value of enum variant on hover fixes rust-lang#12955 This PR adds const eval support for enums, as well as showing their value on hover, just as consts currently have. I developed these two things at the same time, but I've realized now that they are separate. However since the hover is just a 10 line change (not including tests), I figured I may as well put them in the same PR. Though if you want them split up into "enum const eval support" and "show enum variant value on hover", I think that's reasonable too. Since this adds const eval support for enums this also allows consts that reference enums to have their values computed now too. The const evaluation itself is quite rudimentary, it doesn't keep track of the actual type of the enum, but it turns out that Rust doesn't actually either, and `E::A as u8` is valid regardless of the `repr` on `E`. It also doesn't really care about what expression the enum variant contains, it could for example be a string, despite that not being allowed, but I guess it's up to the `cargo check` diagnostics to inform of such issues anyway?
Configuration menu - View commit details
-
Copy full SHA for 817a6a8 - Browse repository at this point
Copy the full SHA 817a6a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d0d051 - Browse repository at this point
Copy the full SHA 6d0d051View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f233cd - Browse repository at this point
Copy the full SHA 9f233cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for b25f0ba - Browse repository at this point
Copy the full SHA b25f0baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2119c1f - Browse repository at this point
Copy the full SHA 2119c1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bf386f - Browse repository at this point
Copy the full SHA 9bf386fView commit details -
Auto merge of rust-lang#13269 - Veykril:repr, r=Veykril
Properly set the enum variant body type from the repr attribute Follow up for rust-lang/rust-analyzer#12966, fixes some type inference problems
Configuration menu - View commit details
-
Copy full SHA for 5b49745 - Browse repository at this point
Copy the full SHA 5b49745View commit details
Commits on Sep 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c2dc32c - Browse repository at this point
Copy the full SHA c2dc32cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ede5f0 - Browse repository at this point
Copy the full SHA 9ede5f0View commit details
Commits on Sep 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 40e8f03 - Browse repository at this point
Copy the full SHA 40e8f03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 729a9eb - Browse repository at this point
Copy the full SHA 729a9ebView commit details
Commits on Sep 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for fb0ce25 - Browse repository at this point
Copy the full SHA fb0ce25View commit details -
Don't run proc-macro-srv tests on the rust-analyzer repo
proc-macro ABI breakage still affects the tests when a new stable version releases. Ideally we'd still be able to run the tests on the rust-analyzer repo without having to update the proc-macro ABI, but for now just to unblock CI we will ignore them here, as they are still run in upstream.
Configuration menu - View commit details
-
Copy full SHA for f57cd83 - Browse repository at this point
Copy the full SHA f57cd83View commit details -
Auto merge of rust-lang#13286 - Veykril:proc-macro-srv-tests, r=Veykril
Don't run proc-macro-srv tests on the rust-analyzer repo proc-macro ABI breakage still affects the tests when a new stable version releases. Ideally we'd still be able to run the tests on the rust-analyzer repo without having to update the proc-macro ABI, but for now just to unblock CI we will ignore them here, as they are still run in upstream.
Configuration menu - View commit details
-
Copy full SHA for 1440078 - Browse repository at this point
Copy the full SHA 1440078View commit details
Commits on Sep 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7ec9ffa - Browse repository at this point
Copy the full SHA 7ec9ffaView commit details -
Auto merge of rust-lang#13285 - Veykril:variant-body, r=Veykril
Properly support IDE functionality in enum variants
Configuration menu - View commit details
-
Copy full SHA for 4e7bb5e - Browse repository at this point
Copy the full SHA 4e7bb5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0231d19 - Browse repository at this point
Copy the full SHA 0231d19View commit details -
Auto merge of rust-lang#13288 - Veykril:variant-body, r=Veykril
Fix diagnostics not working in enum variant bodies cc rust-lang/rust-analyzer#12966
Configuration menu - View commit details
-
Copy full SHA for fa38c10 - Browse repository at this point
Copy the full SHA fa38c10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73f6af5 - Browse repository at this point
Copy the full SHA 73f6af5View commit details -
Auto merge of rust-lang#13289 - rust-lang:analysis-stats-proc-server,…
… r=Veykril Use the sysroot proc-macro server for analysis-stats Should fix the metrics issues
Configuration menu - View commit details
-
Copy full SHA for 73ab709 - Browse repository at this point
Copy the full SHA 73ab709View commit details
Commits on Sep 26, 2022
-
Auto merge of rust-lang#13209 - lowr:feat/inference-for-generator, r=…
…Veykril feat: type inference for generators This PR implements basic type inference for generator and yield expressions. Things not included in this PR: - Generator upvars and generator witnesses are not implemented. They are only used to determine auto trait impls, so basic type inference should be fine without them, but method resolutions with auto trait bounds may not be resolved correctly. Open questions: - I haven't (yet) implemented `HirDisplay` for `TyKind::Generator`, so generator types are just shown as "{{generator}}" (in tests, inlay hints, hovers, etc.), which is not really nice. How should we show them? - I added moderate amount of stuffs to minicore. I especially didn't want to add `impl<T> Deref for &T` and `impl<T> Deref for &mut T` exclusively for tests for generators; should I move them into the test fixtures or can they be placed in minicore? cc rust-lang#4309
Configuration menu - View commit details
-
Copy full SHA for 1f92965 - Browse repository at this point
Copy the full SHA 1f92965View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7929e9c - Browse repository at this point
Copy the full SHA 7929e9cView commit details -
Auto merge of rust-lang#13248 - harudagondi:unwrap-tuple, r=Veykril
Feature: Add assist to unwrap tuple declarations > Implement rust-lang#12923 for only tuples. > > Does not implement unwrapping for structs, as mentioned in the issue. Add assist to unwrap tuples declarations to separate declarations. ```rust fn main() { $0let (foo, bar, baz) = (1.0, "example", String::new()) } ``` becomes: ```rust fn main() { let foo = 1.0; let bar = "example"; let baz = String::new(); } ``` ## Changelog ### Feature - Added assist to unwrap tuple declarations.
Configuration menu - View commit details
-
Copy full SHA for 1a24003 - Browse repository at this point
Copy the full SHA 1a24003View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa093f5 - Browse repository at this point
Copy the full SHA aa093f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60b432b - Browse repository at this point
Copy the full SHA 60b432bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 651c586 - Browse repository at this point
Copy the full SHA 651c586View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89107d5 - Browse repository at this point
Copy the full SHA 89107d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b21bf25 - Browse repository at this point
Copy the full SHA b21bf25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a8d84b - Browse repository at this point
Copy the full SHA 3a8d84bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e5e517 - Browse repository at this point
Copy the full SHA 7e5e517View commit details
Commits on Sep 27, 2022
-
Auto merge of rust-lang#13275 - Veykril:find-path, r=Veykril
Fix find_path using the wrong module for visibility calculations
Configuration menu - View commit details
-
Copy full SHA for 8c7e376 - Browse repository at this point
Copy the full SHA 8c7e376View commit details -
Auto merge of rust-lang#13295 - rust-lang:sourcegen, r=Veykril
Remove obsolete in-rust-tree feature from sourcegen
Configuration menu - View commit details
-
Copy full SHA for f972cdd - Browse repository at this point
Copy the full SHA f972cddView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb73644 - Browse repository at this point
Copy the full SHA fb73644View commit details -
Auto merge of rust-lang#13189 - unexge:unconfigured-diagnostics-for-f…
…ields, r=Veykril Emit unconfigured code diagnostics for enum variants and struct/union fields Fixes rust-lang/rust-analyzer#12664
Configuration menu - View commit details
-
Copy full SHA for b01cdd8 - Browse repository at this point
Copy the full SHA b01cdd8View commit details -
Auto merge of rust-lang#13296 - Strum355:package-information-package-…
…name, r=Veykril Fix PackageInformation having the crate name instead of package name The `PackageInformation` type from the LSIF PR used the _crate_ name instead of the _package_ name. This caused issues when looking up crates by this name on the Sourcegraph backend, where we sync crate contents, for crates such as actix-web and many of its components (actix-files, actix-http etc etc), see screenshot 1 for the observed symptom. This PR hasnt been tested on other entry points besides cargo (such as project json). See screenshot 2 for the change in behaviour via SCIP snapshot comparison. <details> <summary>Screenshot 1</summary> ![crates.io giving 404](https://user-images.githubusercontent.com/18282288/192286637-8bf7c333-4441-4e60-8cce-de7eaa11ee9f.png) </details> <details> <summary>Screenshot 2</summary> ![before and after from SCIP snapshot output](https://user-images.githubusercontent.com/18282288/192287733-d7e73ff0-abbc-4ae5-82d0-bf9dc45d755c.png) </details> Follow-up PR to my question over at the [rust-lang Zulip](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/canonical.20crate.20name.20confusion.20for.20monikers), excuse any incorrect usages of the term package vs crate.
Configuration menu - View commit details
-
Copy full SHA for 8805d05 - Browse repository at this point
Copy the full SHA 8805d05View commit details -
Auto merge of rust-lang#13300 - Veykril:cfg-false, r=Veykril
Use cfg(any()) instead of cfg(FALSE) for disabling proc-macro test cc rust-lang/rust-analyzer#13286
Configuration menu - View commit details
-
Copy full SHA for bd8c5b6 - Browse repository at this point
Copy the full SHA bd8c5b6View commit details -
Amalgamate file changes for the same file ids in process_changes
When receiving multiple change events for a single file id where the last change is a delete the server panics, as it tries to access the file contents of a deleted file. This occurs due to the VFS changes and the in memory file contents being updated immediately, while `process_changes` processes the events afterwards in sequence which no longer works as it will only observe the final file contents. By folding these events together, we will no longer try to process these intermediate changes, as they aren't relevant anyways. Potentially fixes rust-lang/rust-analyzer#13236
Configuration menu - View commit details
-
Copy full SHA for c3a6c96 - Browse repository at this point
Copy the full SHA c3a6c96View commit details -
Auto merge of rust-lang#13237 - Veykril:process-changes, r=Veykril
Amalgamate file changes for the same file ids in process_changes When receiving multiple change events for a single file id where the last change is a delete the server panics, as it tries to access the file contents of a deleted file. This occurs due to the VFS changes and the in memory file contents being updated immediately, while `process_changes` processes the events afterwards in sequence which no longer works as it will only observe the final file contents. By folding these events together, we will no longer try to process these intermediate changes, as they aren't relevant anyways. Potentially fixes rust-lang/rust-analyzer#13236
Configuration menu - View commit details
-
Copy full SHA for 093de32 - Browse repository at this point
Copy the full SHA 093de32View commit details -
Auto merge of rust-lang#13280 - alanz:errorcode-requestfailed, r=Veykril
Add RequestFailed error code, as per spec 3.17 See microsoft/language-server-protocol#1341
Configuration menu - View commit details
-
Copy full SHA for 03aa704 - Browse repository at this point
Copy the full SHA 03aa704View commit details -
Auto merge of rust-lang#13272 - oknozor:master, r=Veykril
docs(guide): fix Analysis and AnalysisHost doc links
Configuration menu - View commit details
-
Copy full SHA for b16b041 - Browse repository at this point
Copy the full SHA b16b041View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a6c159 - Browse repository at this point
Copy the full SHA 1a6c159View commit details -
Auto merge of rust-lang#13202 - Veykril:cancelled-retry, r=Veykril
Don't retry requests that have already been cancelled
Configuration menu - View commit details
-
Copy full SHA for 9ba55ba - Browse repository at this point
Copy the full SHA 9ba55baView commit details -
Configuration menu - View commit details
-
Copy full SHA for f5fe6b1 - Browse repository at this point
Copy the full SHA f5fe6b1View commit details -
Auto merge of rust-lang#13301 - Veykril:empty-assist-source-changes, …
…r=Veykril Make assist tests panic again on empty source changes
Configuration menu - View commit details
-
Copy full SHA for ad752bd - Browse repository at this point
Copy the full SHA ad752bdView commit details
Commits on Sep 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 6d8903a - Browse repository at this point
Copy the full SHA 6d8903aView commit details -
Auto merge of rust-lang#13311 - lowr:fix/for-loop-item-resolution, r=…
…Veykril fix: infer for-loop item type with `IntoIterator` and `Iterator` Part of rust-lang#13299 We've been inferring the type of the yielded values in for-loop as `<T as IntoIterator>::Item`. We infer the correct type most of the time when we normalize the projection type, but it turns out not always. We should infer the type as `<<T as IntoIterator>::IntoIter as Iterator>::Item`. When one specifies `IntoIter` assoc type of `IntoIterator` but not `Item` in generic bounds, we fail to normalize `<T as IntoIterator>::Item` (even though `IntoIter` is defined like so: `type IntoIter: Iterator<Item = Self::Item>` - rustc does *not* normalize projections based on other projection's bound I believe; see [this playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=e88e19385094cb98fadbf647b4c2082e)). Note that this doesn't fully fix # 13299 - given the following code, chalk can normalize `<I as IntoIterator>::IntoIter` to `S`, but cannot normalize `<S as Iterator>::Item` to `i32`. ```rust struct S; impl Iterator for S { type Item = i32; /* ... */ } fn f<I: IntoIterator<IntoIter = S>>(it: I) { for elem in it {} //^^^^{unknown} } ``` This is because chalk finds multiple answers that satisfy the query `AliasEq(<S as Iterator>::Item = ?X`: `?X = i32` and `?X = <I as IntoIterator>::Item` - which are supposed to be the same type due to the aforementioned bound on `IntoIter` but chalk is unable to figure it out.
Configuration menu - View commit details
-
Copy full SHA for 97f8f4a - Browse repository at this point
Copy the full SHA 97f8f4aView commit details
Commits on Sep 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8c433c7 - Browse repository at this point
Copy the full SHA 8c433c7View commit details -
Auto merge of rust-lang#13319 - Veykril:req-retry, r=Veykril
Fix requests not being retried anymore
Configuration menu - View commit details
-
Copy full SHA for 8132b42 - Browse repository at this point
Copy the full SHA 8132b42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cd57c4 - Browse repository at this point
Copy the full SHA 3cd57c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77cfc9b - Browse repository at this point
Copy the full SHA 77cfc9bView commit details -
Auto merge of rust-lang#13320 - Veykril:ty-alias-hover, r=Veykril
Fix type alias hovers not rendering generic parameters
Configuration menu - View commit details
-
Copy full SHA for 17363b3 - Browse repository at this point
Copy the full SHA 17363b3View commit details -
Auto merge of rust-lang#13318 - Veykril:annotations, r=Veykril
Fix annotations not resolving when lens location is set to whole item Fixes rust-lang/rust-analyzer#13310
Configuration menu - View commit details
-
Copy full SHA for 2293949 - Browse repository at this point
Copy the full SHA 2293949View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ad0334 - Browse repository at this point
Copy the full SHA 3ad0334View commit details -
Auto merge of rust-lang#13321 - Veykril:format-str-args, r=Veykril
Fix move_format_string_arg being tokentree unaware Fixes rust-lang/rust-analyzer#13261
Configuration menu - View commit details
-
Copy full SHA for 5b7e400 - Browse repository at this point
Copy the full SHA 5b7e400View commit details
Commits on Oct 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bfd5f00 - Browse repository at this point
Copy the full SHA bfd5f00View commit details -
Auto merge of rust-lang#13324 - Veykril:trait-impl-completion, r=Veykril
Fix trait impl item completions using macro file text ranges Fixes rust-lang/rust-analyzer#13323
Configuration menu - View commit details
-
Copy full SHA for f88293f - Browse repository at this point
Copy the full SHA f88293fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26cf250 - Browse repository at this point
Copy the full SHA 26cf250View commit details -
Auto merge of rust-lang#13326 - Veykril:proc-macro-srv-config, r=Veykril
Do not use the sysroot proc-macro server when a server path is given explicitly
Configuration menu - View commit details
-
Copy full SHA for bf5cad8 - Browse repository at this point
Copy the full SHA bf5cad8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5424c51 - Browse repository at this point
Copy the full SHA 5424c51View commit details -
Auto merge of rust-lang#13327 - Veykril:proc-macro-srv-config, r=Veykril
Add config for supplying sysroot path
Configuration menu - View commit details
-
Copy full SHA for cdc5493 - Browse repository at this point
Copy the full SHA cdc5493View commit details -
Configuration menu - View commit details
-
Copy full SHA for 870825b - Browse repository at this point
Copy the full SHA 870825bView commit details -
Auto merge of rust-lang#13328 - Veykril:rustc-proc-macro, r=Veykril
Add proc-macro dependency to rustc crates
Configuration menu - View commit details
-
Copy full SHA for 5c28ad1 - Browse repository at this point
Copy the full SHA 5c28ad1View commit details
Commits on Oct 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f8f5a5e - Browse repository at this point
Copy the full SHA f8f5a5eView commit details -
Change generic parameter/argument order
This commit "inverts" the order of generic parameters/arguments of an item and its parent. This is to fulfill chalk's expectation on the order of `Substitution` for generic associated types and it's one step forward for their support (hopefully). Although chalk doesn't put any constraint on the order of `Substitution` for other items, it feels natural to get everything aligned rather than special casing GATs. One complication is that `TyBuilder` now demands its users to pass in parent's `Substitution` upon construction unless it's obvious that the the item has no parent (e.g. an ADT never has parent). All users *should* already know the parent of the item in question, and without this, it cannot be easily reasoned about whether we're pushing the argument for the item or for its parent. Quick comparison of how this commit changes `Substitution`: ```rust trait Trait<TP, const CP: usize> { type Type<TC, const CC: usize> = (); fn f<TC, const CC: usize>() {} } ``` - before this commit: `[Self, TP, CP, TC, CC]` for each trait item - after this commit: `[TC, CC, Self, TP, CP]` for each trait item
Configuration menu - View commit details
-
Copy full SHA for 4385d3d - Browse repository at this point
Copy the full SHA 4385d3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78977cd - Browse repository at this point
Copy the full SHA 78977cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7556f74 - Browse repository at this point
Copy the full SHA 7556f74View commit details
Commits on Oct 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5916803 - Browse repository at this point
Copy the full SHA 5916803View commit details -
Auto merge of rust-lang#13338 - Veykril:flycheck, r=Veykril
Prioritize restart messages in flycheck cc rust-lang/rust-analyzer#12936 (comment)
Configuration menu - View commit details
-
Copy full SHA for f087ebe - Browse repository at this point
Copy the full SHA f087ebeView commit details -
Auto merge of rust-lang#13335 - lowr:patch/change-generic-param-order…
…, r=Veykril internal: change generic parameter order tl;dr: This PR changes the `Substitution` for trait items and methods like so: ```rust trait Trait<TP, const CP: usize> { // note the implicit Self as first parameter type Type<TC, const CC: usize>; fn f<TC, const CC: usize>() {} } impl<TP, const CP: usize> S { fn f<TC, const CC: usize>() {} } ``` - before this PR: `[Self, TP, CP, TC, CC]` for each trait item, `[TP, CP, TC, CC]` for `S::f` - after this PR: `[TC, CC, Self, TP, CP]` for each trait item, `[TC, CC, TP, CP]` for `S::f` --- This PR "inverts" the generic parameters/arguments of an item and its parent. This is to fulfill [chalk's expectation](https://github.com/rust-lang/chalk/blob/d875af0ff196dd6430b5f5fd87a640fa5ab59d1e/chalk-solve/src/rust_ir.rs#L498-L502) on the order of generic arguments in `Substitution`s for generic associated types and it's one step forward for GATs support (hopefully). Although chalk doesn't put any constraint for other items, it feels more natural to get everything aligned than special casing GATs. One complication is that `TyBuilder` now demands its users to pass in parent's `Substitution` upon construction unless it's obvious that the the item has no parent (e.g. an ADT never has parent). All users *should* already know the parent of the item in question, and without this, it cannot be easily reasoned about whether we're pushing the argument for the item or for its parent. Some additional notes: - f8f5a5e: This isn't related to the change, but I felt it's nicer. - 78977cd: There's one major change here other than the generic param order: Default arguments are now bound by the same `Binder` as the item in question rather than a `Binder` limited to parameters they can refer to (i.e. arguments that syntactically appear before them). Now that the order of generic parameters is changed, it would be somewhat complicated to make such `Binder`s as before, and the "full" `Binder`s shouldn't be a problem because we already make sure that the default arguments don't refer to the generic arguments after them with `fallback_bound_vars()`. - 7556f74: This is split from 4385d3d to make it easy to revert if it turns out that the GATs with const generics panic is actually not resolved with this PR. cc rust-lang#11878 rust-lang#11957
Configuration menu - View commit details
-
Copy full SHA for 5bd98e3 - Browse repository at this point
Copy the full SHA 5bd98e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e0a161b - Browse repository at this point
Copy the full SHA e0a161bView commit details -
Auto merge of rust-lang#13339 - lowr:patch/change-generic-param-order…
…, r=Veykril fix: treat enum variants as generic item on their own Fixup for rust-lang#13335 It turns out I tried to merge two procedures into one utility function without noticing the incompatibility. This time I *did* run analysis-stats on the four crates and confirmed it doesn't crash and this patch doesn't cause regression.
Configuration menu - View commit details
-
Copy full SHA for 974caaf - Browse repository at this point
Copy the full SHA 974caafView commit details
Commits on Oct 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e0c9e28 - Browse repository at this point
Copy the full SHA e0c9e28View commit details -
Auto merge of rust-lang#13342 - rust-lang:revert-13328-rustc-proc-mac…
…ro, r=Veykril Revert "Add proc-macro dependency to rustc crates" 1. This panics since it indexes into the wrong thing, so fixes rust-lang/rust-analyzer#13340 2. This didn't fix what I thought it would either Reverts rust-lang/rust-analyzer#13328
Configuration menu - View commit details
-
Copy full SHA for b429df2 - Browse repository at this point
Copy the full SHA b429df2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ded3326 - Browse repository at this point
Copy the full SHA ded3326View commit details -
Auto merge of rust-lang#13344 - lowr:patch/change-generic-param-order…
…, r=Veykril fix: use `BoundVar`s from current generic scope Fixup for rust-lang#13335, addresses rust-lang/rust-analyzer#13339 (comment) Before the change in generic parameter order, `BoundVar`s for trait reference didn't change whether you are in an impl's scope or in an associated item's scope. Now that item's generic params come before its parent's, we need to shift their indices when we are in an associated item's scope.
Configuration menu - View commit details
-
Copy full SHA for 476d043 - Browse repository at this point
Copy the full SHA 476d043View commit details
Commits on Oct 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8862fe6 - Browse repository at this point
Copy the full SHA 8862fe6View commit details
Commits on Oct 6, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a57ef6b - Browse repository at this point
Copy the full SHA a57ef6bView commit details -
Auto merge of rust-lang#13356 - WaffleLapkin:go_to_def_shadow_include…
…, r=Veykril minor: Fix go-to-def for shadowed `include*!` Add a check in go-to-def feature, so that we don't assume any macro named `include`/`include_str`/`include_bytes` is the builtin one.
Configuration menu - View commit details
-
Copy full SHA for f2f3528 - Browse repository at this point
Copy the full SHA f2f3528View commit details -
Auto merge of rust-lang#13353 - wildbook:fix_type_inference_panic, r=…
…Veykril Fix assertion failure in type inference (rust-lang#13352) Fixes rust-lang/rust-analyzer#13352
Configuration menu - View commit details
-
Copy full SHA for a415fb4 - Browse repository at this point
Copy the full SHA a415fb4View commit details
Commits on Oct 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1c0ec9f - Browse repository at this point
Copy the full SHA 1c0ec9fView commit details -
Auto merge of rust-lang#13362 - WaffleLapkin:go_to_def_fix_doc_includ…
…e_str, r=Veykril fix: Make go-to-def work for `#[doc = include_str!("path")]` See the added test, go-to-def on `#[doc = include_str!("path$0")]` should navigate to `path`.
Configuration menu - View commit details
-
Copy full SHA for 8437e4b - Browse repository at this point
Copy the full SHA 8437e4bView commit details
Commits on Oct 8, 2022
-
The main change here should be that flags are not inhereted, so $ rust-analyzer analysis-stats . -v -v would do what it should do We also no longer Don\'t
Configuration menu - View commit details
-
Copy full SHA for 39fa8b5 - Browse repository at this point
Copy the full SHA 39fa8b5View commit details -
Auto merge of rust-lang#13366 - matklad:xflags, r=lnicola
internal: ⬆️ xflags The main change here should be that flags are not inhereted, so $ rust-analyzer analysis-stats . -v -v would do what it should do We also no longer Don\'t
Configuration menu - View commit details
-
Copy full SHA for 61504c8 - Browse repository at this point
Copy the full SHA 61504c8View commit details
Commits on Oct 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c867288 - Browse repository at this point
Copy the full SHA c867288View commit details