| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2025-02-10 | Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr | Bastian Kersting | -1/+1 | |
| The wording unsafe pointer is less common and not mentioned in a lot of places, instead this is usually called a "raw pointer". For the sake of uniformity, we rename this method. This came up during the review of https://github.com/rust-lang/rust/pull/134424. | ||||
| 2025-02-06 | Merge commit '3e3715c31236bff56f1c63a1de2c7bbdfcfb0923' into ↵ | Philipp Krones | -26/+41 | |
| clippy-subtree-update | ||||
| 2025-01-28 | Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵ | Philipp Krones | -1/+1 | |
| clippy-subtree-update | ||||
| 2025-01-23 | `visit_x_unambig` | Boxy | -1/+1 | |
| 2025-01-23 | The clipper :3c | Boxy | -19/+13 | |
| 2024-12-26 | Merge commit '609cd310be44677ae31d452a17b0f8207e1abfe1' into ↵ | Philipp Krones | -6/+5 | |
| clippy-subtree-update | ||||
| 2024-12-22 | Begin to implement type system layer of unsafe binders | Michael Goulet | -1/+2 | |
| 2024-12-14 | (Re-)Implement impl_trait_in_bindings | Michael Goulet | -0/+1 | |
| 2024-12-12 | Fix tools | Michael Goulet | -0/+1 | |
| 2024-12-10 | Remove more traces of anonymous ADTs | Michael Goulet | -1/+0 | |
| 2024-11-30 | Eliminate magic numbers from expression precedence | David Tolnay | -14/+14 | |
| 2024-11-28 | Merge commit 'ff4a26d442bead94a4c96fb1de967374bc4fbd8e' into ↵ | Philipp Krones | -8/+7 | |
| clippy-subtree-update | ||||
| 2024-11-26 | Rollup merge of #133140 - dtolnay:precedence, r=fmease | Michael Goulet | -5/+5 | |
| Inline ExprPrecedence::order into Expr::precedence The representation of expression precedence in rustc_ast has been an obstacle to further improvements in the pretty-printer (continuing from #119105 and #119427). Previously the operation of *"does this expression have lower precedence than that one"* (relevant for parenthesis insertion in macro-generated syntax trees) consisted of 3 steps: 1. Convert `Expr` to `ExprPrecedence` using `.precedence()` 2. Convert `ExprPrecedence` to `i8` using `.order()` 3. Compare using `<` As far as I can guess, the reason for the separation between `precedence()` and `order()` was so that both `rustc_ast::Expr` and `rustc_hir::Expr` could convert as straightforwardly as possible to the same `ExprPrecedence` enum, and then the more finicky logic performed by `order` could be present just once. The mapping between `Expr` and `ExprPrecedence` was intended to be as straightforward as possible: ```rust match self.kind { ExprKind::Closure(..) => ExprPrecedence::Closure, ... } ``` although there were exceptions of both many-to-one, and one-to-many: ```rust ExprKind::Underscore => ExprPrecedence::Path, ExprKind::Path(..) => ExprPrecedence::Path, ... ExprKind::Match(_, _, MatchKind::Prefix) => ExprPrecedence::Match, ExprKind::Match(_, _, MatchKind::Postfix) => ExprPrecedence::PostfixMatch, ``` Where the nature of `ExprPrecedence` becomes problematic is when a single expression kind might be associated with multiple different precedence levels depending on context (outside the expression) and contents (inside the expression). For example consider what is the precedence of an ExprKind::Closure `$closure`. Well, on the left-hand side of a binary operator it would need parentheses in order to avoid the trailing binary operator being absorbed into the closure body: `($closure) + Rhs`, so the precedence is something lower than that of `+`. But on the right-hand side of a binary operator, a closure is just a straightforward prefix expression like a unary op, which is a relatively high precedence level, higher than binops but lower than method calls: `Lhs + $closure` is fine without parens but `($closure).method()` needs them. But as a third case, if the closure contains an explicit return type, then the precedence is an even higher level than that, never needing parenthesization even in a binop left-hand side or method call: `|| -> bool { false } + Rhs` or `|| -> bool { false }.method()`. You can see that trying to capture all of this resolution about expressions into `ExprPrecedence` violates the intention of `ExprPrecedence` being a straightforward one-to-one correspondence from each AST and HIR `ExprKind` variant. It would be possible to attempt that by doing stuff like `ExprPrecedence::Closure(Side::Leading, ReturnType::No)`, but I don't foresee the original envisioned benefit of the `precedence()`/`order()` distinction being retained in this approach. Instead I want to move toward a model that Syn has been using successfully. In Syn, there is a Precedence enum but it differs from rustc in the following ways: - There are [relatively few variants](https://github.com/dtolnay/syn/blob/2.0.87/src/precedence.rs#L11-L47) compared to rustc's `ExprPrecedence`. For example there is no distinction at the precedence level between returns and closures, or between loops and method calls. - We distinguish between [leading](https://github.com/dtolnay/syn/blob/2.0.87/src/fixup.rs#L293) and [trailing](https://github.com/dtolnay/syn/blob/2.0.87/src/fixup.rs#L309) precedence, taking into account an expression's context such as what token follows it (for various syntactic bail-outs in Rust's grammar, like ambiguities around break-with-value) and how it relates to operators from the surrounding syntax tree. - There are no hardcoded mysterious integer quantities like rustc's `PREC_CLOSURE = -40`. All precedence comparisons are performed via PartialOrd on a C-like enum. This PR is just a first step in these changes. As you can tell from Syn, I definitely think there is value in having a dedicated type to represent precedence, instead of what `order()` is doing with `i8`. But that is a whole separate adventure because rustc_ast doesn't even agree consistently on `i8` being the type for precedence order; `AssocOp::precedence` instead uses `usize` and there are casts in both directions. It is likely that a type called `ExprPrecedence` will re-appear, but it will look substantially different from the one that existed before this PR. | ||||
| 2024-11-19 | remove `TypingMode::from_param_env` in clippy | lcnr | -6/+9 | |
| 2024-11-19 | move `fn is_item_raw` to `TypingEnv` | lcnr | -1/+1 | |
| 2024-11-18 | use `TypingEnv` when no `infcx` is available | lcnr | -4/+5 | |
| the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`. | ||||
| 2024-11-17 | Inline ExprPrecedence::order into Expr::precedence | David Tolnay | -5/+5 | |
| 2024-10-29 | Remove region from adjustments | Michael Goulet | -1/+1 | |
| 2024-09-24 | Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵ | Philipp Krones | -44/+29 | |
| clippy-subtree-update | ||||
| 2024-08-09 | Shrink `TyKind::FnPtr`. | Nicholas Nethercote | -1/+1 | |
| By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI. | ||||
| 2024-08-08 | Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into ↵ | Philipp Krones | -2/+2 | |
| clippy-subtree-update | ||||
| 2024-07-11 | Merge commit 'b794b8e08c16517a941dc598bb1483e8e12a8592' into ↵ | Philipp Krones | -11/+26 | |
| clippy-subtree-update | ||||
| 2024-06-27 | Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into ↵ | Philipp Krones | -27/+21 | |
| clippy-subtree-update | ||||
| 2024-06-23 | Rename the 2 unambiguous precedence levels to PREC_UNAMBIGUOUS | David Tolnay | -3/+3 | |
| 2024-05-30 | Auto merge of #125764 - flip1995:clippy-subtree-update, r=Manishearth | bors | -9/+5 | |
| Clippy subtree update r? `@Manishearth` | ||||
| 2024-05-30 | Merge commit 'c9139bd546d9cd69df817faeab62c5f9b1a51337' into ↵ | Philipp Krones | -9/+5 | |
| clippy-subtree-update | ||||
| 2024-05-29 | Don't require `visit_body` to take a lifetime that must outlive the function ↵ | Oli Scherer | -1/+1 | |
| call | ||||
| 2024-05-09 | Rename Generics::params to Generics::own_params | Michael Goulet | -1/+1 | |
| 2024-05-02 | Merge commit '20b085d500dfba5afe0869707bf357af3afe20be' into ↵ | Philipp Krones | -2/+2 | |
| clippy-subtree-update | ||||
| 2024-04-18 | Merge commit 'ca3b393750ee8d870bf3215dcf6509cafa5c0445' into ↵ | Philipp Krones | -0/+9 | |
| clippy-subtree-update | ||||
| 2024-04-17 | Rename `BindingAnnotation` to `BindingMode` | Jules Bertholet | -2/+2 | |
| 2024-04-08 | Actually create ranged int types in the type system. | Oli Scherer | -0/+1 | |
| 2024-04-08 | Thread pattern types through the HIR | Oli Scherer | -0/+1 | |
| 2024-02-27 | Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into ↵ | Philipp Krones | -5/+3 | |
| clippy-subtree-update | ||||
| 2024-02-12 | Lower anonymous structs or unions to HIR | Frank King | -0/+1 | |
| 2024-02-10 | hir: Remove `hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}` | Vadim Petrochenkov | -1/+1 | |
| 2024-02-06 | Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs | Michael Goulet | -0/+1 | |
| 2024-01-12 | Delegation implementation: step 1 | Bryanskiy | -0/+1 | |
| 2023-12-12 | Move some methods from `tcx.hir()` to `tcx` | zetanumbers | -1/+1 | |
| Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id` | ||||
| 2023-12-01 | Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-sync | Philipp Krones | -1/+1 | |
| 2023-11-17 | rename bound region instantiation | lcnr | -1/+1 | |
| - `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased` - `replace_late_bound_regions_X` -> `instantiate_bound_regions_X` | ||||
| 2023-11-16 | Merge commit 'edb720b199083f4107b858a8761648065bf38d86' into clippyup | Philipp Krones | -115/+168 | |
| 2023-11-02 | Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup | Philipp Krones | -28/+33 | |
| 2023-10-20 | s/Generator/Coroutine/ | Oli Scherer | -2/+2 | |
| 2023-10-16 | fix lint failures in clippy | Arthur Lafrance | -1/+1 | |
| 2023-09-25 | Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyup | Philipp Krones | -369/+5 | |
| 2023-09-23 | Remove GeneratorWitness and rename GeneratorWitnessMIR. | Camille GILLOT | -1/+0 | |
| 2023-09-12 | Merge commit '98363cbf6a7c3f8b571a7d92a3c645bb4376e4a6' into clippyup | Philipp Krones | -12/+19 | |
| 2023-08-14 | Move scrutinee `HirId` into `MatchSource::TryDesugar` | Esteban Küber | -1/+2 | |
| 2023-08-06 | Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung | Matthias Krüger | -1/+1 | |
| Add documentation to has_deref Documentation of `has_deref` needed some polish to be more clear about where it should be used and what's it's purpose. cc https://github.com/rust-lang/rust/issues/114401 r? `@RalfJung` | ||||
