diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index f832bf8d86e93..33309000f0652 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -1665,7 +1665,6 @@ fn is_unsized<'gcx: 'tcx, 'tcx>(astconv: &AstConv<'gcx, 'tcx>, for ab in ast_bounds { if let &hir::TraitTyParamBound(ref ptr, hir::TraitBoundModifier::Maybe) = ab { if unbound.is_none() { - assert!(ptr.bound_lifetimes.is_empty()); unbound = Some(ptr.trait_ref.clone()); } else { span_err!(tcx.sess, span, E0203, diff --git a/src/test/run-pass/issue-39089.rs b/src/test/run-pass/issue-39089.rs new file mode 100644 index 0000000000000..c3a58844547d6 --- /dev/null +++ b/src/test/run-pass/issue-39089.rs @@ -0,0 +1,13 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn f Sized>() {} + +fn main() {}