about summary refs log tree commit diff
path: root/compiler/rustc_traits/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2025-05-20Querify coroutine_hidden_typesMichael Goulet-0/+2
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.
2024-09-03Add `warn(unreachable_pub)` to `rustc_traits`.Nicholas Nethercote-0/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+1
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-0/+2
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-04-30Remove `extern crate tracing` from numerous crates.Nicholas Nethercote-3/+0
2024-04-29Remove `extern crate rustc_middle` from numerous crates.Nicholas Nethercote-2/+0
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-1/+0
2023-07-03Remove chalk from the compilerMichael Goulet-4/+1
2023-06-14s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedListThe 8472-1/+0
2023-05-27Uplift complex type ops back into typeck so we can call them locallyMichael Goulet-1/+2
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-02-09Update implied_outlives_bounds to properly register implied bounds behind ↵Jack Huey-0/+1
normalization
2022-12-08Move some suggestions from error_reporting to error_reporting::suggestMichael Goulet-1/+1
2022-12-08Move codegen_select_candidate to a rustc_traitsMichael Goulet-0/+2
2022-10-27(almost) Always use ObligationCtxt when dealing with canonical queriesMichael Goulet-0/+1
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-08-18Add diagnostic translation lints to crates that don't emit them5225225-0/+2
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-1/+0
2022-02-19Adopt let else in more placesest31-0/+1
2021-12-30Removed `in_band_lifetimes` from `rustc_traits`Anuvrat-1/+0
2021-12-02Reduce boilerplate around infallible foldersAlan Egerton-1/+0
2021-11-26Unwrap the results of type foldersLeSeulArtichaut-0/+1
Co-authored-by: Alan Egerton <eggyal@gmail.com>
2021-09-27Improve cause information for NLL higher-ranked errorsAaron Hill-1/+1
This PR has several interconnected pieces: 1. In some of the NLL region error code, we now pass around an `ObligationCause`, instead of just a plain `Span`. This gets forwarded into `fulfill_cx.register_predicate_obligation` during error reporting. 2. The general InferCtxt error reporting code is extended to handle `ObligationCauseCode::BindingObligation` 3. A new enum variant `ConstraintCategory::Predicate` is added. We try to avoid using this as the 'best blame constraint' - instead, we use it to enhance the `ObligationCause` of the `BlameConstraint` that we do end up choosing. As a result, several NLL error messages now contain the same "the lifetime requirement is introduced here" message as non-NLL errors. Having an `ObligationCause` available will likely prove useful for future improvements to NLL error messages.
2021-08-23handle ascription type op in NLL HRTB diagnosticsRémy Rakic-1/+1
Refactors the `type_op_ascribe_user_type` query into a version which accepts a span, and uses it in the nicer NLL HRTB bound region errors.
2021-08-15De-dupe NLL HRTB diagnostics' use of `type_op_prove_predicate`Rémy Rakic-0/+2
2021-05-23Stabilize ops::ControlFlow (just the type)Scott McMurray-1/+0
2020-10-30TypeVisitor: use `ControlFlow` in rustc_{mir,privacy,traits,typeck}LeSeulArtichaut-0/+1
2020-09-17Remove redundant #![feature(...)] 's from compiler/est31-1/+0
2020-08-30mv compiler to compiler/mark-0/+33