| Age | Commit message (Collapse) | Author | Lines |
|
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Add F128 support to TypeTree Kind enum
- Implement TypeTree FFI bindings and conversion functions
- Add typetree.rs module for metadata attachment to LLVM functions
- Integrate TypeTree generation with autodiff intrinsic pipeline
- Support scalar types: f32, f64, integers, f16, f128
- Attach enzyme_type attributes as LLVM string metadata for Enzyme
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
|
|
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
|
|
|
|
|
|
|
|
|
|
Because `rust_infer` is the only crate that uses it.
|
|
erase regions also anonymizes bound vars, which is undesirable
|
|
Lint buffering currently relies on a giant enum `BuiltinLintDiag`
containing all the lints that might potentially get buffered. In
addition to being an unwieldy enum in a central crate, this also makes
`rustc_lint_defs` a build bottleneck: it depends on various types from
various crates (with a steady pressure to add more), and many crates
depend on it.
Having all of these variants in a separate crate also prevents detecting
when a variant becomes unused, which we can do with a dedicated type
defined and used in the same crate.
Refactor this to use a dyn trait, to allow using `LintDiagnostic` types
directly.
This requires boxing, but all of this is already on the slow path
(emitting an error).
Because the existing `BuiltinLintDiag` requires some additional types in
order to decorate some variants, which are only available later in
`rustc_lint`, use an enum `DecorateDiagCompat` to handle both the `dyn
LintDiagnostic` case and the `BuiltinLintDiag` case.
|
|
|
|
|
|
Replace ad-hoc type path shortening logic for recursive mono instantiation errors to use `tcx.short_string()` instead.
|
|
Improve bound const handling
A few changes to make const handling more similar to type handling.
r? `@compiler-errors` -errors
|
|
merge rustc_attr_data_structures into rustc_hir
this move was discussed on zulip: [#t-compiler > attribute parsing rework @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/attribute.20parsing.20rework/near/528530091)
Many PRs in the attribute rework depend on this move.
|
|
Deduplicate `IntTy`/`UintTy`/`FloatTy`.
There are identical definitions in `rustc_type_ir` and `rustc_ast`. This commit removes them and places a single definition in `rustc_ast_ir`. This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but means a bunch of silly conversion functions can be removed.
r? `@fmease`
|
|
|
|
There are identical definitions in `rustc_type_ir` and `rustc_ast`. This
commit removes them and places a single definition in `rustc_ast_ir`.
This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but
means a bunch of silly conversion functions can be removed.
The one annoying wrinkle is that the old version had differences in
their `Debug` impls, e.g. one printed `u32` while the other printed
`U32`. Some compiler error messages rely on the former (yuk), and some
clippy output depends on the latter. So the commit also changes clippy
to not rely on `Debug` and just implement what it needs itself.
|
|
Alongside the existing type and region checking.
|
|
Currently there is `Ty` and `BoundTy`, and `Region` and `BoundRegion`,
and `Const` and... `BoundVar`. An annoying inconsistency.
This commit repurposes the existing `BoundConst`, which was barely used,
so it's the partner to `Const`. Unlike `BoundTy`/`BoundRegion` it lacks
a `kind` field but it's still nice to have because it makes the const
code more similar to the ty/region code everywhere.
The commit also removes `impl From<BoundVar> for BoundTy`, which has a
single use and doesn't seem worth it.
These changes fix the "FIXME: We really should have a separate
`BoundConst` for consts".
|
|
Rollup of 3 pull requests
Successful merges:
- rust-lang/rust#144657 (fix: Only "close the window" when its the last annotated file)
- rust-lang/rust#144665 (Re-block SRoA on SIMD types)
- rust-lang/rust#144713 (`rustc_middle::ty` cleanups)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
- Put them in the module that defines the type.
- Add some `WithCachedTypeInfo<T>` asserts for consistency.
|
|
It's only used in `rustc_hir_typeck`.
|
|
It's identical to `TyCtxt::get_all_attrs` except it takes `DefId`
instead of `impl Into<DefIf>`.
|
|
The fields are public, so this doesn't need a method, normal
deconstruction and/or field access is good enough.
|
|
It's only used in `rustc_infer`.
|
|
It's only used there.
|
|
It's only used in `rustc_hir_typeck`.
|
|
Next to all the other `EarlyParamRegion` pieces.
|
|
It's not used in `rustc_middle`, and `rustc_trait_selection` is a better
place for it.
|
|
It's not used in `rustc_middle`, and `rustc_resolve` is a better place
for it.
|
|
|
|
|
|
|
|
|
|
This is dead code.
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
|
|
|
|
Port `#[automatically_derived]` to the new attribute parsing infrastructure
Ports `#[automatically_derived]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? `@oli-obk`
cc `@jdonszelmann`
|
|
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|
|
|