aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge #3882bors[bot]2020-04-075-168/+198
|\ | | | | | | | | | | | | | | | | | | 3882: Move computation of missing fields into hir r=matklad a=matklad cc @SomeoneToIgnore, this is that refactoring that moves computation of missing fields to hir. it actually removes meaningful duplication between diagnostics code and the completion code. Nontheless, it's a net addition of code :( Co-authored-by: Aleksey Kladov <[email protected]>
| * Move computation of missing fields into hirAleksey Kladov2020-04-075-168/+198
| |
* | Merge #3881bors[bot]2020-04-071-2/+35
|\| | | | | | | | | | | | | | | | | | | | | 3881: Add functional update test r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Add functional update testAleksey Kladov2020-04-071-0/+33
| |
| * Fix names of test modulesAleksey Kladov2020-04-071-2/+2
|/
* Merge #3878bors[bot]2020-04-074-7/+52
|\ | | | | | | | | | | | | | | | | | | | | 3878: A more precise panic macro r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * A more precise panic macroAleksey Kladov2020-04-071-1/+1
| |
| * Don't insert !() if there's already someAleksey Kladov2020-04-073-3/+45
| |
| * Reorder importsAleksey Kladov2020-04-071-3/+6
| |
* | Merge #3706bors[bot]2020-04-0712-11/+1552
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3706: missing match arms diagnostic r=flodiebold a=JoshMcguigan Following up on https://github.com/rust-analyzer/rust-analyzer/pull/3689#issuecomment-602718222, this PR creates a missing match arms diagnostic. At the moment this is a very early draft, but I wanted to open it just to get some initial feedback. Initial questions: * Have I roughly created the correct boilerplate? * Inside the new `validate_match` function: * Am I correct in thinking I want to do validation by comparing the match arms against `match_expr`? And when analyzing `match_expr` I should be looking at it as a `hir_def::expr::Expr`? * I mostly copied the chained if-let statements from the struct validation. Shouldn't there be a non-failable way to get an AstPtr from the hir data structures? Thanks for all the guidance. Co-authored-by: Josh Mcguigan <[email protected]>
| * add fixme to use type checker rather than manually comparing typesJosh Mcguigan2020-04-071-0/+7
| |
| * PR feedback implementationJosh Mcguigan2020-04-071-94/+331
| |
| * missing match arms diagnostic change source to match expressionJosh Mcguigan2020-04-073-3/+7
| |
| * handle match auto-derefJosh Mcguigan2020-04-072-1/+45
| |
| * improving documentationJosh Mcguigan2020-04-071-16/+64
| |
| * handle non matching enum pattern typesJosh Mcguigan2020-04-072-41/+57
| |
| * remove panicsJosh Mcguigan2020-04-072-66/+214
| |
| * missing match arms diagnosticJosh Mcguigan2020-04-0712-11/+1048
|/
* Merge #3876bors[bot]2020-04-073-6/+6
|\ | | | | | | | | | | | | | | | | | | | | 3876: Better naming for scope completion r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Better naming for scope completionAleksey Kladov2020-04-073-4/+4
| |
| * Better naming for path completionAleksey Kladov2020-04-073-4/+4
|/
* Merge pull request #3863 from Veetaha/feature/migrate-to-rastAleksey Kladov2020-04-07278-25/+23
|\ | | | | Migrate tests .txt -> .rast
| * Migrate tests .txt -> .rastveetaha2020-04-06278-25/+23
| | | | | | | | | | | | | | | | The sytax tree output files now use .rast extension (rust-analyzer syntax tree or rust abstract syntax tree (whatever)). This format has a editors/code/ra_syntax_tree.tmGrammar.json declaration that supplies nice syntax highlighting for .rast files.
* | Merge #3875bors[bot]2020-04-071-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3875: When making a release, just promote the latest nightly r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | When making a release, just promote the latest nightlyAleksey Kladov2020-04-071-2/+2
|/ /
* | Fix yamlAleksey Kladov2020-04-071-1/+1
| |
* | Fix yamlAleksey Kladov2020-04-071-1/+1
| |
* | Merge pull request #3866 from lnicola/fewer-bracesAleksey Kladov2020-04-0712-73/+73
|\ \ | | | | | | Fix unnecessary braces warnings
| * | Fix unnecessary braces warningsLaurențiu Nicola2020-04-0612-73/+73
| | |
* | | Merge #3874bors[bot]2020-04-071-6/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3874: Better config scheme & defaults r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Better config scheme & defaultsAleksey Kladov2020-04-071-6/+14
| | | |
* | | | Run analysis-stats nightlyAleksey Kladov2020-04-071-0/+4
| | | |
* | | | Merge #3872bors[bot]2020-04-071-15/+25
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3872: fix cargo check config with custom command r=matklad a=JoshMcguigan fixes #3871 Previously if `get::<Vec<String>>(value, "/checkOnSave/overrideCommand")` returned `Some` we'd never execute `set(value, "/checkOnSave/command", command)`, even if the `overrideCommand` was empty. I am not sure of the best way to prove this, but I believe the LSP clients send this config with a default value if it is not set by the user, which means `get::<Vec<String>>(value, "/checkOnSave/overrideCommand")` would return `Some(vec![])` and thus we'd never set the command to the user specified value (in the case of #3871, "clippy"). I have tested this fix manually by installing this modified version of rust-analyzer and verifying I can see clippy lints in my editor (`coc.nvim`) with `rust-analyzer.checkOnSave.command": "clippy"`. As best I can tell this would have affected rustfmt extra args too, so this PR also applies the same fix there. Co-authored-by: Josh Mcguigan <[email protected]>
| * | | fix cargo check config with custom commandJosh Mcguigan2020-04-071-15/+25
|/ / /
* | | Merge #3868bors[bot]2020-04-063-2/+33
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3868: Fix Chalk panic r=flodiebold a=flodiebold Fixes #3865. Basically I forgot to shift 'back' when we got `dyn Trait`s back from Chalk, so after going through Chalk a few times, the panic happened. And yes, I did run `analysis-stats` now ;) cc @edwin0cheng Co-authored-by: Florian Diebold <[email protected]>
| * | | Fix Chalk panicFlorian Diebold2020-04-063-2/+33
|/ / / | | | | | | | | | | | | Fixes #3865. Basically I forgot to shift 'back' when we got `dyn Trait`s back from Chalk, so after going through Chalk a few times, the panic happened.
* | | Merge pull request #3867 from matklad/deny-eprintlnAleksey Kladov2020-04-068-13/+39
|\ \ \ | | | | | | | | Check for eprintlns on CI
| * | | More general CI env varAleksey Kladov2020-04-061-1/+1
| | | |
| * | | Check for eprintln on CIAleksey Kladov2020-04-067-12/+38
| |/ /
* | | Merge #3842bors[bot]2020-04-0613-9/+2950
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 3842: Add lib-proc-macro mod in ra_proc_macro_srv r=matklad a=edwin0cheng This PR add a module in ra_proc_macro_srv, which is just copy & paste from rustc lib_proc_macro and remove all unstable features in it. The main idea here is by doing that, we could build the `ra_proc_macro_srv` without nightly compiler and remain ABI compatibility. Co-authored-by: Edwin Cheng <[email protected]>
| * | Add bridge::TokenStream to crate scopeEdwin Cheng2020-04-061-0/+1
| | |
| * | Add proc_macro mod (copy from lib_proc_macro)Edwin Cheng2020-04-0611-0/+2943
| | |
| * | Refactor depsEdwin Cheng2020-04-062-9/+6
|/ /
* | Merge #3864bors[bot]2020-04-061-1/+1
|\ \ | |/ |/| | | | | | | | | | | 3864: Use log::info in trait_solve_query instead of eprintln r=edwin0cheng a=edwin0cheng cc @flodiebold Co-authored-by: Edwin Cheng <[email protected]>
| * Use log info in trait_solve_queryEdwin Cheng2020-04-061-1/+1
|/
* Merge pull request #3853 from matklad/cfAleksey Kladov2020-04-065-12/+9
|\ | | | | Make control token modifier less ambiguous
| * Make control token modifier less ambiguousAleksey Kladov2020-04-065-12/+9
| | | | | | | | | | | | | | | | | | In textmate, keyword.control is used for all kinds of things; in fact, the default scope mapping for keyword is keyword.control! So let's add a less ambiguous controlFlow modifier See Microsoft/vscode#94367
* | Merge #3843bors[bot]2020-04-062-11/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 3843: Remove rustc_lexer dependency in favour of rustc-ap-rustc_lexer r=est31 a=est31 The latter is auto-published on a regular schedule (Right now weekly). See also https://github.com/alexcrichton/rustc-auto-publish Co-authored-by: est31 <[email protected]>
| * | Remove rustc_lexer dependency in favour of rustc-ap-rustc_lexerest312020-04-062-11/+11
| | | | | | | | | | | | The latter is auto-published on a regular schedule (Right now weekly).
* | | Merge #3829bors[bot]2020-04-061-12/+110
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3829: Adds to SSR match for semantically equivalent call and method call r=matklad a=mikhail-m1 #3186 maybe I've missed some corner cases, but it works in general Co-authored-by: Mikhail Modin <[email protected]>