about summary refs log tree commit diff
path: root/compiler/rustc_smir/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2025-07-14rename `stable_mir` to `rustc_public`, and `rustc_smir` to `rustc_public_bridge`Makai-305/+0
2025-07-06move `stable_mir` back to its own crate and move `rustc_internal` to ↵Makai-4/+284
the`stable_mir` crate As part of this reorganization, some traits need to be moved from `rustc_smir::context::traits` to `stable_mir::unstable::internal_cx`. These traits are specifically designed for `InternalCx` to clarify the behavior of different functions that share the same name. This move is necessary to avoid orphan rule violations.
2025-07-01Update `cfg(bootstrap)`Josh Stone-1/+1
2025-06-16library/compiler: add `PointeeSized` boundsDavid Wood-0/+1
As core uses an extern type (`ptr::VTable`), the default `?Sized` to `MetaSized` migration isn't sufficient, and some code that previously accepted `VTable` needs relaxed to continue to accept extern types. Similarly, the compiler uses many extern types in `rustc_codegen_llvm` and in the `rustc_middle::ty::List` implementation (`OpaqueListContents`) some bounds must be relaxed to continue to accept these types. Unfortunately, due to the current inability to relax `Deref::Target`, some of the bounds in the standard library are forced to be stricter than they ideally would be.
2025-04-24Rollup merge of #139852 - makai410:smir-refactor, r=celinvalMatthias Krüger-2/+1
StableMIR: Implement `CompilerInterface` This PR implements part of [the document](https://hackmd.io/``@celinaval/H1lJBGse0).`` With `TablesWrapper` wrapped by `CompilerInterface`, the stable-mir's TLV stores a pointer to `CompilerInterface`, while the rustc-specific TLV stores a pointer to tables.
2025-04-18Implement `SmirInterface`Makai-2/+1
- With `Context` wrapped by `SmirInterface`, the stable-mir's TLV stores a pointer to `SmirInterface`, while the rustc-specific TLV stores a pointer to tables. - This PR make the `rustc_smir` mod public.
2025-04-14Auto merge of #124141 - ↵bors-1/+0
nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov Remove `Nonterminal` and `TokenKind::Interpolated` A third attempt at this; the first attempt was #96724 and the second was #114647. r? `@ghost`
2025-04-05let `rustc_smir` host `stable_mir` for refactoringMakai-0/+2
2025-04-02Remove `recursion_limit` increases.Nicholas Nethercote-1/+0
These are no longer needed now that `Nonterminal` is gone.
2025-03-12Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgrbors-1/+0
Rollup of 7 pull requests Successful merges: - #137314 (change definitely unproductive cycles to error) - #137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - #138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - #138331 (Use `RUSTC_LINT_FLAGS` more) - #138345 (Some autodiff cleanups) - #138387 (intrinsics: remove unnecessary leading underscore from argument names) - #138390 (fix incorrect tracing log) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-11Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
It's no longer necessary now that `-Wunreachable_pub` is being passed.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-0/+1
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). This breakage was reported in <https://github.com/rust-lang/rust/issues/138304>. This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
2025-03-08Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
(Except for `rustc_codegen_cranelift`.) It's no longer necessary now that `unreachable_pub` is in the workspace lints.
2025-03-07Increase recursion_limit in numerous crates.Nicholas Nethercote-0/+1
This is temporarily needed for `x doc compiler` to work. They can be removed once the `Nonterminal` is removed (#124141).
2024-09-03Add `warn(unreachable_pub)` to `rustc_smir`.Nicholas Nethercote-0/+1
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-2/+4
We already do this for a number of crates, e.g. `rustc_middle`, `rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`. For the ones we don't, in many cases the attributes are a mess. - There is no consistency about order of attribute kinds (e.g. `allow`/`deny`/`feature`). - Within attribute kind groups (e.g. the `feature` attributes), sometimes the order is alphabetical, and sometimes there is no particular order. - Sometimes the attributes of a particular kind aren't even grouped all together, e.g. there might be a `feature`, then an `allow`, then another `feature`. This commit extends the existing sorting to all compiler crates, increasing consistency. If any new attribute line is added there is now only one place it can go -- no need for arbitrary decisions. Exceptions: - `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`, because they have no crate attributes. - `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's ignored in `rustfmt.toml`).
2023-11-15Bump cfg(bootstrap)sMark Rousskov-3/+3
2023-10-24Remove fold code and add Const::internal()Celina G. Val-0/+1
We are not planning to support user generated constant in the foreseeable future, so we are removing the Fold logic for now in favor of the Instance::resolve logic. The Instance::resolve was however incomplete, since we weren't handling internalizing constants yet. Thus, I added that. I decided to keep the Const fields private in case we decide to translate them lazily.
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+3
2023-10-06Remove unneeded features.Nicholas Nethercote-4/+0
2023-09-25Split out the stable part of smir into its own crate to prevent accidental ↵Oli Scherer-15/+1
usage of forever unstable things
2023-08-10Stabilize thread local cell methods.Mara Bos-1/+0
2023-07-14fix docs for `rustc_smir`Lukas Markeffsky-1/+2
2023-07-10Implement a few more rvalue translation to smirCelina G. Val-0/+1
- Introduce an Opaque type for adding information that is still internal to the compiler.
2023-07-10Fix standalone buildCelina G. Val-0/+10
Add extern declarations and optional dependencies to fix build done directly via `cargo build`.
2023-07-02Use scoped-tls for SMIR to map between TyCtxt and SMIR datastructuresyukang-0/+3
2023-05-08Create a trait to abstract over the smir APIOli Scherer-0/+2
2023-03-06Create new rustc_smir struct to map future cratesCelina G. Val-2/+6
+ Add some information to the README.md
2023-03-03Delete old re-exports from rustc_smirCelina G. Val-4/+0
This approach didn't seem to work well.
2022-08-18Add diagnostic translation lints to crates that don't emit them5225225-0/+2
2022-06-02RustfmtOli Scherer-1/+0
2022-06-02Add 'compiler/rustc_smir/' from commit ↵Oli Scherer-0/+18
'9abcb5c7b574cf316eb23d3f469187bb86ba3019' git-subtree-dir: compiler/rustc_smir git-subtree-mainline: fb1976011e3df96b5d3eccd6b2f4e51ef7dc8f16 git-subtree-split: 9abcb5c7b574cf316eb23d3f469187bb86ba3019