diff options
| author | scalexm <martin.alex32@hotmail.fr> | 2018-06-07 14:45:09 +0200 |
|---|---|---|
| committer | scalexm <martin.alex32@hotmail.fr> | 2018-06-07 14:45:09 +0200 |
| commit | 796ded2dfd2c042fc355c22558881fc7b6ed00cf (patch) | |
| tree | 879d9b8928081a745b7b23e6e4a61f4b9a8504bf /src | |
| parent | 09f6cb93caedbb7b4368587308574fcd69503e81 (diff) | |
| download | rust-796ded2dfd2c042fc355c22558881fc7b6ed00cf.tar.gz rust-796ded2dfd2c042fc355c22558881fc7b6ed00cf.zip | |
Add tests for `WellFormed-Type` and `FromEnv-Type` rules
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/chalkify/lower_struct.rs | 18 | ||||
| -rw-r--r-- | src/test/ui/chalkify/lower_struct.stderr | 12 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/test/ui/chalkify/lower_struct.rs b/src/test/ui/chalkify/lower_struct.rs new file mode 100644 index 00000000000..9287555a056 --- /dev/null +++ b/src/test/ui/chalkify/lower_struct.rs @@ -0,0 +1,18 @@ +// 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. + +#![feature(rustc_attrs)] + +#[rustc_dump_program_clauses] //~ ERROR program clause dump +struct Foo<T> where Box<T>: Clone { + _x: std::marker::PhantomData<T>, +} + +fn main() { } diff --git a/src/test/ui/chalkify/lower_struct.stderr b/src/test/ui/chalkify/lower_struct.stderr new file mode 100644 index 00000000000..d6cc9c8e9a4 --- /dev/null +++ b/src/test/ui/chalkify/lower_struct.stderr @@ -0,0 +1,12 @@ +error: program clause dump + --> $DIR/lower_struct.rs:13:1 + | +LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: FromEnv(T: std::marker::Sized) :- FromEnv(Foo<T>). + = note: FromEnv(std::boxed::Box<T>: std::clone::Clone) :- FromEnv(Foo<T>). + = note: WellFormed(Foo<T>) :- Implemented(T: std::marker::Sized), Implemented(std::boxed::Box<T>: std::clone::Clone). + +error: aborting due to previous error + |
