about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/passes.rs
AgeCommit message (Collapse)AuthorLines
2023-01-27Compute generator saved locals on MIR.Camille GILLOT-0/+9
2023-01-23Make `output_filenames` a real queryOli Scherer-19/+13
2023-01-23Remove another unneeded use of the resolverOli Scherer-17/+16
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-4/+2
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-4/+2
2023-01-16Move compiler input and ouput paths into sessionOli Scherer-8/+7
2023-01-16Group some commonly passed together values into a structOli Scherer-12/+5
2023-01-16Remove redundant `input_path` field from `Config`Oli Scherer-1/+1
2023-01-16remove some arguments that can also be fed at the caller sideOli Scherer-27/+3
2023-01-13Rollup merge of #106678 - Veykril:proc-macro-panic-abort, r=eholkMatthias Krüger-1/+7
Warn when using panic-strategy abort for proc-macro crates See https://github.com/rust-lang/rust/issues/82320, this simply warns for now as that seems like the best step that can be immediately taken (opposed to straight up rejecting or ignoring)
2023-01-13Warn when using panic-strategy abort for proc-macro cratesLukas Wirth-1/+7
2023-01-12Feed the `features_query` instead of grabbing it from the session lazilyOli Scherer-0/+1
2023-01-12Remove `output_filenames` field from TyCtxt and feed the query insteadOli Scherer-1/+1
2023-01-12Remove `untracked_crate` field and instead pass it along with the resolver.Oli Scherer-2/+3
2023-01-12Feed `crate_name` queryOli Scherer-1/+2
2023-01-12Feed `resolutions` query instead of it being a thin wrapper around an ↵Oli Scherer-3/+3
untracked field
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-3/+3
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2022-12-09Fold `Definitions` into the untracked dataOli Scherer-2/+0
2022-12-09Move the untracked cstore and source_span into a structOli Scherer-0/+2
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-19/+21
2022-12-06Auto merge of #105220 - oli-obk:feeding, r=cjgillotbors-6/+17
feed resolver_for_lowering instead of storing it in a field r? `@cjgillot` opening this as * a discussion for `no_hash` + `feedable` queries. I think we'll want those, but I don't quite understand why they are rejected beyond a double check of the stable hashes for situations where the query is fed but also read from incremental caches. * and a discussion on removing all untracked fields from TyCtxt and setting it up so that they are fed queries instead
2022-12-05feed resolver_for_lowering instead of storing it in a fieldOli Scherer-2/+15
2022-12-03Remove all but one call site of `prepare_outputs` and fetch the value from ↵Oli Scherer-4/+2
the TyCtxt instead
2022-12-02Remove `-Zno-interleave-lints`.Nicholas Nethercote-4/+1
Because it complicates lint implementation greatly.
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-1/+1
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-25rustc_middle: Rearrange resolver outputs structures slightlyVadim Petrochenkov-11/+3
2022-10-20rustc_hir_typeck: fix paths and partially mv fileslcnr-0/+1
2022-10-10Move lifetime resolution module to rustc_hir_analysis.Camille GILLOT-1/+0
2022-09-27rustc_typeck to rustc_hir_analysislcnr-3/+2
2022-09-07Auto merge of #100801 - Kobzol:track-pgo-profile-paths, r=michaelwoeristerbors-3/+14
Track PGO profiles in depinfo This PR makes sure that PGO profiles (`-Cprofile-use` and `-Cprofile-sample-use`) are tracked in depinfo, so that when they change, the compilation session will be invalidated. This approach was discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Tracking.20PGO.20profile.20files.20in.20cargo). I tried it locally and it seems that the code is recompiled just with this change, and https://github.com/rust-lang/rust/pull/100413 is not even needed. But it's possible that not everything required is recompiled, so we will probably want to land both changes. Another approach to implement this could be to store the PGO profiles in `sess.parse_sess.file_depinfo` when the session is being created, but then the paths would have to be converted to a string and then to a symbol, which seemed unnecessarily complicated. CC `@michaelwoerister` r? `@Eh2406`
2022-09-05Rollup merge of #101142 - nnethercote:improve-hir-stats, r=davidtwcoDylan DPC-2/+2
Improve HIR stats #100398 improve the AST stats collection done by `-Zhir-stats`. This PR does the same for HIR stats collection. r? `@davidtwco`
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-3/+2
by module
2022-08-29Track PGO profiles in depinfoJakub Beránek-3/+14
2022-08-29Add prefix to every line of `-Zhir-stats` output.Nicholas Nethercote-2/+2
This is based on `-Zprint-type-sizes` which does the same thing. It makes the output provenance clearer, and helps with post-processing. E.g. if you have `-Zhir-stats` output from numerous compiler invocations you can now easily extract the pre-expansion stats separately from the post-expansion stats.
2022-08-25Rollup merge of #100808 - SkiFire13:migrate_diagnostics_rustc_interface, ↵Yuki Okushi-51/+20
r=davidtwco Migrate `rustc_interface` diagnostics ``@rustbot`` label +A-translation r? rust-lang/diagnostics cc #100717
2022-08-23Use par_body_owners for livenessSeo Sanghyeon-3/+3
2022-08-22Remove use of DiagnosticArgFromDisplayGiacomo Stevanato-14/+8
2022-08-22Move rustc_interface diagnostics to struct SessionDiagnostic derivesGiacomo Stevanato-31/+23
2022-08-22Move existing diagnostic struct to a new errors moduleGiacomo Stevanato-19/+2
2022-08-21Replace #[lint/warning/error] with #[diag]Xiretza-2/+2
2022-08-17Migrate emoji identifier diagnostics to `SessionDiagnostic`finalchild-18/+22
2022-07-27session: disable internal lints for rustdocDavid Wood-1/+1
If an internal lint uses `typeck_results` or similar queries then that can result in rustdoc checking code that it shouldn't (e.g. from other platforms) and emit compilation errors. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-14Auto merge of #96544 - m-ysk:feature/issue-96358, r=cjgillotbors-70/+4
Stop keeping metadata in memory before writing it to disk Fixes #96358 I created this PR according with the instruction given in the issue except for the following points: - While the issue says "Write metadata into the temporary file in `encode_and_write_metadata` even if `!need_metadata_file`", I could not do that. That is because though I tried to do that and run `x.py test`, I got a lot of test failures as follows. <details> <summary>List of failed tests</summary> <pre> <code> failures: [ui] src/test/ui/json-multiple.rs [ui] src/test/ui/json-options.rs [ui] src/test/ui/rmeta/rmeta-rpass.rs [ui] src/test/ui/save-analysis/emit-notifications.rs [ui] src/test/ui/svh/changing-crates.rs [ui] src/test/ui/svh/svh-change-lit.rs [ui] src/test/ui/svh/svh-change-significant-cfg.rs [ui] src/test/ui/svh/svh-change-trait-bound.rs [ui] src/test/ui/svh/svh-change-type-arg.rs [ui] src/test/ui/svh/svh-change-type-ret.rs [ui] src/test/ui/svh/svh-change-type-static.rs [ui] src/test/ui/svh/svh-use-trait.rs test result: FAILED. 12915 passed; 12 failed; 100 ignored; 0 measured; 0 filtered out; finished in 71.41s Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu Build completed unsuccessfully in 0:01:58 </code> </pre> </details> - I could not resolve the extra tasks about `create_rmeta_file` and `create_compressed_metadata_file` for my lack of ability.
2022-07-14Rollup merge of #98580 - PrestonFrom:issue_98466, r=estebankDylan DPC-2/+5
Emit warning when named arguments are used positionally in format Addresses Issue 98466 by emitting an error if a named argument is used like a position argument (i.e. the name is not used in the string to be formatted). Fixes rust-lang#98466
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-13/+13
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-13Emit warning when named arguments are used positionally in formatPreston From-2/+5
Addresses Issue 98466 by emitting a warning if a named argument is used like a position argument (i.e. the name is not used in the string to be formatted). Fixes rust-lang#98466
2022-07-06Make AST lowering a query.Camille GILLOT-47/+6
2022-07-02Auto merge of #97235 - nbdd0121:unwind, r=Amanieubors-0/+1
Fix FFI-unwind unsoundness with mixed panic mode UB maybe introduced when an FFI exception happens in a `C-unwind` foreign function and it propagates through a crate compiled with `-C panic=unwind` into a crate compiled with `-C panic=abort` (#96926). To prevent this unsoundness from happening, we will disallow a crate compiled with `-C panic=unwind` to be linked into `panic-abort` *if* it contains a call to `C-unwind` foreign function or function pointer. If no such call exists, then we continue to allow such mixed panic mode linking because it's sound (and stable). In fact we still need the ability to do mixed panic mode linking for std, because we only compile std once with `-C panic=unwind` and link it regardless panic strategy. For libraries that wish to remain compile-once-and-linkable-to-both-panic-runtimes, a `ffi_unwind_calls` lint is added (gated under `c_unwind` feature gate) to flag any FFI unwind calls that will cause the linkable panic runtime be restricted. In summary: ```rust #![warn(ffi_unwind_calls)] mod foo { #[no_mangle] pub extern "C-unwind" fn foo() {} } extern "C-unwind" { fn foo(); } fn main() { // Call to Rust function is fine regardless ABI. foo::foo(); // Call to foreign function, will cause the crate to be unlinkable to panic-abort if compiled with `-Cpanic=unwind`. unsafe { foo(); } //~^ WARNING call to foreign function with FFI-unwind ABI let ptr: extern "C-unwind" fn() = foo::foo; // Call to function pointer, will cause the crate to be unlinkable to panic-abort if compiled with `-Cpanic=unwind`. ptr(); //~^ WARNING call to function pointer with FFI-unwind ABI } ``` Fix #96926 `@rustbot` label: T-compiler F-c_unwind
2022-07-02move encode_and_write_metadata to rustc_metadata::fsYoshiki Matsuda-70/+4
2022-07-02move emit_metadata to rustc_metadata::fsYoshiki Matsuda-1/+1