Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Sep 3, 2019
1 parent 37f5cc2 commit 3cb1ed4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustc_typeck/constrained_generic_params.rs
Expand Up @@ -36,8 +36,8 @@ pub fn parameters_for_impl<'tcx>(
/// uniquely determined by `t` (see RFC 447). If it is true, return the list
/// of parameters whose values are needed in order to constrain `ty` - these
/// differ, with the latter being a superset, in the presence of projections.
pub fn parameters_for<'tcx, T: TypeFoldable<'tcx>>(
t: &T,
pub fn parameters_for<'tcx>(
t: &impl TypeFoldable<'tcx>,
include_nonconstraining: bool,
) -> Vec<Parameter> {
let mut collector = ParameterCollector {
Expand Down
10 changes: 10 additions & 0 deletions src/test/ui/issues/issue-36836.rs
@@ -1,3 +1,13 @@
// Previously, in addition to the real cause of the problem as seen below,
// the compiler would tell the user:
//
// ```
// error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or
// predicates
// ```
//
// With this test, we check that only the relevant error is emitted.

trait Foo {}

impl<T> Foo for Bar<T> {} //~ ERROR cannot find type `Bar` in this scope
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-36836.stderr
@@ -1,5 +1,5 @@
error[E0412]: cannot find type `Bar` in this scope
--> $DIR/issue-36836.rs:3:17
--> $DIR/issue-36836.rs:13:17
|
LL | impl<T> Foo for Bar<T> {}
| ^^^ not found in this scope
Expand Down

0 comments on commit 3cb1ed4

Please sign in to comment.