blob: 14ba11c44de138639e830677d847907c29556f50 [file] [log] [blame]
// Copyright 2018 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 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Check tautalogically false `Sized` bounds
#![feature(trivial_bounds)]
#![allow(unused)]
trait A {}
impl A for i32 {}
struct T<X: ?Sized> {
x: X,
}
struct S(str, str) where str: Sized;
fn unsized_local() where for<'a> T<A + 'a>: Sized {
let x: T<A> = *(Box::new(T { x: 1 }) as Box<T<A>>);
}
fn return_str() -> str where str: Sized {
*"Sized".to_string().into_boxed_str()
}
fn main() {}