Skip to content
Merged
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
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2827,11 +2827,11 @@ impl<'tcx> Ty<'tcx> {

ty::Adt(def, _args) => def.sized_constraint(tcx).skip_binder().is_empty(),

ty::Alias(..) | ty::Param(_) | ty::Placeholder(..) => false,
ty::Alias(..) | ty::Param(_) | ty::Placeholder(..) | ty::Bound(..) => false,

ty::Infer(ty::TyVar(_)) => false,

ty::Bound(..) | ty::Infer(ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)) => {
ty::Infer(ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)) => {
bug!("`is_trivially_sized` applied to unexpected type: {:?}", self)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// check-pass

#![feature(non_lifetime_binders)]
//~^ WARN is incomplete and may not be safe

pub fn foo()
where
for<V> V: Sized,
{
bar();
}

pub fn bar()
where
for<V> V: Sized,
{
}

pub fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/sized-late-bound-issue-114872.rs:3:12
|
LL | #![feature(non_lifetime_binders)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
= note: `#[warn(incomplete_features)]` on by default

warning: 1 warning emitted