about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/util/classify.rs
AgeCommit message (Collapse)AuthorLines
2025-07-06compiler: rename {ast,hir}::BareFn* to FnPtr*Jubilee Young-1/+1
Fix some comments and related types and locals where it is obvious, e.g. - bare_fn -> fn_ptr - LifetimeBinderKind::BareFnType -> LifetimeBinderKind::FnPtrType Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2025-03-18Refactor YieldKind so postfix yield must have an expressionEric Holk-3/+7
2025-03-14Preserve yield position during pretty printingEric Holk-2/+2
2025-03-06Implement .use keyword as an alias of cloneSantiago Pastorino-0/+2
2024-12-12Add unwrap_unsafe_binder and wrap_unsafe_binder macro operatorsMichael Goulet-0/+2
2024-12-12Parsing unsafe bindersMichael Goulet-0/+4
2024-10-15Auto merge of #131723 - matthiaskrgr:rollup-krcslig, r=matthiaskrgrbors-1/+1
Rollup of 9 pull requests Successful merges: - #122670 (Fix bug where `option_env!` would return `None` when env var is present but not valid Unicode) - #131095 (Use environment variables instead of command line arguments for merged doctests) - #131339 (Expand set_ptr_value / with_metadata_of docs) - #131652 (Move polarity into `PolyTraitRef` rather than storing it on the side) - #131675 (Update lint message for ABI not supported) - #131681 (Fix up-to-date checking for run-make tests) - #131702 (Suppress import errors for traits that couldve applied for method lookup error) - #131703 (Resolved python deprecation warning in publish_toolstate.py) - #131710 (Remove `'apostrophes'` from `rustc_parse_format`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-15Rollup merge of #130635 - eholk:pin-reborrow-sugar, r=compiler-errorsMatthias Krüger-1/+3
Add `&pin (mut|const) T` type position sugar This adds parser support for `&pin mut T` and `&pin const T` references. These are desugared to `Pin<&mut T>` and `Pin<&T>` in the AST lowering phases. This PR currently includes #130526 since that one is in the commit queue. Only the most recent commits (bd450027eb4a94b814a7dd9c0fa29102e6361149 and following) are new. Tracking: - #130494 r? `@compiler-errors`
2024-10-14Move trait bound modifiers into ast::PolyTraitRefMichael Goulet-1/+1
2024-10-07Add sugar for &pin (const|mut) typesEric Holk-1/+3
2024-10-01Remove anon struct and union typesMichael Goulet-6/+0
2024-07-03Rollup merge of #127092 - compiler-errors:rtn-dots-redux, r=estebankMatthias Krüger-1/+1
Change return-type-notation to use `(..)` Aligns the syntax with the current wording of [RFC 3654](https://github.com/rust-lang/rfcs/pull/3654). Also implements rustfmt support (along with making a match exhaustive). Tracking: * https://github.com/rust-lang/rust/issues/109417
2024-07-01Parenthesize break values containing leading labelDavid Tolnay-1/+78
2024-06-28Change RTN to use .. againMichael Goulet-1/+1
2024-06-17Rework precise capturing syntaxMichael Goulet-2/+4
2024-05-12Disallow cast with trailing braced macro in let-elseDavid Tolnay-4/+91
2024-05-11Add classify::expr_is_completeDavid Tolnay-39/+57
2024-05-11Macro call with braces does not require semicolon to be statementDavid Tolnay-13/+17
This commit by itself is supposed to have no effect on behavior. All of the call sites are updated to preserve their previous behavior. The behavior changes are in the commits that follow.
2024-05-11Mark expr_requires_semi_to_be_stmt call sitesDavid Tolnay-1/+2
For each of these, we need to decide whether they need to be using `expr_requires_semi_to_be_stmt`, or `expr_requires_comma_to_be_match_arm`, which are supposed to be 2 different behaviors. Previously they were conflated into one, causing either too much or too little parenthesization.
2024-05-11Expand on expr_requires_semi_to_be_stmt documentationDavid Tolnay-10/+41
2024-02-25Add `ErrorGuaranteed` to `ast::ExprKind::Err`Lieselotte-1/+1
2024-02-25Add `ast::ExprKind::Dummy`Lieselotte-1/+2
2024-01-17Deny braced macro invocations in let-elseMichael Goulet-3/+7
2023-12-19Plumb awaitness of for loopsEric Holk-3/+11
2023-12-14Change expr_trailing_brace to an exhaustive match to force new expression ↵GearsDatapacks-3/+32
kinds to specify whether they contain a brace Add inline const and other possible curly brace expressions to expr_trailing_brace Add tests for `}` before `else` in `let...else` error Change to explicit cases for expressions with optional values when being checked for trailing braces Add tests for more complex cases of `}` before `else` in `let..else` statement Move other possible `}` cases into separate arm and add FIXME for future reference
2023-10-27Add gen blocks to ast and do some broken ast loweringOli Scherer-1/+1
2023-09-11Move let expression checking to parsingMatthew Jasper-1/+1
There was an incomplete version of the check in parsing and a second version in AST validation. This meant that some, but not all, invalid uses were allowed inside macros/disabled cfgs. It also means that later passes have a hard time knowing when the let expression is in a valid location, sometimes causing ICEs. - Add a field to ExprKind::Let in AST/HIR to mark whether it's in a valid location. - Suppress later errors and MIR construction for invalid let expressions.
2023-03-12Remove `box_syntax` from AST and use in toolsclubby789-1/+0
2022-12-01Make inline const block `ExprWithBlock`Gary Guo-0/+1
2022-11-17Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and ↵Nicholas Nethercote-1/+3
patterns.
2021-08-30Handle let-else initializer edge case errorsCameron Steffen-0/+27
2020-12-24use matches!() macro in more placesMatthias Krüger-9/+9
2020-08-30mv compiler to compiler/mark-0/+25