Auto merge of #55040 - scalexm:param-env, r=nikomatsakis
Replace `ParamEnv` with a new type in chalk context. I left a few FIXMEs. r? @nikomatsakis
This commit is contained in:
commit
dbab381da1
16 changed files with 553 additions and 116 deletions
|
|
@ -18,9 +18,6 @@ LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
|||
= note: Implemented(Self: Bar) :- FromEnv(Self: Bar).
|
||||
= note: Implemented(Self: Foo) :- FromEnv(Self: Foo).
|
||||
= note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).
|
||||
= note: WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo).
|
||||
= note: WellFormed(Self: Foo) :- Implemented(Self: Foo).
|
||||
= note: WellFormed(Self: std::marker::Sized) :- Implemented(Self: std::marker::Sized).
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
26
src/test/ui/chalkify/lower_env2.rs
Normal file
26
src/test/ui/chalkify/lower_env2.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// 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)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
trait Foo { }
|
||||
|
||||
#[rustc_dump_program_clauses] //~ ERROR program clause dump
|
||||
struct S<'a, T> where T: Foo {
|
||||
data: &'a T,
|
||||
}
|
||||
|
||||
#[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
||||
fn bar<'a, T: Foo>(x: S<T>) {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
25
src/test/ui/chalkify/lower_env2.stderr
Normal file
25
src/test/ui/chalkify/lower_env2.stderr
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
error: program clause dump
|
||||
--> $DIR/lower_env2.rs:16:1
|
||||
|
|
||||
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: FromEnv(T: Foo) :- FromEnv(S<'a, T>).
|
||||
= note: FromEnv(T: std::marker::Sized) :- FromEnv(S<'a, T>).
|
||||
= note: TypeOutlives(T : 'a) :- FromEnv(S<'a, T>).
|
||||
= note: WellFormed(S<'a, T>) :- Implemented(T: std::marker::Sized), Implemented(T: Foo), TypeOutlives(T : 'a).
|
||||
|
||||
error: program clause dump
|
||||
--> $DIR/lower_env2.rs:21:1
|
||||
|
|
||||
LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: FromEnv(T: Foo) :- FromEnv(S<'a, T>).
|
||||
= note: FromEnv(T: std::marker::Sized) :- FromEnv(S<'a, T>).
|
||||
= note: Implemented(Self: Foo) :- FromEnv(Self: Foo).
|
||||
= note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).
|
||||
= note: TypeOutlives(T : 'a) :- FromEnv(S<'a, T>).
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
26
src/test/ui/chalkify/lower_env3.rs
Normal file
26
src/test/ui/chalkify/lower_env3.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// 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)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
trait Foo {
|
||||
#[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
||||
fn foo(&self);
|
||||
}
|
||||
|
||||
impl<T> Foo for T where T: Clone {
|
||||
#[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
||||
fn foo(&self) {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
20
src/test/ui/chalkify/lower_env3.stderr
Normal file
20
src/test/ui/chalkify/lower_env3.stderr
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
error: program clause dump
|
||||
--> $DIR/lower_env3.rs:15:5
|
||||
|
|
||||
LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: Implemented(Self: Foo) :- FromEnv(Self: Foo).
|
||||
|
||||
error: program clause dump
|
||||
--> $DIR/lower_env3.rs:20:5
|
||||
|
|
||||
LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: FromEnv(Self: std::marker::Sized) :- FromEnv(Self: std::clone::Clone).
|
||||
= note: Implemented(Self: std::clone::Clone) :- FromEnv(Self: std::clone::Clone).
|
||||
= note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue