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 #107787

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
50e2509
Bump rust-installer
Feb 4, 2023
94f67e0
Change `arena_cache` to not alter the declared query result
Zoxc Feb 7, 2023
eb18293
Allow automatically creating vscode `settings.json` from bootstrap
clubby789 Feb 7, 2023
8307fd7
rustdoc: use a newline instead of `<br>` to format code headers
notriddle Feb 7, 2023
2b70cbb
Rename PointerSized to PointerLike
compiler-errors Feb 7, 2023
a7597a1
Tweak ICE message
estebank Feb 7, 2023
8e2f570
Clearly signal purpose of the yaml template
Mark-Simulacrum Feb 7, 2023
4f36673
Docs: Fix format of headings in String::reserve
dbrgn Feb 7, 2023
6fdfdea
Remove astconv usage in diagnostic
compiler-errors Feb 7, 2023
cf1ac42
Rollup merge of #107656 - jonhoo:bump-rust-installer, r=Mark-Simulacrum
matthiaskrgr Feb 8, 2023
608cdc2
Rollup merge of #107757 - clubby789:setup-settings-json, r=jyn514
matthiaskrgr Feb 8, 2023
6f660c9
Rollup merge of #107758 - Zoxc:arena-enref, r=cjgillot
matthiaskrgr Feb 8, 2023
7ae3ccf
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
matthiaskrgr Feb 8, 2023
4aa11ae
Rollup merge of #107770 - notriddle:notriddle/br2nl, r=GuillaumeGomez
matthiaskrgr Feb 8, 2023
4a86e82
Rollup merge of #107771 - estebank:ice-msg, r=compiler-errors
matthiaskrgr Feb 8, 2023
ff34c06
Rollup merge of #107773 - Mark-Simulacrum:rename-auto-template, r=est…
matthiaskrgr Feb 8, 2023
1624a91
Rollup merge of #107776 - dbrgn:docs-string-reserve-headings, r=cuviper
matthiaskrgr Feb 8, 2023
63ec775
Rollup merge of #107779 - compiler-errors:issue-107775, r=jackh726
matthiaskrgr Feb 8, 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ice.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Internal Compiler Error (Structured form)
name: Internal Compiler Error (for use by automated tooling)
description: For now, you'll want to use the other ICE template, as GitHub forms have strict limits on the size of fields so backtraces cannot be pasted directly.
labels: ["C-bug", "I-ICE", "T-compiler"]
title: "[ICE]: "
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
let vtable = self.get_vtable_ptr(src.layout.ty, data.principal())?;
let vtable = Scalar::from_maybe_pointer(vtable, self);
let data = self.read_immediate(src)?.to_scalar();
let _assert_pointer_sized = data.to_pointer(self)?;
let _assert_pointer_like = data.to_pointer(self)?;
let val = Immediate::ScalarPair(data, vtable);
self.write_immediate(val, dest)?;
} else {
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,11 +1200,9 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
if !info.payload().is::<rustc_errors::ExplicitBug>()
&& !info.payload().is::<rustc_errors::DelayedBugPanic>()
{
let mut d = rustc_errors::Diagnostic::new(rustc_errors::Level::Bug, "unexpected panic");
handler.emit_diagnostic(&mut d);
handler.emit_err(session_diagnostics::Ice);
}

handler.emit_note(session_diagnostics::Ice);
handler.emit_note(session_diagnostics::IceBugReport { bug_report_url });
handler.emit_note(session_diagnostics::IceVersion {
version: util::version_str!().unwrap_or("unknown_version"),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ language_item_table! {
TryTraitBranch, sym::branch, branch_fn, Target::Method(MethodKind::Trait { body: false }), GenericRequirement::None;
TryTraitFromYeet, sym::from_yeet, from_yeet_fn, Target::Fn, GenericRequirement::None;

PointerSized, sym::pointer_sized, pointer_sized, Target::Trait, GenericRequirement::Exact(0);
PointerLike, sym::pointer_like, pointer_like, Target::Trait, GenericRequirement::Exact(0);

Poll, sym::Poll, poll, Target::Enum, GenericRequirement::None;
PollReady, sym::Ready, poll_ready_variant, Target::Variant, GenericRequirement::None;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
self.cause.clone(),
self.param_env,
ty::Binder::dummy(
self.tcx.at(self.cause.span).mk_trait_ref(hir::LangItem::PointerSized, [a]),
self.tcx.at(self.cause.span).mk_trait_ref(hir::LangItem::PointerLike, [a]),
),
));

Expand Down
21 changes: 11 additions & 10 deletions compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,16 +1336,17 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
hir::Path { segments: [segment], .. },
))
| hir::ExprKind::Path(QPath::TypeRelative(ty, segment)) => {
let self_ty = self.astconv().ast_ty_to_ty(ty);
if let Ok(pick) = self.probe_for_name(
Mode::Path,
Ident::new(capitalized_name, segment.ident.span),
Some(expected_ty),
IsSuggestion(true),
self_ty,
expr.hir_id,
ProbeScope::TraitsInScope,
) {
if let Some(self_ty) = self.typeck_results.borrow().node_type_opt(ty.hir_id)
&& let Ok(pick) = self.probe_for_name(
Mode::Path,
Ident::new(capitalized_name, segment.ident.span),
Some(expected_ty),
IsSuggestion(true),
self_ty,
expr.hir_id,
ProbeScope::TraitsInScope,
)
{
(pick.item, segment)
} else {
return false;
Expand Down
Loading