Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add test for `$crate` in builtin macros | Jonas Schievink | 2020-12-08 | 1 | -0/+28 |
| | | | | Fixes #6716 | ||||
* | Make `compile_error!` message match upstream rustc | Jonas Schievink | 2020-12-03 | 1 | -1/+1 |
| | | | | It only consists of the argument passed to it | ||||
* | Make `compile_error!` lazy and emit a diagnostic | Jonas Schievink | 2020-12-03 | 1 | -0/+6 |
| | |||||
* | Give better diagnostic if `OUT_DIR` is unset | Jonas Schievink | 2020-12-03 | 1 | -0/+3 |
| | |||||
* | Update/Fix tests | Jonas Schievink | 2020-12-03 | 1 | -4/+15 |
| | |||||
* | Test macro diagnostics in body lowering | Jonas Schievink | 2020-12-02 | 1 | -0/+41 |
| | |||||
* | Attach macro expansion errors to the right file | Jonas Schievink | 2020-12-02 | 1 | -2/+5 |
| | |||||
* | Emit unresolved proc macro errors | Jonas Schievink | 2020-12-01 | 2 | -9/+28 |
| | |||||
* | Emit macro diagnostics when lowering bodies | Jonas Schievink | 2020-11-30 | 2 | -3/+17 |
| | |||||
* | Cleanup API | Aleksey Kladov | 2020-11-06 | 1 | -10/+11 |
| | |||||
* | Remove more unreachable pubs | Aleksey Kladov | 2020-11-02 | 1 | -2/+2 |
| | |||||
* | Deny unreachable-pub | Aleksey Kladov | 2020-11-02 | 1 | -3/+3 |
| | | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034. | ||||
* | Diagnose #[cfg]s in bodies | Jonas Schievink | 2020-10-23 | 3 | -14/+141 |
| | |||||
* | Fix `mut self` not emitting mutable binding on `self` use | Lukas Wirth | 2020-10-11 | 1 | -1/+4 |
| | |||||
* | Merge #5971 | bors[bot] | 2020-09-13 | 1 | -1/+4 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971: Implement async blocks r=flodiebold a=oxalica Fix #4018 @flodiebold already gave a generic guide in the issue. Here's some concern about implementation detail: - Chalk doesn't support generator type yet. - Adding generator type as a brand new type (ctor) can be complex and need to *re-introduced* builtin impls. (Like how we implement closures before native closure support of chalk, which is already removed in #5401 ) - The output type of async block should be known after type inference of the whole body. - We cannot directly get the type from source like return-positon-impl-trait. But we still need to provide trait bounds when chalk asking for `opaque_ty_data`. - During the inference, the output type of async block can be temporary unknown and participate the later inference. `let a = async { None }; let _: i32 = a.await.unwrap();` So in this PR, the type of async blocks is inferred as an opaque type parameterized by the `Future::Output` type it should be, like what we do with closure type. And it really works now. Well, I still have some questions: - The bounds `AsyncBlockImplType<T>: Future<Output = T>` is currently generated in `opaque_ty_data`. I'm not sure if we should put this code here. - Type of async block is now rendered as `impl Future<Output = OutputType>`. Do we need to special display to hint that it's a async block? Note that closure type has its special format, instead of `impl Fn(..) -> ..` or function type. Co-authored-by: oxalica <[email protected]> | ||||
| * | Implement async blocks | oxalica | 2020-09-10 | 1 | -1/+4 |
| | | |||||
* | | Implement box pattern inference | Jonas Schievink | 2020-09-12 | 1 | -1/+5 |
|/ | |||||
* | :arrow_up: ungrammar | Aleksey Kladov | 2020-08-21 | 1 | -1/+1 |
| | |||||
* | Rename ra_hir_def -> hir_def | Aleksey Kladov | 2020-08-13 | 2 | -0/+1387 |