Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #109252

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ce6adcc
Prevent stable `libtest` from supporting `-Zunstable-options`
thomcc Mar 12, 2023
9afffc5
Remove box expressions from HIR
clubby789 Mar 14, 2023
fb916a0
Fix riscv64 fuchsia LLVM target name
taiki-e Mar 15, 2023
86a5e36
Fix linker detection for clang with prefix
taiki-e Mar 15, 2023
26c4c1e
Rename impl_trait_in_trait_parent to impl_trait_in_trait_parent_fn
spastorino Mar 10, 2023
39ffe96
Properly implement generics_of for traits
spastorino Mar 14, 2023
39d19ca
Make impl_trait_in_trait_container consider newly generated RPITITs
spastorino Mar 13, 2023
0b9b7dd
inherit_overflow: adapt pattern to also work with v0 mangling
durin42 Mar 15, 2023
e41491f
ImplTraitPlaceholder -> is_impl_trait_in_trait
spastorino Mar 14, 2023
11f1810
Feed is_type_alias_impl_trait for RPITITs on the trait side
spastorino Mar 13, 2023
c5c4340
Add revisions to fixed tests in -Zlower-impl-trait-in-trait-to-assoc-ty
spastorino Mar 14, 2023
0949da8
Install projection from RPITIT to default trait method opaque correctly
compiler-errors Mar 15, 2023
ff7c3b8
Don't install default opaque projection predicates in RPITIT associat…
compiler-errors Mar 16, 2023
8d922eb
Fix on_unimplemented_note for RPITITs
compiler-errors Mar 16, 2023
a8839c3
Use sort_by_key instead of sort_by
est31 Mar 16, 2023
7a1a02e
Fix invalid markdown link references
DaniPopes Mar 16, 2023
c0b5720
Fix generics mismatch errors for RPITITs on -Zlower-impl-trait-in-tra…
spastorino Mar 16, 2023
a12665a
Add generic parameters mismatch tests for async in traits
spastorino Mar 16, 2023
a1d8730
Rollup merge of #108958 - clubby789:unbox-the-hir, r=compiler-errors
matthiaskrgr Mar 17, 2023
cc4caed
Rollup merge of #109044 - thomcc:disallow-unstable-libtest, r=jyn514
matthiaskrgr Mar 17, 2023
b490114
Rollup merge of #109155 - taiki-e:riscv64-fuchsia-fix-llvm-target, r=…
matthiaskrgr Mar 17, 2023
29f5f96
Rollup merge of #109156 - taiki-e:linker-detection, r=petrochenkov
matthiaskrgr Mar 17, 2023
9ad5ab7
Rollup merge of #109181 - durin42:v0-mangle-inherit_overflow, r=Nilst…
matthiaskrgr Mar 17, 2023
28bf3db
Rollup merge of #109198 - compiler-errors:new-rpitit-default-body, r=…
matthiaskrgr Mar 17, 2023
50ea8fe
Rollup merge of #109215 - est31:sort_by_key, r=Nilstrieb
matthiaskrgr Mar 17, 2023
794d541
Rollup merge of #109229 - DaniPopes:link-references, r=notriddle
matthiaskrgr Mar 17, 2023
de0fbeb
Rollup merge of #109238 - spastorino:new-rpitit-12, r=compiler-errors
matthiaskrgr Mar 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions compiler/rustc_ast/src/util/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ pub enum ExprPrecedence {
Assign,
AssignOp,

Box,
AddrOf,
Let,
Unary,
Expand Down Expand Up @@ -319,8 +318,7 @@ impl ExprPrecedence {
ExprPrecedence::AssignOp => AssocOp::Assign.precedence() as i8,

// Unary, prefix
ExprPrecedence::Box
| ExprPrecedence::AddrOf
ExprPrecedence::AddrOf
// Here `let pats = expr` has `let pats =` as a "unary" prefix of `expr`.
// However, this is not exactly right. When `let _ = a` is the LHS of a binop we
// need parens sometimes. E.g. we can print `(let _ = a) && b` as `let _ = a && b`
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/region_infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ fn sccs_info<'cx, 'tcx>(
let var_to_origin = infcx.reg_var_to_origin.borrow();

let mut var_to_origin_sorted = var_to_origin.clone().into_iter().collect::<Vec<_>>();
var_to_origin_sorted.sort_by(|a, b| a.0.cmp(&b.0));
var_to_origin_sorted.sort_by_key(|vto| vto.0);
let mut debug_str = "region variables to origins:\n".to_string();
for (reg_var, origin) in var_to_origin_sorted.into_iter() {
debug_str.push_str(&format!("{:?}: {:?}\n", reg_var, origin));
Expand Down Expand Up @@ -2216,7 +2216,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
// is in the same SCC or something. In that case, find what
// appears to be the most interesting point to report to the
// user via an even more ad-hoc guess.
categorized_path.sort_by(|p0, p1| p0.category.cmp(&p1.category));
categorized_path.sort_by_key(|p| p.category);
debug!("sorted_path={:#?}", categorized_path);

(categorized_path.remove(0), extra_info)
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1199,15 +1199,17 @@ pub fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) {
.and_then(|(lhs, rhs)| rhs.chars().all(char::is_numeric).then_some(lhs))
.unwrap_or(stem);

// GCC can have an optional target prefix.
// GCC/Clang can have an optional target prefix.
let flavor = if stem == "emcc" {
LinkerFlavor::EmCc
} else if stem == "gcc"
|| stem.ends_with("-gcc")
|| stem == "g++"
|| stem.ends_with("-g++")
|| stem == "clang"
|| stem.ends_with("-clang")
|| stem == "clang++"
|| stem.ends_with("-clang++")
{
LinkerFlavor::from_cli(LinkerFlavorCli::Gcc, &sess.target)
} else if stem == "wasm-ld" || stem.ends_with("-wasm-ld") {
Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,6 @@ pub struct Expr<'hir> {
impl Expr<'_> {
pub fn precedence(&self) -> ExprPrecedence {
match self.kind {
ExprKind::Box(_) => ExprPrecedence::Box,
ExprKind::ConstBlock(_) => ExprPrecedence::ConstBlock,
ExprKind::Array(_) => ExprPrecedence::Array,
ExprKind::Call(..) => ExprPrecedence::Call,
Expand Down Expand Up @@ -1763,7 +1762,6 @@ impl Expr<'_> {
| ExprKind::Lit(_)
| ExprKind::ConstBlock(..)
| ExprKind::Unary(..)
| ExprKind::Box(..)
| ExprKind::AddrOf(..)
| ExprKind::Binary(..)
| ExprKind::Yield(..)
Expand Down Expand Up @@ -1851,7 +1849,6 @@ impl Expr<'_> {
| ExprKind::InlineAsm(..)
| ExprKind::AssignOp(..)
| ExprKind::ConstBlock(..)
| ExprKind::Box(..)
| ExprKind::Binary(..)
| ExprKind::Yield(..)
| ExprKind::DropTemps(..)
Expand All @@ -1862,8 +1859,7 @@ impl Expr<'_> {
/// To a first-order approximation, is this a pattern?
pub fn is_approximately_pattern(&self) -> bool {
match &self.kind {
ExprKind::Box(_)
| ExprKind::Array(_)
ExprKind::Array(_)
| ExprKind::Call(..)
| ExprKind::Tup(_)
| ExprKind::Lit(_)
Expand Down Expand Up @@ -1910,8 +1906,6 @@ pub fn is_range_literal(expr: &Expr<'_>) -> bool {

#[derive(Debug, HashStable_Generic)]
pub enum ExprKind<'hir> {
/// A `box x` expression.
Box(&'hir Expr<'hir>),
/// Allow anonymous constants from an inline `const` block
ConstBlock(AnonConst),
/// An array (e.g., `[a, b, c, d]`).
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ pub fn walk_anon_const<'v, V: Visitor<'v>>(visitor: &mut V, constant: &'v AnonCo
pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>) {
visitor.visit_id(expression.hir_id);
match expression.kind {
ExprKind::Box(ref subexpression) => visitor.visit_expr(subexpression),
ExprKind::Array(subexpressions) => {
walk_list!(visitor, visit_expr, subexpressions);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ fn check_item_type(tcx: TyCtxt<'_>, id: hir::ItemId) {
check_opaque(tcx, id);
}
DefKind::ImplTraitPlaceholder => {
let parent = tcx.impl_trait_in_trait_parent(id.owner_id.to_def_id());
let parent = tcx.impl_trait_in_trait_parent_fn(id.owner_id.to_def_id());
// Only check the validity of this opaque type if the function has a default body
if let hir::Node::TraitItem(hir::TraitItem {
kind: hir::TraitItemKind::Fn(_, hir::TraitFn::Provided(_)),
Expand Down
11 changes: 11 additions & 0 deletions compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,17 @@ fn compare_number_of_generics<'tcx>(
return Ok(());
}

// We never need to emit a separate error for RPITITs, since if an RPITIT
// has mismatched type or const generic arguments, then the method that it's
// inheriting the generics from will also have mismatched arguments, and
// we'll report an error for that instead. Delay a bug for safety, though.
if tcx.opt_rpitit_info(trait_.def_id).is_some() {
return Err(tcx.sess.delay_span_bug(
rustc_span::DUMMY_SP,
"errors comparing numbers of generics of trait/impl functions were not emitted",
));
}

let matchings = [
("type", trait_own_counts.types, impl_own_counts.types),
("const", trait_own_counts.consts, impl_own_counts.consts),
Expand Down
24 changes: 17 additions & 7 deletions compiler/rustc_hir_analysis/src/check/wfcheck.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::autoderef::Autoderef;
use crate::constrained_generic_params::{identify_constrained_generic_params, Parameter};

use hir::def::DefKind;
use rustc_ast as ast;
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet};
use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticBuilder, ErrorGuaranteed};
Expand Down Expand Up @@ -1548,16 +1547,27 @@ fn check_return_position_impl_trait_in_trait_bounds<'tcx>(
if let Some(assoc_item) = tcx.opt_associated_item(fn_def_id.to_def_id())
&& assoc_item.container == ty::AssocItemContainer::TraitContainer
{
// FIXME(-Zlower-impl-trait-in-trait-to-assoc-ty): Even with the new lowering
// strategy, we can't just call `check_associated_item` on the new RPITITs,
// because tests like `tests/ui/async-await/in-trait/implied-bounds.rs` will fail.
// That's because we need to check that the bounds of the RPITIT hold using
// the special substs that we create during opaque type lowering, otherwise we're
// getting a bunch of early bound and free regions mixed up... Haven't looked too
// deep into this, though.
for arg in fn_output.walk() {
if let ty::GenericArgKind::Type(ty) = arg.unpack()
&& let ty::Alias(ty::Opaque, proj) = ty.kind()
&& tcx.def_kind(proj.def_id) == DefKind::ImplTraitPlaceholder
&& tcx.impl_trait_in_trait_parent(proj.def_id) == fn_def_id.to_def_id()
// RPITITs are always eagerly normalized into opaques, so always look for an
// opaque here.
&& let ty::Alias(ty::Opaque, opaque_ty) = ty.kind()
&& let Some(opaque_def_id) = opaque_ty.def_id.as_local()
&& let opaque = tcx.hir().expect_item(opaque_def_id).expect_opaque_ty()
&& let hir::OpaqueTyOrigin::FnReturn(source) | hir::OpaqueTyOrigin::AsyncFn(source) = opaque.origin
&& source == fn_def_id
{
let span = tcx.def_span(proj.def_id);
let bounds = wfcx.tcx().explicit_item_bounds(proj.def_id);
let span = tcx.def_span(opaque_ty.def_id);
let bounds = wfcx.tcx().explicit_item_bounds(opaque_ty.def_id);
let wf_obligations = bounds.iter().flat_map(|&(bound, bound_span)| {
let bound = ty::EarlyBinder(bound).subst(tcx, proj.substs);
let bound = ty::EarlyBinder(bound).subst(tcx, opaque_ty.substs);
let normalized_bound = wfcx.normalize(span, None, bound);
traits::wf::predicate_obligations(
wfcx.infcx,
Expand Down
36 changes: 22 additions & 14 deletions compiler/rustc_hir_analysis/src/collect/item_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::astconv::AstConv;
use rustc_hir as hir;
use rustc_infer::traits::util;
use rustc_middle::ty::subst::InternalSubsts;
use rustc_middle::ty::{self, ImplTraitInTraitData, Ty, TyCtxt};
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_span::def_id::DefId;
use rustc_span::Span;

Expand Down Expand Up @@ -76,18 +76,26 @@ pub(super) fn explicit_item_bounds(
tcx: TyCtxt<'_>,
def_id: DefId,
) -> &'_ [(ty::Predicate<'_>, Span)] {
// If the def_id is about an RPITIT, delegate explicit_item_bounds to the opaque_def_id that
// generated the synthesized associate type.
let rpitit_info = if let Some(ImplTraitInTraitData::Trait { opaque_def_id, .. }) =
tcx.opt_rpitit_info(def_id)
{
Some(opaque_def_id)
} else {
None
};
match tcx.opt_rpitit_info(def_id) {
// RPITIT's bounds are the same as opaque type bounds, but with
// a projection self type.
Some(ty::ImplTraitInTraitData::Trait { opaque_def_id, .. }) => {
let item = tcx.hir().get_by_def_id(opaque_def_id.expect_local()).expect_item();
let opaque_ty = item.expect_opaque_ty();
return opaque_type_bounds(
tcx,
opaque_def_id,
opaque_ty.bounds,
tcx.mk_projection(def_id, ty::InternalSubsts::identity_for_item(tcx, def_id)),
item.span,
);
}
// These should have been fed!
Some(ty::ImplTraitInTraitData::Impl { .. }) => unreachable!(),
None => {}
}

let bounds_def_id = rpitit_info.unwrap_or(def_id);
let hir_id = tcx.hir().local_def_id_to_hir_id(bounds_def_id.expect_local());
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id.expect_local());
match tcx.hir().get(hir_id) {
hir::Node::TraitItem(hir::TraitItem {
kind: hir::TraitItemKind::Type(bounds, _),
Expand All @@ -100,12 +108,12 @@ pub(super) fn explicit_item_bounds(
..
}) => {
let substs = InternalSubsts::identity_for_item(tcx, def_id);
let item_ty = if *in_trait || rpitit_info.is_some() {
let item_ty = if *in_trait && !tcx.lower_impl_trait_in_trait_to_assoc_ty() {
tcx.mk_projection(def_id, substs)
} else {
tcx.mk_opaque(def_id, substs)
};
opaque_type_bounds(tcx, bounds_def_id, bounds, item_ty, *span)
opaque_type_bounds(tcx, def_id, bounds, item_ty, *span)
}
_ => bug!("item_bounds called on {:?}", def_id),
}
Expand Down
12 changes: 8 additions & 4 deletions compiler/rustc_hir_analysis/src/variance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,14 @@ fn variance_of_opaque(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Varianc
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
match t.kind() {
ty::Alias(_, ty::AliasTy { def_id, substs, .. })
if matches!(
self.tcx.def_kind(*def_id),
DefKind::OpaqueTy | DefKind::ImplTraitPlaceholder
) =>
if matches!(self.tcx.def_kind(*def_id), DefKind::OpaqueTy) =>
{
self.visit_opaque(*def_id, substs)
}
// FIXME(-Zlower-impl-trait-in-trait-to-assoc-ty) check whether this is necessary
// at all for RPITITs.
ty::Alias(_, ty::AliasTy { def_id, substs, .. })
if self.tcx.is_impl_trait_in_trait(*def_id) =>
{
self.visit_opaque(*def_id, substs)
}
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_hir_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,10 +1366,6 @@ impl<'a> State<'a> {
self.ibox(INDENT_UNIT);
self.ann.pre(self, AnnNode::Expr(expr));
match expr.kind {
hir::ExprKind::Box(expr) => {
self.word_space("Box::new");
self.print_call_post(std::slice::from_ref(expr));
}
hir::ExprKind::Array(exprs) => {
self.print_expr_vec(exprs);
}
Expand Down
14 changes: 5 additions & 9 deletions compiler/rustc_hir_typeck/src/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use super::{check_fn, Expectation, FnCtxt, GeneratorTypes};

use hir::def::DefKind;
use rustc_errors::ErrorGuaranteed;
use rustc_hir as hir;
use rustc_hir::lang_items::LangItem;
Expand Down Expand Up @@ -715,14 +714,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
.subst_iter_copied(self.tcx, substs)
.find_map(|(p, s)| get_future_output(p, s))?,
ty::Error(_) => return None,
ty::Alias(ty::Projection, proj)
if self.tcx.def_kind(proj.def_id) == DefKind::ImplTraitPlaceholder =>
{
self.tcx
.bound_explicit_item_bounds(proj.def_id)
.subst_iter_copied(self.tcx, proj.substs)
.find_map(|(p, s)| get_future_output(p, s))?
}
ty::Alias(ty::Projection, proj) if self.tcx.is_impl_trait_in_trait(proj.def_id) => self
.tcx
.bound_explicit_item_bounds(proj.def_id)
.subst_iter_copied(self.tcx, proj.substs)
.find_map(|(p, s)| get_future_output(p, s))?,
_ => span_bug!(
self.tcx.def_span(expr_def_id),
"async fn generator return type not an inference variable: {ret_ty}"
Expand Down
11 changes: 0 additions & 11 deletions compiler/rustc_hir_typeck/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

let tcx = self.tcx;
match expr.kind {
ExprKind::Box(subexpr) => self.check_expr_box(subexpr, expected),
ExprKind::Lit(ref lit) => self.check_lit(&lit, expected),
ExprKind::Binary(op, lhs, rhs) => self.check_binop(expr, op, lhs, rhs, expected),
ExprKind::Assign(lhs, rhs, span) => {
Expand Down Expand Up @@ -359,16 +358,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}
}

fn check_expr_box(&self, expr: &'tcx hir::Expr<'tcx>, expected: Expectation<'tcx>) -> Ty<'tcx> {
let expected_inner = expected.to_option(self).map_or(NoExpectation, |ty| match ty.kind() {
ty::Adt(def, _) if def.is_box() => Expectation::rvalue_hint(self, ty.boxed_ty()),
_ => NoExpectation,
});
let referent_ty = self.check_expr_with_expectation(expr, expected_inner);
self.require_type_is_sized(referent_ty, expr.span, traits::SizedBoxType);
self.tcx.mk_box(referent_ty)
}

fn check_expr_unary(
&self,
unop: hir::UnOp,
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_hir_typeck/src/expr_use_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,6 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
self.walk_captures(closure);
}

hir::ExprKind::Box(ref base) => {
self.consume_expr(base);
}

hir::ExprKind::Yield(value, _) => {
self.consume_expr(value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ impl<'a, 'tcx> DropRangeVisitor<'a, 'tcx> {
//
// Some of these may be interesting in the future
ExprKind::Path(..)
| ExprKind::Box(..)
| ExprKind::ConstBlock(..)
| ExprKind::Array(..)
| ExprKind::Call(..)
Expand Down Expand Up @@ -478,7 +477,6 @@ impl<'a, 'tcx> Visitor<'tcx> for DropRangeVisitor<'a, 'tcx> {
| ExprKind::AssignOp(..)
| ExprKind::Binary(..)
| ExprKind::Block(..)
| ExprKind::Box(..)
| ExprKind::Cast(..)
| ExprKind::Closure { .. }
| ExprKind::ConstBlock(..)
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir_typeck/src/mem_categorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
| hir::ExprKind::Struct(..)
| hir::ExprKind::Repeat(..)
| hir::ExprKind::InlineAsm(..)
| hir::ExprKind::Box(..)
| hir::ExprKind::Err(_) => Ok(self.cat_rvalue(expr.hir_id, expr.span, expr_ty)),
}
}
Expand Down
13 changes: 7 additions & 6 deletions compiler/rustc_infer/src/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@ impl<'tcx> InferCtxt<'tcx> {
pub fn get_impl_future_output_ty(&self, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
let (def_id, substs) = match *ty.kind() {
ty::Alias(_, ty::AliasTy { def_id, substs, .. })
if matches!(
self.tcx.def_kind(def_id),
DefKind::OpaqueTy | DefKind::ImplTraitPlaceholder
) =>
if matches!(self.tcx.def_kind(def_id), DefKind::OpaqueTy) =>
{
(def_id, substs)
}
ty::Alias(_, ty::AliasTy { def_id, substs, .. })
if self.tcx.is_impl_trait_in_trait(def_id) =>
{
(def_id, substs)
}
Expand Down Expand Up @@ -1757,8 +1759,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
)
}
(true, ty::Alias(ty::Projection, proj))
if self.tcx.def_kind(proj.def_id)
== DefKind::ImplTraitPlaceholder =>
if self.tcx.is_impl_trait_in_trait(proj.def_id) =>
{
let sm = self.tcx.sess.source_map();
let pos = sm.lookup_char_pos(self.tcx.def_span(proj.def_id).lo());
Expand Down
Loading