| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2022-07-30 | Always create elided lifetimes, even if inferred. | Camille GILLOT | -23/+20 | |
| 2022-07-26 | Move fn parameter ribs outwards. | Camille GILLOT | -36/+62 | |
| 2022-07-26 | Replace LifetimeRes::Anonymous by LifetimeRes::Infer. | Camille GILLOT | -71/+37 | |
| 2022-07-26 | Remove the distinction between LifetimeName::Implicit and ↵ | Camille GILLOT | -38/+12 | |
| LifetimeName::Underscore. | ||||
| 2022-07-26 | Do not produce extra lifetime parameters when not needed. | Camille GILLOT | -0/+3 | |
| 2022-07-25 | Auto merge of #97313 - cjgillot:ast-lifetimes-anon, r=petrochenkov | bors | -161/+499 | |
| Resolve function lifetime elision on the AST ~Based on https://github.com/rust-lang/rust/pull/97720~ Lifetime elision for functions is purely syntactic in nature, so can be resolved on the AST. This PR replicates the elision logic and diagnostics on the AST, and replaces HIR-based resolution by a `delay_span_bug`. This refactor allows for more consistent diagnostics, which don't have to guess the original code from HIR. r? `@petrochenkov` | ||||
| 2022-07-25 | Report elision failures on the AST. | Camille GILLOT | -161/+473 | |
| 2022-07-23 | Use span_bug in case of unexpected rib kind | Jordan McQueen | -1/+1 | |
| Extremely minor QOL change to improve the ICE output in case this default match case is encountered (an unexpected rib kind). | ||||
| 2022-07-20 | Introduce AnonymousLifetimeRib::Elided and use it for implied 'static. | Camille GILLOT | -2/+28 | |
| 2022-07-19 | Auto merge of #98120 - TaKO8Ki:box-diagnostic-metadata-field, r=estebank | bors | -2/+2 | |
| [Experiment] Box `diagnostic_metadata` field closes #97954 r? `@estebank` | ||||
| 2022-07-14 | Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillot | Dylan DPC | -8/+45 | |
| Implement `for<>` lifetime binder for closures This PR implements RFC 3216 ([TI](https://github.com/rust-lang/rust/issues/97362)) and allows code like the following: ```rust let _f = for<'a, 'b> |a: &'a A, b: &'b B| -> &'b C { b.c(a) }; // ^^^^^^^^^^^--- new! ``` cc ``@Aaron1011`` ``@cjgillot`` | ||||
| 2022-07-13 | Always use CreateParameter mode for function definitions. | Camille GILLOT | -11/+9 | |
| 2022-07-12 | Add `LifetimeBinderKind::Closure` | Maybe Waffle | -1/+3 | |
| 2022-07-12 | Lower closure binders to hir & properly check them | Maybe Waffle | -7/+42 | |
| 2022-07-12 | Parse closure binders | Maybe Waffle | -1/+1 | |
| This is first step in implementing RFC 3216. - Parse `for<'a>` before closures in ast - Error in lowering - Add `closure_lifetime_binder` feature | ||||
| 2022-07-11 | Auto merge of #98637 - cjgillot:bare-trait-anon-lt, r=petrochenkov | bors | -0/+24 | |
| Create fresh lifetime parameters for bare fn trait too The current code fails to account for the equivalence between `dyn FnMut(&mut u8)` and bare `FnMut(&mut u8)`, and treated them differently. This PR introduces a special case for `Fn` traits, which are always fully resolved. Fixes #98616 Fixes #98726 This will require a beta-backport, as beta contains that bug. r? `@petrochenkov` | ||||
| 2022-07-08 | Check if E0530 is `rustc_resolve::late::PatternSource::Match` to emit suggestion | Obei Sideg | -4/+4 | |
| 2022-07-08 | Check if E0530 is `tuple variant` or `tuple struct` to emit suggestion | Obei Sideg | -2/+2 | |
| 2022-07-02 | Handle fresh lifetimes on bare trait objects. | Camille GILLOT | -0/+24 | |
| 2022-06-23 | Remove excess rib while resolving closures | Maybe Waffle | -1/+3 | |
| 2022-06-21 | Use CreateParameter mode for closures too. | Camille GILLOT | -5/+10 | |
| 2022-06-21 | Always create parameters for functions-like types. | Camille GILLOT | -53/+140 | |
| 2022-06-19 | Leave the responsibility to create `Fresh` lifetimes to lowering. | Camille GILLOT | -23/+11 | |
| 2022-06-19 | Make matches exhaustive. | Camille GILLOT | -3/+9 | |
| 2022-06-19 | Remove the `region` terminology. | Camille GILLOT | -9/+9 | |
| 2022-06-18 | Separate `AnonymousCreateParameter` and `ReportElidedInPath`. | Camille GILLOT | -62/+93 | |
| 2022-06-18 | Refactor visit_fn. | Camille GILLOT | -65/+96 | |
| 2022-06-18 | Rustfmt resolve_implementation. | Camille GILLOT | -39/+57 | |
| 2022-06-18 | Extract AssocItem handling. | Camille GILLOT | -166/+131 | |
| 2022-06-15 | box `diagnostic_metadata` field | Takayuki Maeda | -2/+2 | |
| 2022-06-14 | Make ResolverAstLowering a struct. | Camille GILLOT | -2/+1 | |
| 2022-06-11 | Rollup merge of #97812 - TaKO8Ki:suggest-to-swap-struct-and-trait, r=estebank | Dylan DPC | -1/+8 | |
| Suggest to swap a struct and a trait in trait impls closes #89590 | ||||
| 2022-06-09 | Do not introduce bindings for types and consts in HRTB. | Camille GILLOT | -1/+6 | |
| 2022-06-07 | suggest swapping a struct and a trait | Takayuki Maeda | -1/+8 | |
| fmt | ||||
| 2022-06-05 | Rename `visit_generic_param{_slice => s}` | Maybe Waffle | -5/+5 | |
| 2022-06-03 | Replace `&Vec<_>`s with `&[_]`s | Maybe Waffle | -6/+6 | |
| 2022-06-03 | Use the same message as type & const generics. | Camille GILLOT | -28/+20 | |
| 2022-06-03 | Reuse resolve_label to check lifetime shadowing. | Camille GILLOT | -33/+20 | |
| 2022-06-03 | Do not lower generic lifetime params when AST resolution emitted an error. | Camille GILLOT | -0/+7 | |
| 2022-06-02 | Stop warning against unrelated labels. | Camille GILLOT | -1/+0 | |
| 2022-06-02 | Do not report mixed label/lifetime shadowing. | Camille GILLOT | -38/+12 | |
| 2022-06-02 | Diagnose shadowing on AST. | Camille GILLOT | -26/+93 | |
| 2022-05-21 | Fix broken intra-doc link | Michael Howell | -1/+1 | |
| 2022-05-20 | Remove `crate` visibility usage in compiler | Jacob Pratt | -9/+9 | |
| 2022-05-20 | Lint single-use-lifetimes on the AST. | Camille GILLOT | -52/+126 | |
| 2022-05-20 | Introduce BareFnTy::decl_span and fix generics span. | Camille GILLOT | -12/+3 | |
| 2022-05-20 | Introduce LifetimeCtxt. | Camille GILLOT | -2/+2 | |
| 2022-05-07 | Permit asm_const and asm_sym to reference outer generic params | Gary Guo | -0/+23 | |
| 2022-05-06 | Rollup merge of #96557 - nbdd0121:const, r=oli-obk | Guillaume Gomez | -1/+8 | |
| Allow inline consts to reference generic params Tracking issue: #76001 The RFC says that inline consts cannot reference to generic parameters (for now), same as array length expressions. And expresses that it's desirable for it to reference in-scope generics, when array length expressions gain that feature as well. However it is possible to implement this for inline consts before doing this for all anon consts, because inline consts are only used as values and they won't be used in the type system. So we can have: ```rust fn foo<T>() { let x = [4i32; std::mem::size_of::<T>()]; // NOT ALLOWED (for now) let x = const { std::mem::size_of::<T>() }; // ALLOWED with this PR! let x = [4i32; const { std::mem::size_of::<T>() }]; // NOT ALLOWED (for now) } ``` This would make inline consts super useful for compile-time checks and assertions: ```rust fn assert_zst<T>() { const { assert!(std::mem::size_of::<T>() == 0) }; } ``` This would create an error during monomorphization when `assert_zst` is instantiated with non-ZST `T`s. A error during mono might sound scary, but this is exactly what a "desugared" inline const would do: ```rust fn assert_zst<T>() { struct F<T>(T); impl<T> F<T> { const V: () = assert!(std::mem::size_of::<T>() == 0); } let _ = F::<T>::V; } ``` It should also be noted that the current inline const implementation can already reference the type params via type inference, so this resolver-level restriction is not any useful either: ```rust fn foo<T>() -> usize { let (_, size): (PhantomData<T>, usize) = const { const fn my_size_of<T>() -> (PhantomData<T>, usize) { (PhantomData, std::mem::size_of::<T>()) } my_size_of() }; size } ``` ```@rustbot``` label: F-inline_const | ||||
| 2022-05-05 | Rollup merge of #96507 - TaKO8Ki:suggest-calling-associated-function, r=lcnr | Matthias Krüger | -0/+5 | |
| Suggest calling `Self::associated_function()` closes #96453 | ||||
