8000 Remove Spans from HIR by cjgillot · Pull Request #72015 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Remove Spans from HIR #72015

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

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4f527e9
Remove span from hir::Arm.
cjgillot May 2, 2020
1fcff64
Remove span from hir::FieldPat.
cjgillot May 2, 2020
3cf2fba
Remove span from hir::Local.
cjgillot May 2, 2020
f51da1e
Remove span from hir::Pat.
cjgillot Mar 6, 2021
ec56b9f
Remove span from hir::Field.
cjgillot May 2, 2020
ec5cd74
Remove GenericArg::span.
cjgillot May 3, 2020
66e1a16
Remove Span from hir::TypeBinding.
cjgillot May 8, 2020
a29261d
Remove Span from hir::ConstArg.
cjgillot Jun 1, 2020
56871a5
Remove Span from hir::TraitItemRef.
cjgillot Jun 1, 2020
346176f
Remove Span from hir::ImplItemRef.
cjgillot Jun 1, 2020
6459750
Remove span from hir::ForeignItemRef.
cjgillot Dec 11, 2020
fcdfaf0
Fix fulldeps tests.
cjgillot May 9, 2020
e6d9d4b
Fortify find_entry.
cjgillot Dec 13, 2020
125796b
Remove Span from hir::CrateItem.
cjgillot Dec 10, 2020
7e26fd6
Pass HirId in rustc_typeck::check.
cjgillot May 2, 2020
bdb83e2
Pass HirId in rustc_lint.
cjgillot May 2, 2020
05e913a
Pass HirId in rustc_passes::stability.
cjgillot May 2, 2020
2035593
Pass HirId in rustc_incremental::persist::dirty_clean.
cjgillot Dec 11, 2020
cf99aea
Pass HirId in rustc_passes::check_attr.
cjgillot Dec 11, 2020
85396f8
Pass HirId in rustc_passes::entry.
cjgillot Dec 11, 2020
042bf08
Remove span from hir::Item.
cjgillot Dec 22, 2020
d632f42
Remove span from hir::ForeignItem.
cjgillot Dec 11, 2020
0d9d1e0
Remove Span from hir::Ty.
cjgillot May 8, 2020
e281f67
Remove Span from hir::Expr.
cjgillot May 3, 2020
f065656
Fix fulldeps tests.
cjgillot May 9, 2020
bb40d08
Fix suggestions.
cjgillot Mar 13, 2021
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
Prev Previous commit
Next Next commit
Pass HirId in rustc_typeck::check.
  • Loading branch information
cjgillot committed Mar 13, 2021
commit 7e26fd6624c6838fede00cc01f4eed99ff6bfd51
3 changes: 2 additions & 1 deletion compiler/rustc_middle/src/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ impl<'tcx> ty::TyS<'tcx> {

/// Check whether a type is representable. This means it cannot contain unboxed
/// structural recursion. This check is needed for structs and enums.
pub fn is_representable(&'tcx self, tcx: TyCtxt<'tcx>, sp: Span) -> Representability {
pub fn is_representable(&'tcx self, tcx: TyCtxt<'tcx>, hir_id: hir::HirId) -> Representability {
// Iterate until something non-representable is found
fn fold_repr<It: Iterator<Item = Representability>>(iter: It) -> Representability {
iter.fold(Representability::Representable, |r1, r2| match (r1, r2) {
Expand Down Expand Up @@ -995,6 +995,7 @@ impl<'tcx> ty::TyS<'tcx> {
}

debug!("is_type_representable: {:?}", self);
let sp = tcx.hir().span(hir_id);

// To avoid a stack overflow when checking an enum variant or struct that
// contains a different, structurally recursive type, maintain a stack
Expand Down
Loading
0