| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2024-11-15 | Rollup merge of #133080 - ehuss:edition-desugar-span, r=compiler-errors | Guillaume Gomez | -0/+75 | |
| Fix span edition for 2024 RPIT coming from an external macro This fixes a problem where code generated by an external macro with an RPIT would end up using the call-site edition instead of the macro's edition for the RPIT. When used from a 2024 crate, this caused the code to change behavior to the 2024 capturing rules, which we don't want. This was caused by the impl-trait lowering code would replace the span with one marked with `DesugaringKind::OpaqueTy` desugaring. However, it was also overriding the edition of the span with the edition of the local crate. Instead it should be using the edition of the span itself. Fixes https://github.com/rust-lang/rust/issues/132917 | ||||
| 2024-11-15 | Fix span edition for 2024 RPIT coming from an external macro | Eric Huss | -93/+1 | |
| This fixes a problem where code generated by an external macro with an RPIT would end up using the call-site edition instead of the macro's edition for the RPIT. When used from a 2024 crate, this caused the code to change behavior to the 2024 capturing rules, which we don't want. This was caused by the impl-trait lowering code would replace the span with one marked with `DesugaringKind::OpaqueTy` desugaring. However, it was also overriding the edition of the span with the edition of the local crate. Instead it should be using the edition of the span itself. Fixes https://github.com/rust-lang/rust/issues/132917 | ||||
| 2024-11-15 | Rollup merge of #132817 - compiler-errors:impl-trait-overcaptures-apit, ↵ | Matthias Krüger | -16/+45 | |
| r=BoxyUwU Recurse into APITs in `impl_trait_overcaptures` We were previously not detecting cases where an RPIT was located in the return type of an async function, leading to underfiring of the `impl_trait_overcaptures`. This PR does this recursion properly now. cc https://github.com/rust-lang/rust/issues/132809 | ||||
| 2024-11-15 | Add test for precise-capturing from an external macro | Eric Huss | -0/+167 | |
| 2024-11-12 | Make precise capturing suggestion machine-applicable only if it has not APITs | Michael Goulet | -0/+52 | |
| 2024-11-11 | Recurse into APITs in impl_trait_overcaptures | Michael Goulet | -16/+45 | |
| 2024-11-09 | Dont suggest use<APIT> | Michael Goulet | -12/+61 | |
| 2024-11-09 | Suggest turning APITs into generics in opaque overcaptures | Michael Goulet | -1/+65 | |
| 2024-10-31 | Rollup merge of #132209 - compiler-errors:modifiers, r=fmease | Jubilee | -25/+9 | |
| Fix validation when lowering `?` trait bounds Pass the unlowered (`rustc_hir`) polarity to `lower_poly_trait_ref`. This allows us to actually *validate* that generic args are actually valid on `?Trait` paths. This actually regressed in #113671 because that PR changed the behavior where we were inadvertently re-lowering paths as `BoundPolarity::Positive`, which was also coincidentally the only place we were enforcing the generics on `?Trait` paths were correct. | ||||
| 2024-10-31 | Try to point out when edition 2024 lifetime capture rules cause borrowck issues | Michael Goulet | -0/+521 | |
| 2024-10-30 | Actually do validation for poly trait refs with ? modifier | Michael Goulet | -25/+9 | |
| 2024-10-19 | Make sure that outer opaques capture inner opaques's lifetimes even with ↵ | Michael Goulet | -0/+37 | |
| precise capturing syntax | ||||
| 2024-10-10 | Clarify implicit captures for RPITIT | Michael Goulet | -2/+2 | |
| 2024-10-10 | Add variances to RPITITs | Michael Goulet | -141/+141 | |
| 2024-10-10 | Add gate for precise capturing in traits | Michael Goulet | -0/+18 | |
| 2024-10-10 | Move ty::Error branch into super_combine_tys | Michael Goulet | -19/+1 | |
| 2024-09-16 | Auto merge of #130439 - matthiaskrgr:rollup-1lkzo74, r=matthiaskrgr | bors | -0/+58 | |
| Rollup of 4 pull requests Successful merges: - #123436 (linker: Allow MSVC to use import libraries following the Meson/MinGW convention) - #130410 (Don't ICE when generating `Fn` shim for async closure with borrowck error) - #130412 (Don't ICE when RPITIT captures more method args than trait definition) - #130436 (Ignore reduce-fadd-unordered on SGX platform) r? `@ghost` `@rustbot` modify labels: rollup | ||||
| 2024-09-16 | Don't ICE when RPITIT captures more method args than trait definition | Michael Goulet | -0/+58 | |
| 2024-09-16 | Introduce distinct error codes for precise capturing | Michael Goulet | -5/+5 | |
| 2024-09-16 | Do precise capturing arg validation in resolve | Michael Goulet | -13/+22 | |
| 2024-09-05 | Don't worry about uncaptured contravariant lifetimes if they outlive a ↵ | Michael Goulet | -0/+15 | |
| captured lifetime | ||||
| 2024-08-26 | Tie `impl_trait_overcaptures` lint to Rust 2024 | Travis Cross | -6/+22 | |
| The `impl_trait_overcaptures` lint is part of the migration to Rust 2024 and the Lifetime Capture Rules 2024. Now that we've stabilized precise capturing (RFC 3617), let's tie this lint to the `rust_2024_compatibility` lint group. | ||||
| 2024-08-17 | Bless test fallout | Michael Goulet | -10/+8 | |
| 2024-08-17 | Stabilize opaque type precise capturing | Michael Goulet | -100/+66 | |
| 2024-07-17 | Fix precise capturing suggestion for hidden type when APITs are involved | Michael Goulet | -1/+55 | |
| 2024-07-11 | Suggest using precise capturing for hidden type that captures region | Michael Goulet | -3/+100 | |
| 2024-06-28 | Move binder and polarity parsing into parse_generic_ty_bound | Michael Goulet | -0/+112 | |
| 2024-06-24 | Deny use<> for RPITITs | Michael Goulet | -45/+76 | |
| 2024-06-20 | Add a test demonstrating that RPITITs cant use precise capturing | Michael Goulet | -0/+63 | |
| 2024-06-17 | Delay a bug and mark precise_capturing as not incomplete | Michael Goulet | -225/+45 | |
| 2024-06-17 | Detect duplicates | Michael Goulet | -0/+39 | |
| 2024-06-17 | Add tests for illegal use bound syntax | Michael Goulet | -2/+119 | |
| 2024-06-17 | Rework precise capturing syntax | Michael Goulet | -124/+124 | |
| 2024-06-17 | Make parse_seq_to_before_tokens take expected/nonexpected tokens, use in ↵ | Michael Goulet | -10/+1 | |
| parse_precise_capturing_syntax | ||||
| 2024-05-13 | And finally add tests | Michael Goulet | -0/+133 | |
| 2024-05-13 | Warn against redundant use<...> | Michael Goulet | -1/+71 | |
| 2024-04-23 | Rollup merge of #124169 - compiler-errors:parser-fatal, r=oli-obk | Matthias Krüger | -0/+25 | |
| Don't fatal when calling `expect_one_of` when recovering arg in `parse_seq` In `parse_seq`, when parsing a sequence of token-separated items, if we don't see a separator, we try to parse another item eagerly in order to give a good diagnostic and recover from a missing separator: https://github.com/rust-lang/rust/blob/d1a0fa5ed3ffe52d72f761d3c95cbeb0a9cdfe66/compiler/rustc_parse/src/parser/mod.rs#L900-L901 If parsing the item itself calls `expect_one_of`, then we will fatal because of #58903: https://github.com/rust-lang/rust/blob/d1a0fa5ed3ffe52d72f761d3c95cbeb0a9cdfe66/compiler/rustc_parse/src/parser/mod.rs#L513-L516 For `precise_capturing` feature I implemented, we do end up calling `expected_one_of`: https://github.com/rust-lang/rust/blob/d1a0fa5ed3ffe52d72f761d3c95cbeb0a9cdfe66/compiler/rustc_parse/src/parser/ty.rs#L712-L714 This leads the compiler to fatal *before* having emitted the first error, leading to absolutely no useful information for the user about what happened in the parser. This PR makes it so that we stop doing that. Fixes #124195 | ||||
| 2024-04-20 | Explicitly mention `Self` | Michael Goulet | -5/+5 | |
| 2024-04-20 | Flip spans for precise capturing syntax not capturing a ty/ct param | Michael Goulet | -14/+16 | |
| 2024-04-19 | Fix capturing duplicated lifetimes via parent | Michael Goulet | -0/+66 | |
| 2024-04-19 | Don't fatal when calling expect_one_of when recovering arg in parse_seq | Michael Goulet | -0/+25 | |
| 2024-04-15 | More polishing | Michael Goulet | -1/+53 | |
| 2024-04-15 | Use a path instead of an ident (and stop manually resolving) | Michael Goulet | -14/+24 | |
| 2024-04-15 | Some ordering and duplication checks | Michael Goulet | -0/+53 | |
| 2024-04-15 | Add hir::Node::PreciseCapturingNonLifetimeArg | Michael Goulet | -31/+68 | |
| 2024-04-15 | Validation and other things | Michael Goulet | -1/+203 | |
| 2024-04-15 | Begin AST lowering for precise captures | Michael Goulet | -0/+56 | |
