forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
polymorphize: remove predicate logic
This commit removes all logic which marks parameters as used based on their presence in predicates - given rust-lang#75675, this will enable more polymorphization and avoid the symbol clashes that predicate logic previously sidestepped. Signed-off-by: David Wood <david@davidtw.co>
- Loading branch information
Showing
3 changed files
with
43 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,45 @@ | ||
error: item has unused generic parameters | ||
--> $DIR/predicates.rs:14:4 | ||
| | ||
LL | fn foo<I, T>(_: I) | ||
| ^^^ - generic parameter `T` is unused | ||
|
||
error: item has unused generic parameters | ||
--> $DIR/predicates.rs:23:4 | ||
| | ||
LL | fn baz<I, T>(_: I) | ||
| ^^^ - generic parameter `T` is unused | ||
|
||
error: item has unused generic parameters | ||
--> $DIR/predicates.rs:44:19 | ||
| | ||
LL | impl<'a, I, T: 'a, E> Iterator for Foo<'a, I, E> | ||
| - - generic parameter `E` is unused | ||
| | | ||
| generic parameter `I` is unused | ||
... | ||
LL | self.find(|_| true) | ||
| ^^^^^^^^ | ||
|
||
error: item has unused generic parameters | ||
--> $DIR/predicates.rs:58:4 | ||
| | ||
LL | fn quux<A, B, C: Default>() -> usize | ||
| ^^^^ - - generic parameter `B` is unused | ||
| | | ||
| generic parameter `A` is unused | ||
|
||
error: item has unused generic parameters | ||
--> $DIR/predicates.rs:75:4 | ||
| | ||
LL | fn foobar<F, G>() -> usize | ||
| ^^^^^^ - generic parameter `F` is unused | ||
|
||
error: item has unused generic parameters | ||
--> $DIR/predicates.rs:9:4 | ||
| | ||
LL | fn bar<I>() { | ||
| ^^^ - generic parameter `I` is unused | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 6 previous errors | ||
|