Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
);
}
Some(LangItem::PointeeSized) => {
bug!("`PointeeSized` is removed during lowering");
tcx.dcx().delayed_bug("`PointeeSized` is removed during lowering");
}
Some(LangItem::Unsize) => {
self.assemble_candidates_for_unsizing(obligation, &mut candidates);
Expand Down
9 changes: 9 additions & 0 deletions tests/ui/sized-hierarchy/dyn-pointeesized-issue-142652.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![feature(sized_hierarchy)]

use std::marker::PointeeSized;

fn main() {
let x = main;
let y: Box<dyn PointeeSized> = x;
//~^ ERROR mismatched types
}
14 changes: 14 additions & 0 deletions tests/ui/sized-hierarchy/dyn-pointeesized-issue-142652.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error[E0308]: mismatched types
--> $DIR/dyn-pointeesized-issue-142652.rs:7:38
|
LL | let y: Box<dyn PointeeSized> = x;
| --------------------- ^ expected `Box<dyn PointeeSized>`, found fn item
| |
| expected due to this
|
= note: expected struct `Box<dyn PointeeSized>`
found fn item `fn() {main}`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.
Loading