Skip to content

Rollup of 13 pull requests #136613

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 30 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
062bc02
Avoid using make_direct_deprecated() in extern "ptx-kernel"
bjorn3 Dec 5, 2024
1c1c13a
Restore previous ABI for f_single_u8_arg
bjorn3 Dec 6, 2024
009feeb
Fix rustc_hidden_type_of_opaques for RPITITs with no default body
compiler-errors Feb 4, 2025
6bfa057
Document minimum supported host tooling on macOS
madsmtm Feb 4, 2025
5794952
Fix unreachable_pub lint for hermit target
thaliaarchi Feb 5, 2025
6770d3d
Fix link in from_fn.rs
hkBst Feb 5, 2025
4760748
Document why some "type mismatches" exist
oli-obk Dec 5, 2024
4718cb4
When displaying a parameter mismatch error, only highlight the mismat…
Jarcho Feb 5, 2025
d92d9f8
Update browser-ui-test version to `0.20.2`
GuillaumeGomez Feb 5, 2025
3b54fab
Implement RustcInternal for RawPtrKind
carolynzech Feb 5, 2025
504ea67
Add `rustc_hir_pretty::expr_to_string` function
GuillaumeGomez Feb 5, 2025
fd1110c
Remove span from delegate
compiler-errors Jan 29, 2025
4e763c2
Pass spans around new solver
compiler-errors Feb 5, 2025
65d7e69
Remove the `mod llvm_` hack, which should no longer be necessary
Zalathar Feb 6, 2025
042fd8c
Remove some unused glob re-exports
Zalathar Feb 6, 2025
d28678e
Clean up trivial traversal/lift impl generator macro calls.
nnethercote Feb 5, 2025
d282a67
Fix whitespace in lift macros.
nnethercote Feb 5, 2025
cc0f3ef
Rollup merge of #133932 - bjorn3:fix_ptx_kernel_abi, r=wesleywiser
workingjubilee Feb 6, 2025
b9bacc4
Rollup merge of #136269 - compiler-errors:spanned, r=lcnr
workingjubilee Feb 6, 2025
1361ef3
Rollup merge of #136550 - compiler-errors:rpitit-empty-body, r=oli-obk
workingjubilee Feb 6, 2025
45398fc
Rollup merge of #136558 - madsmtm:apple-host-tooling, r=jieyouxu
workingjubilee Feb 6, 2025
854a710
Rollup merge of #136563 - nnethercote:clean-up-Trivials, r=lcnr
workingjubilee Feb 6, 2025
8964e70
Rollup merge of #136566 - hkBst:patch-1, r=scottmcm
workingjubilee Feb 6, 2025
ffa67f9
Rollup merge of #136573 - oli-obk:document-literal-at-wrong-type-reas…
workingjubilee Feb 6, 2025
736f902
Rollup merge of #136583 - Jarcho:fn_ctxt2, r=compiler-errors
workingjubilee Feb 6, 2025
393f2cd
Rollup merge of #136587 - GuillaumeGomez:update-gui-tests, r=notriddle
workingjubilee Feb 6, 2025
a9d4b01
Rollup merge of #136590 - carolynzech:raw-ptr-kind-internal, r=compil…
workingjubilee Feb 6, 2025
d116ac4
Rollup merge of #136591 - GuillaumeGomez:expr-to-string, r=Urgau
workingjubilee Feb 6, 2025
a21c31b
Rollup merge of #136595 - thaliaarchi:hermit-unreachable-pub, r=Norat…
workingjubilee Feb 6, 2025
c549268
Rollup merge of #136611 - Zalathar:llvm-underscore, r=workingjubilee
workingjubilee Feb 6, 2025
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
9 changes: 9 additions & 0 deletions compiler/rustc_hir_analysis/src/collect/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ pub(crate) fn opaque_hidden_types(tcx: TyCtxt<'_>) {
}

for id in tcx.hir_crate_items(()).opaques() {
if let hir::OpaqueTyOrigin::FnReturn { parent: fn_def_id, .. }
| hir::OpaqueTyOrigin::AsyncFn { parent: fn_def_id, .. } =
tcx.hir().expect_opaque_ty(id).origin
&& let hir::Node::TraitItem(trait_item) = tcx.hir_node_by_def_id(fn_def_id)
&& let (_, hir::TraitFn::Required(..)) = trait_item.expect_fn()
{
continue;
}

let ty = tcx.type_of(id).instantiate_identity();
let span = tcx.def_span(id);
tcx.dcx().emit_err(crate::errors::TypeOf { span, ty });
Expand Down
15 changes: 15 additions & 0 deletions tests/ui/impl-trait/in-trait/dump.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//@ compile-flags: -Zverbose-internals

#![feature(precise_capturing_in_traits, rustc_attrs)]
#![rustc_hidden_type_of_opaques]

trait Foo {
fn hello(&self) -> impl Sized;
}

fn hello<'s, T: Foo>(x: &'s T) -> impl Sized + use<'s, T> {
//~^ ERROR <T as Foo>::{synthetic#0}<'s/#1>
x.hello()
}

fn main() {}
8 changes: 8 additions & 0 deletions tests/ui/impl-trait/in-trait/dump.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: <T as Foo>::{synthetic#0}<'s/#1>
--> $DIR/dump.rs:10:35
|
LL | fn hello<'s, T: Foo>(x: &'s T) -> impl Sized + use<'s, T> {
| ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error