rust/src/test/ui/privacy
Michael Hewson 153f5a7892 Stabilize Rc, Arc and Pin as method receivers
This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use.

This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled.

This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.
2018-12-20 01:14:01 -05:00
..
auxiliary Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
restricted resolve: Prohibit relative paths in visibilities on 2018 edition 2018-11-25 16:40:03 +03:00
associated-item-privacy-inherent.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
associated-item-privacy-inherent.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
associated-item-privacy-trait.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
associated-item-privacy-trait.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
associated-item-privacy-type-binding.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
associated-item-privacy-type-binding.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
decl-macro.rs resolve: Check resolution consistency for import paths and multi-segment macro paths 2018-11-18 13:55:58 +03:00
decl-macro.stderr resolve: Check resolution consistency for import paths and multi-segment macro paths 2018-11-18 13:55:58 +03:00
legacy-ctor-visibility.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
legacy-ctor-visibility.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-in-paths.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-in-paths.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
privacy-ns1.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-ns1.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-ns2.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-ns2.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
privacy-sanity.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-sanity.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-ufcs.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy-ufcs.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
privacy1.rs Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
privacy1.stderr Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
privacy2.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy2.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
privacy3.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy3.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy4.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy4.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
privacy5.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
privacy5.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
private-impl-method.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-impl-method.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-assoc-ty.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-assoc-ty.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-ill-formed.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-ill-formed.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-lint.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-lint.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-warn.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public-warn.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-in-public.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-inferred-type-1.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-inferred-type-1.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-inferred-type-2.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-inferred-type-2.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-inferred-type-3.rs Update tests 2018-10-26 17:27:22 +02:00
private-inferred-type-3.stderr Update tests 2018-10-26 17:27:22 +02:00
private-inferred-type.rs Update tests 2018-10-26 17:27:22 +02:00
private-inferred-type.stderr Update tests 2018-10-26 17:27:22 +02:00
private-item-simple.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-item-simple.stderr resolve: More precise spans for privacy errors 2018-10-28 02:56:12 +03:00
private-method-cross-crate.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-method-cross-crate.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-method-inherited.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-method-inherited.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-method.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-method.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field-cross-crate.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field-cross-crate.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field-ctor.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field-ctor.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field-pattern.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field-pattern.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-struct-field.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-type-in-interface.rs Nest the impl Trait existential item inside the return type 2018-10-02 10:54:34 +02:00
private-type-in-interface.stderr Nest the impl Trait existential item inside the return type 2018-10-02 10:54:34 +02:00
private-variant-reexport.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
private-variant-reexport.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
union-field-privacy-1.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
union-field-privacy-1.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
union-field-privacy-2.rs Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
union-field-privacy-2.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00