From c9e44565a7c05c4325d8de85598fc4ecded70d58 Mon Sep 17 00:00:00 2001 From: Haibo Huang Date: Mon, 27 Jul 2020 09:15:10 -0700 Subject: Upgrade rust/crates/pin-project to 0.4.23 * Keep local change in src/lib.rs: // ANDROID: Use std to allow building as a dylib. Test: make Change-Id: I5d5a43c5ad9e42c7ecaeb163bc9a25da2ab233a4 --- .github/workflows/ci.yml | 3 +++ Android.bp | 2 +- CHANGELOG.md | 9 ++++++++- Cargo.toml | 4 ++-- Cargo.toml.orig | 4 ++-- METADATA | 4 ++-- ci.sh | 2 +- examples/enum-default-expanded.rs | 5 ++++- examples/project_replace-expanded.rs | 5 ++++- examples/struct-default-expanded.rs | 5 ++++- src/lib.rs | 6 ++---- tests/lint.rs | 23 +++++++++++++++++----- tests/lint.txt | 12 +++++++---- tests/sized.rs | 13 ++++++++++++ .../ui/pin_project/project_replace_unsized.stderr | 23 ++++++++-------------- .../project_replace_unsized_locals.stderr | 11 ----------- tests/ui/pinned_drop/self.stderr | 2 +- 17 files changed, 81 insertions(+), 52 deletions(-) create mode 100644 tests/sized.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c11a4ad..6cd7fae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,9 @@ jobs: - name: Install Rust run: | . ./ci/install-rust.sh + - name: Install rustfmt + run: | + . ./ci/install-component.sh rustfmt - name: Install cargo-expand run: | cargo install cargo-expand diff --git a/Android.bp b/Android.bp index c7fea1d..748477a 100644 --- a/Android.bp +++ b/Android.bp @@ -12,7 +12,7 @@ rust_library { } // dependent_library ["feature_list"] -// pin-project-internal-0.4.22 +// pin-project-internal-0.4.23 // proc-macro2-1.0.18 "default,proc-macro" // quote-1.0.7 "default,proc-macro" // syn-1.0.34 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut" diff --git a/CHANGELOG.md b/CHANGELOG.md index d40af34..6ad7438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] +## [0.4.23] - 2020-07-27 + +* [Fix compile error with `?Sized` type parameters.][262] + +[262]: https://github.com/taiki-e/pin-project/pull/262 + ## [0.4.22] - 2020-06-14 * Documentation improvements. @@ -547,7 +553,8 @@ See also [tracking issue for 0.4 release][21]. Initial release -[Unreleased]: https://github.com/taiki-e/pin-project/compare/v0.4.22...HEAD +[Unreleased]: https://github.com/taiki-e/pin-project/compare/v0.4.23...HEAD +[0.4.23]: https://github.com/taiki-e/pin-project/compare/v0.4.22...v0.4.23 [0.4.22]: https://github.com/taiki-e/pin-project/compare/v0.4.21...v0.4.22 [0.4.21]: https://github.com/taiki-e/pin-project/compare/v0.4.20...v0.4.21 [0.4.20]: https://github.com/taiki-e/pin-project/compare/v0.4.19...v0.4.20 diff --git a/Cargo.toml b/Cargo.toml index bca571c..997d6fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ [package] edition = "2018" name = "pin-project" -version = "0.4.22" +version = "0.4.23" authors = ["Taiki Endo "] description = "A crate for safe and ergonomic pin-projection.\n" homepage = "https://github.com/taiki-e/pin-project" @@ -26,5 +26,5 @@ repository = "https://github.com/taiki-e/pin-project" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies.pin-project-internal] -version = "=0.4.22" +version = "=0.4.23" default-features = false diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 86f4cab..1f3ae36 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "pin-project" -version = "0.4.22" +version = "0.4.23" authors = ["Taiki Endo "] edition = "2018" license = "Apache-2.0 OR MIT" @@ -29,5 +29,5 @@ members = [ ] [dependencies] -pin-project-internal = { version = "=0.4.22", path = "pin-project-internal", default-features = false } +pin-project-internal = { version = "=0.4.23", path = "pin-project-internal", default-features = false } diff --git a/METADATA b/METADATA index 50afc3f..f504890 100644 --- a/METADATA +++ b/METADATA @@ -9,11 +9,11 @@ third_party { type: GIT value: "https://github.com/taiki-e/pin-project" } - version: "0.4.22" + version: "0.4.23" license_type: NOTICE last_upgrade_date { year: 2020 month: 7 - day: 10 + day: 27 } } diff --git a/ci.sh b/ci.sh index 7f82c47..9c82699 100644 --- a/ci.sh +++ b/ci.sh @@ -15,7 +15,7 @@ echo "Running 'cargo clippy'" cargo +nightly clippy --all --all-features --all-targets echo "Running 'cargo test'" -cargo +nightly test --all --all-features --exclude expandtest +TRYBUILD=overwrite cargo +nightly test --all --all-features --exclude expandtest echo "Running 'cargo doc'" cargo +nightly doc --no-deps --all --all-features diff --git a/examples/enum-default-expanded.rs b/examples/enum-default-expanded.rs index 3e7cb3c..cea3ae5 100644 --- a/examples/enum-default-expanded.rs +++ b/examples/enum-default-expanded.rs @@ -84,7 +84,10 @@ const _: () = { // See ./struct-default-expanded.rs and https://github.com/taiki-e/pin-project/pull/53. // for details. struct __Enum<'pin, T, U> { - __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin<'pin, (T, U)>, + __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin< + 'pin, + (::pin_project::__private::PhantomData, ::pin_project::__private::PhantomData), + >, __field0: T, } impl<'pin, T, U> ::pin_project::__private::Unpin for Enum where diff --git a/examples/project_replace-expanded.rs b/examples/project_replace-expanded.rs index 661a0ac..16f47b7 100644 --- a/examples/project_replace-expanded.rs +++ b/examples/project_replace-expanded.rs @@ -127,7 +127,10 @@ const _: () = { // See ./struct-default-expanded.rs and https://github.com/taiki-e/pin-project/pull/53. // for details. struct __Struct<'pin, T, U> { - __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin<'pin, (T, U)>, + __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin< + 'pin, + (::pin_project::__private::PhantomData, ::pin_project::__private::PhantomData), + >, __field0: T, } impl<'pin, T, U> ::pin_project::__private::Unpin for Struct where diff --git a/examples/struct-default-expanded.rs b/examples/struct-default-expanded.rs index 53f00c9..ff160ce 100644 --- a/examples/struct-default-expanded.rs +++ b/examples/struct-default-expanded.rs @@ -107,7 +107,10 @@ const _: () = { // // See also https://github.com/taiki-e/pin-project/pull/53. struct __Struct<'pin, T, U> { - __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin<'pin, (T, U)>, + __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin< + 'pin, + (::pin_project::__private::PhantomData, ::pin_project::__private::PhantomData), + >, __field0: T, } impl<'pin, T, U> ::pin_project::__private::Unpin for Struct where diff --git a/src/lib.rs b/src/lib.rs index 1c4d453..61d90ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,7 +36,7 @@ //! [struct-default-expanded]: https://github.com/taiki-e/pin-project/blob/master/examples/struct-default-expanded.rs #![no_std] -#![doc(html_root_url = "https://docs.rs/pin-project/0.4.22")] +#![doc(html_root_url = "https://docs.rs/pin-project/0.4.23")] #![doc(test( no_crate_inject, attr(deny(warnings, rust_2018_idioms, single_use_lifetimes), allow(dead_code)) @@ -46,8 +46,6 @@ // mem::take and #[non_exhaustive] requires Rust 1.40 #![allow(clippy::mem_replace_with_default, clippy::manual_non_exhaustive)] #![allow(clippy::needless_doctest_main)] -// https://github.com/rust-lang/rust-clippy/issues/5704 -#![allow(clippy::unnested_or_patterns)] // ANDROID: Use std to allow building as a dylib. extern crate std; @@ -227,7 +225,7 @@ pub mod __private { #[doc(hidden)] pub struct AlwaysUnpin<'a, T: ?Sized>(PhantomData<&'a ()>, PhantomData); - impl Unpin for AlwaysUnpin<'_, T> {} + impl Unpin for AlwaysUnpin<'_, T> {} // This is an internal helper used to ensure a value is dropped. #[doc(hidden)] diff --git a/tests/lint.rs b/tests/lint.rs index 25cb649..e152930 100644 --- a/tests/lint.rs +++ b/tests/lint.rs @@ -1,13 +1,11 @@ #![warn(rust_2018_idioms, single_use_lifetimes)] #![warn(future_incompatible, nonstandard_style, rust_2018_compatibility, unused)] #![warn(clippy::all, clippy::pedantic, clippy::nursery)] - -#[allow(unknown_lints)] // for old compilers -#[warn( +#![allow(unknown_lints)] // for old compilers +#![warn( absolute_paths_not_starting_with_crate, anonymous_parameters, box_pointers, - confusable_idents, deprecated_in_future, elided_lifetimes_in_paths, explicit_outlives_requirements, @@ -38,6 +36,9 @@ // unused_crate_dependencies: unrelated // unsafe_code: checked in forbid_unsafe module // unsafe_block_in_unsafe_fn: unstable + +// Check interoperability with rustc and clippy lints. + pub mod basic { include!("include/basic.rs"); } @@ -51,17 +52,23 @@ pub mod forbid_unsafe { pub mod clippy { use pin_project::pin_project; + #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[pin_project(project_replace)] + #[derive(Debug)] pub struct MutMutStruct<'a, T, U> { #[pin] pub pinned: &'a mut T, pub unpinned: &'a mut U, } + #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[pin_project(project_replace)] + #[derive(Debug)] pub struct MutMutTupleStruct<'a, T, U>(#[pin] &'a mut T, &'a mut U); + #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[pin_project(project_replace)] + #[derive(Debug)] pub enum MutMutEnum<'a, T, U> { Struct { #[pin] @@ -73,6 +80,7 @@ pub mod clippy { } #[pin_project(project_replace)] + #[derive(Debug)] pub struct TypeRepetitionInBoundsStruct where Self: Sized, @@ -83,11 +91,13 @@ pub mod clippy { } #[pin_project(project_replace)] + #[derive(Debug)] pub struct TypeRepetitionInBoundsTupleStruct(#[pin] T, U) where Self: Sized; #[pin_project(project_replace)] + #[derive(Debug)] pub enum TypeRepetitionInBoundsEnum where Self: Sized, @@ -102,6 +112,7 @@ pub mod clippy { } #[pin_project(project_replace)] + #[derive(Debug)] pub struct UsedUnderscoreBindingStruct { #[pin] pub _pinned: T, @@ -109,6 +120,7 @@ pub mod clippy { } #[pin_project(project_replace)] + #[derive(Debug)] pub enum UsedUnderscoreBindingEnum { Struct { #[pin] @@ -118,7 +130,8 @@ pub mod clippy { } } -#[rustversion::attr(not(since(2020-06-12)), ignore)] +#[allow(box_pointers)] +#[rustversion::attr(not(nightly), ignore)] #[test] fn check_lint_list() { use std::{env, process::Command, str}; diff --git a/tests/lint.txt b/tests/lint.txt index 5110d4b..4205786 100644 --- a/tests/lint.txt +++ b/tests/lint.txt @@ -13,7 +13,6 @@ Lint checks provided by rustc: absolute-paths-not-starting-with-crate allow fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name anonymous-parameters allow detects anonymous parameters box-pointers allow use of owned (Box type) heap memory - confusable-idents allow detects visually confusable pairs between identifiers deprecated-in-future allow detects use of items that will be deprecated in a future version elided-lifetimes-in-paths allow hidden lifetime parameters in types are deprecated explicit-outlives-requirements allow outlives requirements can be inferred @@ -47,20 +46,25 @@ Lint checks provided by rustc: asm-sub-register warn using only a subset of a register for inline asm inputs bare-trait-objects warn suggest using `dyn Trait` for trait objects bindings-with-variant-name warn detects pattern bindings with the same name as one of the matched variants + cenum-impl-drop-cast warn a C-like enum implementing Drop is cast + clashing-extern-declarations warn detects when an extern fn has been declared with the same name but different types coherence-leak-check warn distinct impls distinguished only by the leak-check code + confusable-idents warn detects visually confusable pairs between identifiers dead-code warn detect unused, unexported items deprecated warn detects use of deprecated items ellipsis-inclusive-range-patterns warn `...` range patterns are deprecated exported-private-dependencies warn public interface leaks type from a private dependency illegal-floating-point-literal-pattern warn floating-point literals cannot be used in patterns improper-ctypes warn proper use of libc types in foreign modules + improper-ctypes-definitions warn proper use of libc types in foreign item definitions incomplete-features warn incomplete features that may function improperly in some or all cases inline-no-sanitize warn detects incompatible use of `#[inline(always)]` and `#[no_sanitize(...)]` intra-doc-link-resolution-failure warn failures in resolving intra-doc link targets - invalid-codeblock-attribute warn codeblock attribute looks a lot like a known one + invalid-codeblock-attributes warn codeblock attribute looks a lot like a known one invalid-value warn an invalid value is being created (such as a NULL reference) irrefutable-let-patterns warn detects irrefutable patterns in if-let and while-let statements late-bound-lifetime-arguments warn detects generic lifetime arguments in path segments with late bound lifetime parameters + mixed-script-confusables warn detects Unicode scripts whose mixed script confusables codepoints are solely used mutable-borrow-reservation-conflict warn reservation of a two-phased borrow conflicts with other shared borrows non-camel-case-types warn types, variants, traits and type parameters should have camel case names non-shorthand-field-patterns warn using `Struct { x: x }` instead of `Struct { x }` in a pattern @@ -128,11 +132,11 @@ Lint groups provided by rustc: name sub-lints ---- --------- warnings all lints that are set to issue warnings - future-incompatible keyword-idents, anonymous-parameters, illegal-floating-point-literal-pattern, private-in-public, pub-use-of-private-extern-crate, invalid-type-param-default, safe-packed-borrows, patterns-in-fns-without-body, missing-fragment-specifier, late-bound-lifetime-arguments, order-dependent-trait-objects, coherence-leak-check, tyvar-behind-raw-pointer, absolute-paths-not-starting-with-crate, unstable-name-collisions, where-clauses-object-safety, proc-macro-derive-resolution-fallback, macro-expanded-macro-exports-accessed-by-absolute-paths, ill-formed-attribute-input, conflicting-repr-hints, ambiguous-associated-items, mutable-borrow-reservation-conflict, indirect-structural-match, soft-unstable, array-into-iter + future-incompatible keyword-idents, anonymous-parameters, illegal-floating-point-literal-pattern, private-in-public, pub-use-of-private-extern-crate, invalid-type-param-default, safe-packed-borrows, patterns-in-fns-without-body, missing-fragment-specifier, late-bound-lifetime-arguments, order-dependent-trait-objects, coherence-leak-check, tyvar-behind-raw-pointer, absolute-paths-not-starting-with-crate, unstable-name-collisions, where-clauses-object-safety, proc-macro-derive-resolution-fallback, macro-expanded-macro-exports-accessed-by-absolute-paths, ill-formed-attribute-input, conflicting-repr-hints, ambiguous-associated-items, mutable-borrow-reservation-conflict, indirect-structural-match, soft-unstable, cenum-impl-drop-cast, array-into-iter nonstandard-style non-camel-case-types, non-snake-case, non-upper-case-globals rust-2018-compatibility keyword-idents, anonymous-parameters, tyvar-behind-raw-pointer, absolute-paths-not-starting-with-crate rust-2018-idioms bare-trait-objects, unused-extern-crates, ellipsis-inclusive-range-patterns, elided-lifetimes-in-paths, explicit-outlives-requirements - rustdoc intra-doc-link-resolution-failure, invalid-codeblock-attribute, missing-doc-code-examples, private-doc-tests + rustdoc intra-doc-link-resolution-failure, invalid-codeblock-attributes, missing-doc-code-examples, private-doc-tests unused unused-imports, unused-variables, unused-assignments, dead-code, unused-mut, unreachable-code, unreachable-patterns, overlapping-patterns, unused-must-use, unused-unsafe, path-statements, unused-attributes, unused-macros, unused-allocation, unused-doc-comments, unused-extern-crates, unused-features, unused-labels, unused-parens, unused-braces, redundant-semicolons diff --git a/tests/sized.rs b/tests/sized.rs new file mode 100644 index 0000000..9fd7e2b --- /dev/null +++ b/tests/sized.rs @@ -0,0 +1,13 @@ +#![warn(rust_2018_idioms, single_use_lifetimes)] +#![allow(dead_code)] + +use pin_project::pin_project; + +#[pin_project] +struct Foo<'a, I: ?Sized, Item> +where + I: Iterator, +{ + iter: &'a mut I, + item: Option, +} diff --git a/tests/ui/pin_project/project_replace_unsized.stderr b/tests/ui/pin_project/project_replace_unsized.stderr index c3a3be7..0395c4e 100644 --- a/tests/ui/pin_project/project_replace_unsized.stderr +++ b/tests/ui/pin_project/project_replace_unsized.stderr @@ -6,11 +6,12 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 4 | struct Struct { | - this type parameter needs to be `std::marker::Sized` | - = help: within `Struct`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: required because it appears within the type `Struct` - = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature +help: function arguments must have a statically known size, borrowed types always have a known size + | +3 | #[pin_project(&project_replace)] //~ ERROR E0277 + | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:5:5 @@ -19,9 +20,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | - this type parameter needs to be `std::marker::Sized` 5 | x: T, | ^ doesn't have a size known at compile-time - | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:3:1 @@ -31,8 +29,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 4 | struct Struct { | - this type parameter needs to be `std::marker::Sized` | - = help: within `__StructProjectionOwned`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: required because it appears within the type `__StructProjectionOwned` = note: structs must have a statically known size to be initialized = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -45,11 +41,12 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 9 | struct TupleStruct(T); | - this type parameter needs to be `std::marker::Sized` | - = help: within `TupleStruct`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: required because it appears within the type `TupleStruct` - = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature +help: function arguments must have a statically known size, borrowed types always have a known size + | +8 | #[pin_project(&project_replace)] //~ ERROR E0277 + | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:8:1 @@ -59,8 +56,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 9 | struct TupleStruct(T); | - this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time @@ -71,7 +66,5 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | | | doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/tests/ui/pin_project/project_replace_unsized_locals.stderr b/tests/ui/pin_project/project_replace_unsized_locals.stderr index 1616904..1266c4d 100644 --- a/tests/ui/pin_project/project_replace_unsized_locals.stderr +++ b/tests/ui/pin_project/project_replace_unsized_locals.stderr @@ -7,8 +7,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | | this type parameter needs to be `std::marker::Sized` | doesn't have a size known at compile-time | - = help: within `__StructProjectionOwned`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: required because it appears within the type `__StructProjectionOwned` = note: the return type of a function must have a statically known size @@ -19,9 +17,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | - this type parameter needs to be `std::marker::Sized` 7 | x: T, | ^ doesn't have a size known at compile-time - | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized_locals.rs:5:1 @@ -31,8 +26,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 6 | struct Struct { | - this type parameter needs to be `std::marker::Sized` | - = help: within `__StructProjectionOwned`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: required because it appears within the type `__StructProjectionOwned` = note: structs must have a statically known size to be initialized = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -46,8 +39,6 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim | | this type parameter needs to be `std::marker::Sized` | doesn't have a size known at compile-time | - = help: within `__TupleStructProjectionOwned`, the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: required because it appears within the type `__TupleStructProjectionOwned` = note: the return type of a function must have a statically known size @@ -59,6 +50,4 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim 11 | struct TupleStruct(T); | - this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `T` - = note: to learn more, visit = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pinned_drop/self.stderr b/tests/ui/pinned_drop/self.stderr index 2a71b0a..4ac0e63 100644 --- a/tests/ui/pinned_drop/self.stderr +++ b/tests/ui/pinned_drop/self.stderr @@ -31,7 +31,7 @@ error[E0423]: expected value, found struct `S` | |_____- `S` defined here ... 38 | let _: Self = Self; //~ ERROR E0423 - | ^^^^ did you mean `S { /* fields */ }`? + | ^^^^ help: use struct literal syntax instead: `S { x: val }` error[E0308]: mismatched types --> $DIR/self.rs:37:25 -- cgit v1.2.3