rust/tests/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
370 B
Rust
Raw Normal View History

2018-05-06 21:54:00 +00:00
//@ run-pass
// Test that inconsistent bounds are used in well-formedness checks
#![feature(trivial_bounds)]
use std::fmt::Debug;
pub fn foo() where Vec<str>: Debug, str: Copy {
//~^ WARNING Debug does not depend on any type or lifetime
//~| WARNING Copy does not depend on any type or lifetime
2018-05-06 21:54:00 +00:00
let x = vec![*"1"];
println!("{:?}", x);
}
fn main() {}