diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/coverage/unused_mod.cov-map | 8 | ||||
| -rw-r--r-- | tests/ui/bootstrap/self-test/a.rs | 2 | ||||
| -rw-r--r-- | tests/ui/bootstrap/self-test/b.rs | 2 | ||||
| -rw-r--r-- | tests/ui/impl-trait/rpit/inherits-lifetime.rs | 24 |
4 files changed, 32 insertions, 4 deletions
diff --git a/tests/coverage/unused_mod.cov-map b/tests/coverage/unused_mod.cov-map index af10906fa3c..5e8b69fcdba 100644 --- a/tests/coverage/unused_mod.cov-map +++ b/tests/coverage/unused_mod.cov-map @@ -1,16 +1,16 @@ Function name: unused_mod::main -Raw bytes (9): 0x[01, 02, 00, 01, 01, 04, 01, 02, 02] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 01, 02, 02] Number of files: 1 -- file 0 => global file 2 +- file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 4, 1) to (start + 2, 2) Highest counter ID seen: c0 Function name: unused_mod::unused_module::never_called_function (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 00, 02, 01, 02, 02] +Raw bytes (9): 0x[01, 02, 00, 01, 00, 02, 01, 02, 02] Number of files: 1 -- file 0 => global file 1 +- file 0 => global file 2 Number of expressions: 0 Number of file 0 mappings: 1 - Code(Zero) at (prev + 2, 1) to (start + 2, 2) diff --git a/tests/ui/bootstrap/self-test/a.rs b/tests/ui/bootstrap/self-test/a.rs new file mode 100644 index 00000000000..64d2d6f11bb --- /dev/null +++ b/tests/ui/bootstrap/self-test/a.rs @@ -0,0 +1,2 @@ +//! Not used by compiler, this is used by bootstrap cli self-test. +//@ ignore-test diff --git a/tests/ui/bootstrap/self-test/b.rs b/tests/ui/bootstrap/self-test/b.rs new file mode 100644 index 00000000000..91f92f67910 --- /dev/null +++ b/tests/ui/bootstrap/self-test/b.rs @@ -0,0 +1,2 @@ +//! Not used by compiler, used by bootstrap cli self-test. +//@ ignore-test diff --git a/tests/ui/impl-trait/rpit/inherits-lifetime.rs b/tests/ui/impl-trait/rpit/inherits-lifetime.rs new file mode 100644 index 00000000000..60c2a96c873 --- /dev/null +++ b/tests/ui/impl-trait/rpit/inherits-lifetime.rs @@ -0,0 +1,24 @@ +//! Check that lifetimes are inherited in RPIT. +//! Previously, the hidden lifetime of T::Bar would be overlooked +//! and would instead end up as <T as Foo<'static>>::Bar. +//! +//! Regression test for <https://github.com/rust-lang/rust/issues/51525>. + +//@ check-pass + +trait Foo<'a> { + type Bar; +} + +impl<'a> Foo<'a> for u32 { + type Bar = &'a (); +} + +fn baz<'a, T>() -> impl IntoIterator<Item = T::Bar> +where + T: Foo<'a>, +{ + None +} + +fn main() {} |
