forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in unit tests, use
note
to dump multiple program clauses
(rather than issuing multiple errors) Also, reorder so that the annotations are considered "used" when the lint runs.
- Loading branch information
1 parent
94639ca
commit 7173fd7
Showing
10 changed files
with
61 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
error: Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T : 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). | ||
error: program clause dump | ||
--> $DIR/lower_impl.rs:15:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :- | ||
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T : 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). | ||
|
||
error: Normalize(<T as Bar>::Assoc == std::vec::Vec<T>) :- Implemented(T: Bar). | ||
error: program clause dump | ||
--> $DIR/lower_impl.rs:23:5 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Normalize(<T as Bar>::Assoc == std::vec::Vec<T>) :- | ||
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Normalize(<T as Bar>::Assoc == std::vec::Vec<T>) :- Implemented(T: Bar). | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
error: Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>). | ||
error: program clause dump | ||
--> $DIR/lower_trait.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<S, T, U>) :- | ||
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>). | ||
--> $DIR/lower_trait.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>). | ||
--> $DIR/lower_trait.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(U: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>). | ||
--> $DIR/lower_trait.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>). | ||
= note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>). | ||
= note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>). | ||
= note: FromEnv(U: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>). | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
error: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>). | ||
error: program clause dump | ||
--> $DIR/lower_trait_higher_rank.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<F>) :- | ||
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>). | ||
--> $DIR/lower_trait_higher_rank.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<F>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>). | ||
--> $DIR/lower_trait_higher_rank.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<F>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>). | ||
--> $DIR/lower_trait_higher_rank.rs:13:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<F>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>). | ||
= note: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>). | ||
= note: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>). | ||
= note: FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>). | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,16 @@ | ||
error: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
error: program clause dump | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(S: std::fmt::Debug) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
--> $DIR/lower_trait_where_clause.rs:16:1 | ||
| | ||
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<'a, 'b, S, T, U>) :- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 7 previous errors | ||
= note: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
= note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
= note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
= note: FromEnv(S: std::fmt::Debug) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
= note: FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
= note: RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
= note: TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>). | ||
|
||
error: aborting due to previous error | ||
|