about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-07 04:01:26 +0000
committerbors <bors@rust-lang.org>2020-04-07 04:01:26 +0000
commit209b2be09fcaff937480d1fbbe8b31646e361c7a (patch)
tree94f4edf2efe2129f98902e825bb2cc220e7d0697 /src/test
parentbf1f2eedda4fa02b7c9347dd849ed73ddd43dedc (diff)
parent626abc797704009e4683be5d95dbeb9417999c82 (diff)
downloadrust-209b2be09fcaff937480d1fbbe8b31646e361c7a.tar.gz
rust-209b2be09fcaff937480d1fbbe8b31646e361c7a.zip
Auto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakis
ty/walk: iterate `GenericArg`s instead of `Ty`s.

Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it.

By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`.

I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs b/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs
index 49b3abc99b7..bc1e18b657f 100644
--- a/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs
+++ b/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs
@@ -8,8 +8,8 @@ extern crate coherence_lib as lib;
 use lib::*;
 
 #[fundamental]
-struct Local;
+struct Local<T>(T);
 
-impl Remote for Local {}
+impl Remote for Local<()> {}
 
 fn main() {}