Auto merge of #112890 - GuillaumeGomez:rollup-7e01q69, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #99587 (Document memory orderings of `thread::{park, unpark}`) - #112836 ([rustdoc] partially fix invalid files creation) - #112853 (Add `lazy_type_alias` feature gate) - #112863 (Fix copy-paste typo in `eprint(ln)` docs) - #112883 (Make queries traceable again) - #112885 (Fix msg passed to span_bug) - #112886 (Revert 'Rename profile=user to profile=dist') r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
536635c89b
22 changed files with 246 additions and 49 deletions
|
@ -535,7 +535,7 @@ pub fn compile_declarative_macro(
|
|||
.pop()
|
||||
.unwrap();
|
||||
}
|
||||
sess.parse_sess.span_diagnostic.span_bug(def.span, "wrong-structured lhs")
|
||||
sess.parse_sess.span_diagnostic.span_bug(def.span, "wrong-structured rhs")
|
||||
})
|
||||
.collect::<Vec<mbe::TokenTree>>(),
|
||||
_ => sess.parse_sess.span_diagnostic.span_bug(def.span, "wrong-structured rhs"),
|
||||
|
|
|
@ -442,6 +442,8 @@ declare_features! (
|
|||
(active, intra_doc_pointers, "1.51.0", Some(80896), None),
|
||||
// Allows setting the threshold for the `large_assignments` lint.
|
||||
(active, large_assignments, "1.52.0", Some(83518), None),
|
||||
/// Allow to have type alias types for inter-crate use.
|
||||
(active, lazy_type_alias, "CURRENT_RUSTC_VERSION", Some(112792), None),
|
||||
/// Allows `if/while p && let q = r && ...` chains.
|
||||
(active, let_chains, "1.37.0", Some(53667), None),
|
||||
/// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
|
||||
|
|
|
@ -896,7 +896,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
let ty = self.tcx().at(span).type_of(did);
|
||||
|
||||
if matches!(self.tcx().def_kind(did), DefKind::TyAlias)
|
||||
&& ty.skip_binder().has_opaque_types()
|
||||
&& (ty.skip_binder().has_opaque_types() || self.tcx().features().lazy_type_alias)
|
||||
{
|
||||
// Type aliases referring to types that contain opaque types (but aren't just directly
|
||||
// referencing a single opaque type) get encoded as a type alias that normalization will
|
||||
|
|
|
@ -531,6 +531,8 @@ macro_rules! define_queries {
|
|||
key: queries::$name::Key<'tcx>,
|
||||
mode: QueryMode,
|
||||
) -> Option<Erase<queries::$name::Value<'tcx>>> {
|
||||
#[cfg(debug_assertions)]
|
||||
let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered();
|
||||
get_query_incr(
|
||||
QueryType::config(tcx),
|
||||
QueryCtxt::new(tcx),
|
||||
|
@ -571,10 +573,16 @@ macro_rules! define_queries {
|
|||
cache_on_disk: |tcx, key| ::rustc_middle::query::cached::$name(tcx, key),
|
||||
execute_query: |tcx, key| erase(tcx.$name(key)),
|
||||
compute: |tcx, key| {
|
||||
#[cfg(debug_assertions)]
|
||||
let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered();
|
||||
__rust_begin_short_backtrace(||
|
||||
queries::$name::provided_to_erased(
|
||||
tcx,
|
||||
call_provider!([$($modifiers)*][tcx, $name, key])
|
||||
{
|
||||
let ret = call_provider!([$($modifiers)*][tcx, $name, key]);
|
||||
tracing::trace!(?ret);
|
||||
ret
|
||||
}
|
||||
)
|
||||
)
|
||||
},
|
||||
|
|
|
@ -871,6 +871,7 @@ symbols! {
|
|||
large_assignments,
|
||||
lateout,
|
||||
lazy_normalization_consts,
|
||||
lazy_type_alias,
|
||||
le,
|
||||
len,
|
||||
let_chains,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue