Auto merge of #138595 - jhpratt:rollup-09pvfzu, r=jhpratt
Rollup of 9 pull requests Successful merges: - #136355 (Add `*_value` methods to proc_macro lib) - #137621 (Add std support to cygwin target) - #137793 (Stablize anonymous pipe) - #138341 (std: Mention clone-on-write mutation in Arc<T>) - #138517 (Improve upvar analysis for deref of child capture) - #138584 (Update Rust Foundation links in Readme) - #138586 (Document `#![register_tool]`) - #138590 (Flatten and simplify some control flow 🫓) - #138592 (update change entry for #137147) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
9c67cecd12
88 changed files with 1025 additions and 341 deletions
|
@ -641,21 +641,19 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for IsSuggestableVisitor<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
Alias(Projection, AliasTy { def_id, .. }) => {
|
||||
if self.tcx.def_kind(def_id) != DefKind::AssocTy {
|
||||
return ControlFlow::Break(());
|
||||
}
|
||||
Alias(Projection, AliasTy { def_id, .. })
|
||||
if self.tcx.def_kind(def_id) != DefKind::AssocTy =>
|
||||
{
|
||||
return ControlFlow::Break(());
|
||||
}
|
||||
|
||||
Param(param) => {
|
||||
// FIXME: It would be nice to make this not use string manipulation,
|
||||
// but it's pretty hard to do this, since `ty::ParamTy` is missing
|
||||
// sufficient info to determine if it is synthetic, and we don't
|
||||
// always have a convenient way of getting `ty::Generics` at the call
|
||||
// sites we invoke `IsSuggestable::is_suggestable`.
|
||||
if param.name.as_str().starts_with("impl ") {
|
||||
return ControlFlow::Break(());
|
||||
}
|
||||
// FIXME: It would be nice to make this not use string manipulation,
|
||||
// but it's pretty hard to do this, since `ty::ParamTy` is missing
|
||||
// sufficient info to determine if it is synthetic, and we don't
|
||||
// always have a convenient way of getting `ty::Generics` at the call
|
||||
// sites we invoke `IsSuggestable::is_suggestable`.
|
||||
Param(param) if param.name.as_str().starts_with("impl ") => {
|
||||
return ControlFlow::Break(());
|
||||
}
|
||||
|
||||
_ => {}
|
||||
|
@ -733,17 +731,13 @@ impl<'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for MakeSuggestableFolder<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
Param(param) => {
|
||||
// FIXME: It would be nice to make this not use string manipulation,
|
||||
// but it's pretty hard to do this, since `ty::ParamTy` is missing
|
||||
// sufficient info to determine if it is synthetic, and we don't
|
||||
// always have a convenient way of getting `ty::Generics` at the call
|
||||
// sites we invoke `IsSuggestable::is_suggestable`.
|
||||
if param.name.as_str().starts_with("impl ") {
|
||||
return Err(());
|
||||
}
|
||||
|
||||
t
|
||||
// FIXME: It would be nice to make this not use string manipulation,
|
||||
// but it's pretty hard to do this, since `ty::ParamTy` is missing
|
||||
// sufficient info to determine if it is synthetic, and we don't
|
||||
// always have a convenient way of getting `ty::Generics` at the call
|
||||
// sites we invoke `IsSuggestable::is_suggestable`.
|
||||
Param(param) if param.name.as_str().starts_with("impl ") => {
|
||||
return Err(());
|
||||
}
|
||||
|
||||
_ => t,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue