Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix type parameter defaults | Florian Diebold | 2020-06-05 | 1 | -2/+2 |
| | | | | | They should not be applied in expression or pattern contexts, unless there are other explicitly given type args. | ||||
* | Implement return position impl trait / opaque type support | Florian Diebold | 2020-06-05 | 1 | -21/+2 |
| | | | | | | | | | | | | | This is working, but I'm not that happy with how the lowering works. We might need an additional representation between `TypeRef` and `Ty` where names are resolved and `impl Trait` bounds are separated out, but things like inference variables don't exist and `impl Trait` is always represented the same way. Also note that this doesn't implement correct handling of RPIT *inside* the function (which involves turning the `impl Trait`s into variables and creating obligations for them). That intermediate representation might help there as well. | ||||
* | correctly infer labelled breaks | robojumper | 2020-05-31 | 1 | -0/+11 |
| | |||||
* | Infer return type of loops with value breaks. | Roland Ruckerbauer | 2020-05-18 | 1 | -0/+1 |
| | |||||
* | Handle `Self` in values and patterns | Florian Diebold | 2020-05-15 | 1 | -13/+66 |
| | | | | | | | | | I.e. - `Self(x)` or `Self` in tuple/unit struct impls - `Self::Variant(x)` or `Self::Variant` in enum impls - the same in patterns Fixes #4454. | ||||
* | Highlight mutable statics as mutable | Matthew Jasper | 2020-05-10 | 1 | -2/+6 |
| | |||||
* | Add diagnostic for break outside of loop | Florian Diebold | 2020-05-08 | 1 | -1/+12 |
| | |||||
* | Handle break somewhat better | Florian Diebold | 2020-05-08 | 1 | -0/+7 |
| | | | | | Still no break-with-value or labels, but at least we know that `loop { break; }` doesn't diverge. | ||||
* | Implement better handling of divergence | Florian Diebold | 2020-05-08 | 1 | -0/+40 |
| | | | | | | | | Divergence here means that for some reason, the end of a block will not be reached. We tried to model this just using the never type, but that doesn't work fully (e.g. in `let x = { loop {}; "foo" };` x should still have type `&str`); so this introduces a `diverges` flag that the type checker keeps track of, like rustc does. | ||||
* | Fix panic in NoSuchField diagnostic | Aleksey Kladov | 2020-04-25 | 1 | -3/+2 |
| | |||||
* | Rename StructField -> Field | Aleksey Kladov | 2020-04-25 | 1 | -8/+8 |
| | |||||
* | Fix goto definition for record patterns | Aleksey Kladov | 2020-04-18 | 1 | -0/+4 |
| | |||||
* | Simplify Diagnostic structure | Aleksey Kladov | 2020-04-17 | 1 | -8/+1 |
| | | | | | | It's not entirely clear what subnode ranges should mean in the presence of macros, so let's leave them out for now. We are not using them heavily anyway. | ||||
* | Don't expose impl details of SyntaxPtr | Aleksey Kladov | 2020-04-17 | 1 | -2/+9 |
| | |||||
* | Use `dyn Trait` for working with databse | Aleksey Kladov | 2020-03-16 | 1 | -19/+19 |
| | | | | | | | It improves compile time in `--release` mode quite a bit, it doesn't really slow things down and, conceptually, it seems closer to what we want the physical architecture to look like (we don't want to monomorphise EVERYTHING in a single leaf crate). | ||||
* | Normalize waiting queries names | Aleksey Kladov | 2020-03-06 | 1 | -2/+2 |
| | |||||
* | Less confusing profile names | Aleksey Kladov | 2020-03-06 | 1 | -1/+1 |
| | |||||
* | Support aliases and Self in struct literals | Florian Diebold | 2020-03-06 | 1 | -1/+27 |
| | | | | Fixes #3306. | ||||
* | Do autoderef for indexing | Florian Diebold | 2020-02-29 | 1 | -2/+6 |
| | |||||
* | Fix a common false-positive type mismatch | Florian Diebold | 2020-02-29 | 1 | -5/+36 |
| | | | | | | | | | E.g. for `&{ some_string() }` in a context where a `&str` is expected, we reported a mismatch inside the block. The problem is that we're passing an expectation of `str` down, but the expectation is more of a hint in this case. There's a long comment in rustc about this, which I just copied. Also, fix reported location for type mismatches in macros. | ||||
* | Implement unsize coercion using proper trait solving | Florian Diebold | 2020-02-22 | 1 | -7/+0 |
| | |||||
* | Run cargo +nightly fix --clippy -Z unstable-options | Kirill Bulatov | 2020-02-18 | 1 | -6/+5 |
| | |||||
* | Formatting | Florian Diebold | 2020-02-07 | 1 | -3/+6 |
| | |||||
* | Clean up RPIT a bit | Florian Diebold | 2020-02-07 | 1 | -26/+2 |
| | |||||
* | Fix APIT some more | Florian Diebold | 2020-02-07 | 1 | -2/+5 |
| | |||||
* | WIP use params for APIT | Florian Diebold | 2020-02-07 | 1 | -1/+1 |
| | |||||
* | Lower impl trait to variables, move away from using placeholders where they ↵ | Florian Diebold | 2020-02-07 | 1 | -13/+5 |
| | | | | don't belong | ||||
* | Add impl trait lowering mode | Florian Diebold | 2020-02-07 | 1 | -8/+25 |
| | |||||
* | Introduce TyLoweringContext | Florian Diebold | 2020-02-07 | 1 | -9/+8 |
| | |||||
* | Split `infer` query into two for better profiling | Michal Terepeta | 2020-01-03 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change as we did with `crate_def_map` and it does seem that we mostly spend time in salsa, without recomputing much on rust-analyzer side. Example output: ``` 233ms - handle_inlay_hints 163ms - get_inlay_hints 163ms - SourceAnalyzer::new 67ms - def_with_body_from_child_node 67ms - analyze_container 67ms - analyze_container 67ms - Module::from_definition 67ms - Module::from_file 67ms - crate_def_map 0ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 66ms - ??? 0ms - crate_def_map (1 calls) 0ms - crate_def_map (1 calls) 96ms - infer 2ms - trait_solve_query (2 calls) 94ms - ??? 0ms - body_with_source_map_query (1 calls) 0ms - crate_def_map (1 calls) [...] ``` Signed-off-by: Michal Terepeta <[email protected]> | ||||
* | Resolve traits in infer using lang item infrastructure | Emil Lauridsen | 2019-12-29 | 1 | -10/+13 |
| | |||||
* | Check if parameters is empty | Edwin Cheng | 2019-12-24 | 1 | -4/+6 |
| | |||||
* | Add FIXME | Edwin Cheng | 2019-12-24 | 1 | -1/+5 |
| | |||||
* | Implement infer await from async func | Edwin Cheng | 2019-12-24 | 1 | -2/+15 |
| | |||||
* | Fix coercion of last expression in function body | Florian Diebold | 2019-12-20 | 1 | -1/+1 |
| | |||||
* | Handle closure return types | Florian Diebold | 2019-12-20 | 1 | -1/+6 |
| | | | | Fixes #2547. | ||||
* | Use fill instread of for loop | Edwin Cheng | 2019-12-19 | 1 | -5/+3 |
| | |||||
* | Use build_for_def | Edwin Cheng | 2019-12-19 | 1 | -1/+1 |
| | |||||
* | Add std::ops::Index support for infering | Edwin Cheng | 2019-12-19 | 1 | -1/+21 |
| | |||||
* | Add test mark | Florian Diebold | 2019-12-15 | 1 | -0/+2 |
| | |||||
* | Handle impl Trait more correctly | Florian Diebold | 2019-12-15 | 1 | -1/+24 |
| | | | | | | | When calling a function, argument-position impl Trait is transparent; same for return-position impl Trait when inside the function. So in these cases, we need to represent that type not by `Ty::Opaque`, but by a type variable that can be unified with whatever flows into there. | ||||
* | Use different types for path with and without generics | Aleksey Kladov | 2019-12-14 | 1 | -1/+1 |
| | |||||
* | Use path macro | Florian Diebold | 2019-12-13 | 1 | -13/+13 |
| | |||||
* | Rename N! to name! | Florian Diebold | 2019-12-13 | 1 | -6/+6 |
| | |||||
* | Add macros for known names and paths | Florian Diebold | 2019-12-13 | 1 | -6/+6 |
| | |||||
* | Correctly infer - and ! using std::ops::{Neg,Not} | Emil Lauridsen | 2019-12-13 | 1 | -2/+14 |
| | |||||
* | Add helper for resolving associated type of trait in infer | Emil Lauridsen | 2019-12-13 | 1 | -0/+18 |
| | |||||
* | Make unify pub(crate) | Florian Diebold | 2019-12-03 | 1 | -1/+1 |
| | |||||
* | Check receiver type properly | Florian Diebold | 2019-12-02 | 1 | -2/+4 |
| | |||||
* | Extract unification code to unify module | Florian Diebold | 2019-12-02 | 1 | -233/+22 |
| |