Skip to content

Rollup of 8 pull requests #100024

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

Merged
merged 18 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3395094
bootstrap: don't emit warn about duplicated deps with same/different …
klensy Jul 28, 2022
6733bc3
Remove guess_head_span.
cjgillot Jul 23, 2022
a09b7eb
Use DefKind instead of FnKind for recursion lint.
cjgillot Jul 29, 2022
2134dd3
Remove useless closure.
cjgillot Jul 29, 2022
86dd457
Improve `cannot move out of` error message
obeis Jul 22, 2022
9037ebb
Improve size assertions.
nnethercote Jul 30, 2022
92b31cc
avoid `Ty` to `String` conversions
TaKO8Ki Aug 1, 2022
a93feaf
Make Rustdoc exit with correct error code when scrape examples from i…
willcrichton Jul 31, 2022
fcf1f95
fix: better error when python not found in x
callumio Aug 1, 2022
d9f28b7
fix ICE in Definitions::create_def
GoldsteinE Jul 16, 2022
58042bf
Rollup merge of #99340 - GoldsteinE:fix-localdefid-debug-ice, r=lcnr
matthiaskrgr Aug 1, 2022
f9aa989
Rollup merge of #99629 - obeis:issue-99470, r=compiler-errors
matthiaskrgr Aug 1, 2022
1530ed8
Rollup merge of #99864 - klensy:bootstrap-art-dupe, r=jyn514
matthiaskrgr Aug 1, 2022
8db3d7c
Rollup merge of #99911 - cjgillot:no-guess, r=davidtwco
matthiaskrgr Aug 1, 2022
1fa02dd
Rollup merge of #99976 - willcrichton:example-analyzer, r=jyn514
matthiaskrgr Aug 1, 2022
e6bb00f
Rollup merge of #100003 - nnethercote:improve-size-assertions, r=lqd
matthiaskrgr Aug 1, 2022
4606830
Rollup merge of #100012 - TaKO8Ki:avoid-ty-to-string-conversions, r=f…
matthiaskrgr Aug 1, 2022
058ea7a
Rollup merge of #100020 - CallumIO:issue-99648, r=jyn514
matthiaskrgr Aug 1, 2022
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
fix ICE in Definitions::create_def
  • Loading branch information
GoldsteinE committed Aug 1, 2022
commit d9f28b7b701321d24ff9930b3f7b5d93b6fd671f
7 changes: 6 additions & 1 deletion compiler/rustc_hir/src/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,12 @@ impl Definitions {

/// Adds a definition with a parent definition.
pub fn create_def(&mut self, parent: LocalDefId, data: DefPathData) -> LocalDefId {
debug!("create_def(parent={:?}, data={:?})", parent, data);
// We can't use `Debug` implementation for `LocalDefId` here, since it tries to acquire a
// reference to `Definitions` and we're already holding a mutable reference.
debug!(
"create_def(parent={}, data={data:?})",
self.def_path(parent).to_string_no_crate_verbose(),
);

// The root node must be created with `create_root_def()`.
assert!(data != DefPathData::CrateRoot);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1459,11 +1459,11 @@ impl<'tcx> TyCtxt<'tcx> {
};

format!(
"{}[{}]{}",
"{}[{:04x}]{}",
crate_name,
// Don't print the whole stable crate id. That's just
// annoying in debug output.
&(format!("{:08x}", stable_crate_id.to_u64()))[..4],
stable_crate_id.to_u64() >> 8 * 6,
self.def_path(def_id).to_string_no_crate_verbose()
)
}
Expand Down