]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/save-analysis/issue-63663.rs
save-analysis: Process bounds in impl trait only in argument position
[rust.git] / src / test / ui / save-analysis / issue-63663.rs
index ccbe13f1a1b719e35816aee0358f51ac42adda20..92e85884f664dbcc43f88023f439d802f08e6009 100644 (file)
@@ -1,15 +1,20 @@
 // check-pass
 // compile-flags: -Zsave-analysis
 
-// Check that this doesn't ICE when processing associated const in formal
-// argument and return type of functions defined inside function/method scope.
-
 pub trait Trait {
     type Assoc;
 }
 
 pub struct A;
 
+trait Generic<T> {}
+impl<T> Generic<T> for () {}
+
+// Don't ICE when resolving type paths in return type `impl Trait`
+fn assoc_in_opaque_type_bounds<U: Trait>() -> impl Generic<U::Assoc> {}
+
+// Check that this doesn't ICE when processing associated const in formal
+// argument and return type of functions defined inside function/method scope.
 pub fn func() {
     fn _inner1<U: Trait>(_: U::Assoc) {}
     fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }