about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/target.rs
AgeCommit message (Collapse)AuthorLines
2025-08-20Move `IntoDiagArg` earlier in the dependency chainsJosh Triplett-0/+2
`rustc_errors` depends on numerous crates, solely to implement its `IntoDiagArg` trait on types from those crates. Many crates depend on `rustc_errors`, and it's on the critical path. We can't swap things around to make all of those crates depend on `rustc_errors` instead, because `rustc_errors` would end up in dependency cycles. Instead, move `IntoDiagArg` into `rustc_error_messages`, which has far fewer dependencies, and then have most of these crates depend on `rustc_error_messages`. This allows `rustc_errors` to drop dependencies on several crates, including the large `rustc_target`. (This doesn't fully reduce dependency chains yet, as `rustc_errors` still depends on `rustc_hir` which depends on `rustc_target`. That will get fixed in a subsequent commit.)
2025-08-14Improved `Target` typeJonathan Brouwer-10/+142
- Added a few more variants which are needed for various attributes - Previously a trait method with default block had the same target representation as a method in a `impl trait for` block, this has been changed (See `MethodKind`) - Added `plural_name` for more precision on the form of the name
2025-07-17Warn useless deprecation in check_attr.Camille GILLOT-6/+12
2025-07-17Specify of_trait in Target::Impl.Camille GILLOT-5/+6
2025-03-01Implment `#[cfg]` and `#[cfg_attr]` in `where` clausesFrank King-1/+4
2025-02-22Make asm a named fieldMichael Goulet-1/+1
2025-01-04turn hir::ItemKind::Fn into a named-field variantRalf Jung-1/+1
2024-10-04rm `ItemKind::OpaqueTy`Noah Lev-5/+0
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-03-12Change `DefKind::Static` to a struct variantOli Scherer-2/+2
2023-12-15Fix enforcement of generics for associated itemsMichael Goulet-0/+36
2023-09-26Don't store lazyness in DefKindMichael Goulet-1/+1
2023-08-07Store the laziness of type aliases in the DefKindLeón Orell Valerian Liehr-1/+1
2023-07-08Replace RPITIT current impl with new strategy that lowers as a GATSantiago Pastorino-10/+1
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-1/+1
2022-09-09Handle generic parameters.Camille GILLOT-2/+7
2022-09-09Lower RPITIT to ImplTraitPlaceholder itemMichael Goulet-0/+1
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+3
2022-08-11Check attributes on struct expression fields.Eric Huss-0/+2
Attributes on struct expression fields were not being checked for validity. This adds the fields as HIR nodes so that `CheckAttrVisitor` can visit those nodes to check their attributes.
2022-08-11Check attributes on pattern fields.Eric Huss-0/+2
Attributes on pattern struct fields were not being checked for validity. This adds the fields as HIR nodes so that the `CheckAttrVisitor` can visit those nodes to check their attributes.
2022-08-02Add items to `DocAliasBadLocation` check error match armhdelc-1/+1
- Added `Impl`, `Closure`, ForeignMod` targets - `Target::name` changed for `Target::Impl` - Error output for `Target::ForeignMod` changed to "foreign module"
2022-08-02Make `Target::name` method pass by copyhdelc-3/+3
2022-08-02Refactor `Display` impl for `Target` to `Target::name` methodhdelc-45/+45
2022-04-09add comment about restriction of Target::from_def_kindMiguel Guarniz-0/+1
2022-04-08add mapping from DefKind to Target and remove more ItemLikeVisitor implsMiguel Guarniz-0/+24
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-03-19Give more details in `Display` for `hir::Target`Scott McMurray-1/+5
Made because I was making a code change and got a very confusing "should be applied to a method, not a method" error. ``` error[E0718]: `into_try_type` language item must be applied to a method --> library\core\src\ops\try_trait.rs:352:32 | 352 | #[cfg_attr(not(bootstrap), lang = "into_try_type")] | ^^^^^^^^^^^^^^^^^^^^^^ attribute should be applied to a method, not a method ```
2021-08-28Treat macros as HIR itemsinquisitivecrystal-0/+1
2021-02-09Visit more targets when checking attrsRyan Levick-0/+2
2021-02-01Fixed #[inline] to be warned in fields, arms, macro defsDanuel-0/+6
Add visitors for checking #[inline] Add visitors for checking #[inline] with struct field Fix test for #[inline] Add visitors for checking #[inline] with #[macro_export] macro Add visitors for checking #[inline] without #[macro_export] macro Add use alias with Visitor Fix lint error Reduce unnecessary variable Co-authored-by: LingMan <LingMan@users.noreply.github.com> Change error to warning Add warning for checking field, arm with #[allow_internal_unstable] Add name resolver Formatting Formatting Fix error fixture Add checking field, arm, macro def
2020-11-29passes: prohibit attrs on generic paramsDavid Wood-0/+23
This commit modifies the `check_attr` pass so that attribute placement on generic parameters is checked for validity. Signed-off-by: David Wood <david@davidtw.co>
2020-11-26Remove ForeignMod struct.Camille GILLOT-1/+1
2020-10-03Prevent #[doc(alias = "...")] at crate levelGuillaume Gomez-2/+2
2020-08-30mv compiler to compiler/mark-0/+127