about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
AgeCommit message (Collapse)AuthorLines
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-12/+12
2024-09-13Rename and reorder lots of lifetimes.Nicholas Nethercote-7/+7
- Replace non-standard names like 's, 'p, 'rg, 'ck, 'parent, 'this, and 'me with vanilla 'a. These are cases where the original name isn't really any more informative than 'a. - Replace names like 'cx, 'mir, and 'body with vanilla 'a when the lifetime applies to multiple fields and so the original lifetime name isn't really accurate. - Put 'tcx last in lifetime lists, and 'a before 'b.
2024-08-29Add `warn(unreachable_pub)` to `rustc_query_impl`.Nicholas Nethercote-18/+27
2024-08-21Simplify some redundant field namesMichael Goulet-1/+1
2024-08-19Prevent double panic in query system, improve diagnosticsFelix Rath-2/+8
2024-07-29Reformat `use` declarations.Nicholas Nethercote-18/+20
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-19Allow tracing through item_bounds query invocations on opaquesOli Scherer-1/+3
Previously these caused cycles when printing the result
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-3/+5
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`).
2024-06-10Remove some unused crate dependencies.Nicholas Nethercote-2/+1
I found these by setting the `unused_crate_dependencies` lint temporarily to `Warn`.
2024-05-13Remove `extern crate rustc_middle` from `rustc_query_impl`.Nicholas Nethercote-6/+4
2024-05-08Simplify `use crate::rustc_foo::bar` occurrences.Nicholas Nethercote-4/+2
They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)
2024-04-22Stabilize generic `NonZero`.Markus Reiter-1/+0
2024-04-11move QueryKeyStringCache from rustc_middle to rustc_query_impl, where it ↵klensy-4/+13
actually used also allows to drop measureme dep on rustc_middle
2024-03-12Verify that query keys result in unique dep nodesJohn Kåre Alsaker-1/+51
2024-03-04Avoid using unnecessary queries when printing the query stack in panicsJohn Kåre Alsaker-2/+7
2024-03-03Add a proper `with_no_queries` to printingJohn Kåre Alsaker-11/+4
2024-02-28Rename `Diagnostic` as `DiagInner`.Nicholas Nethercote-2/+2
I started by changing it to `DiagData`, but that didn't feel right. `DiagInner` felt much better.
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-4/+2
2024-02-15Use generic `NonZero` internally.Markus Reiter-2/+3
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-25Remove unused featuresclubby789-2/+0
2024-01-13Update measureme crate to version 11Michael Woerister-1/+1
2024-01-09Rollup merge of #119527 - klensy:ordering, r=compiler-errorsGuillaume Gomez-1/+1
don't reexport atomic::ordering via rustc_data_structures, use std import This looks simpler.
2024-01-08Don't check for recursion in generator witness fieldsMichael Goulet-2/+2
2024-01-08Value recovery can take the whole CycleErrorMichael Goulet-3/+3
2024-01-06don't reexport atomic::ordering via rustc_data_structures, use std importklensy-1/+1
2023-12-31Remove two unused feature gates from rustc_query_implbjorn3-3/+0
2023-12-26Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebankbors-2/+5
rework `-Zverbose` implements the changes described in https://github.com/rust-lang/compiler-team/issues/706 the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics. possible follow up work: - `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200 - `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`. r? `@compiler-errors` cc `@estebank`
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-19rename to verbose-internalsjyn-2/+5
2023-11-27QueryContext: rename try_collect_active_jobs -> collect_active_jobs and ↵klensy-7/+7
change it's return type from Option<QueryMap> to QueryMap As there currently always Some(...) inside
2023-11-25rustc: Make `def_kind` mandatory for all `DefId`sVadim Petrochenkov-2/+2
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-15Bump cfg(bootstrap)sMark Rousskov-2/+2
2023-10-30Clean up `rustc_*/Cargo.toml`.Nicholas Nethercote-4/+5
- Sort dependencies and features sections. - Add `tidy` markers to the sorted sections so they stay sorted. - Remove empty `[lib`] sections. - Remove "See more keys..." comments. Excluded files: - rustc_codegen_{cranelift,gcc}, because they're external. - rustc_lexer, because it has external use. - stable_mir, because it has external use.
2023-10-30Remove `memoffset` dependency from `rustc_query_impl`.Nicholas Nethercote-3/+0
The comment explains it's for `unstable_offset_of`, but `offset_of` is now stable.
2023-10-28Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwcoJubilee-2/+0
Remove -Zdep-tasks. This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
2023-10-26Stash and cancel cycle errors for auto trait leakage in opaquesMichael Goulet-0/+3
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+2
2023-10-08Remove useless debugging.Camille GILLOT-2/+0
2023-10-06Remove unneeded dependency.Nicholas Nethercote-1/+0
2023-09-21Move `DepKind` to `rustc_query_system` and define it as `u16`John Kåre Alsaker-15/+28
2023-09-10Remove `verbose_generic_activity_with_arg`John Kåre Alsaker-2/+1
2023-09-01remove some unused crate depsklensy-1/+0
2023-08-27Pass ErrorGuaranteed to cycle errorMichael Goulet-4/+5
2023-08-23Bump cfg(bootstrap)Mark Rousskov-1/+1
2023-08-03Add `internal_features` lintNilstrieb-0/+1
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
2023-07-23fix couple of clippy findings:Matthias Krüger-1/+1
filter_map_identity iter_kv_map needless_question_mark redundant_at_rest_pattern filter_next derivable_impls
2023-06-27Avoid calling queries during query stack printingOli Scherer-3/+3
2023-06-21Make queries traceable againOli Scherer-1/+9