Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check no pointee attribute pos #128571

Closed

Conversation

gangov
Copy link

@gangov gangov commented Aug 2, 2024

takes on the example from #128552 and refactors it so we have correct usage of #[pointee]

@rustbot
Copy link
Collaborator

rustbot commented Aug 2, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 2, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-17 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:3aacb9c90579defe09351ac5e8ee504359f8054da6326ff19038f1b7c90e3cb2aafe33685c6d9b76ee8d2ccbd187ca80c46ab5380485abdd8c0ce7d69cd8d8fd:
------
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
- error: aborting due to 6 previous errors
+ error[E0635]: unknown feature `pointee`
+   --> $DIR/pointee.rs:1:12
+    |
+ LL | #![feature(pointee)]
+ 
+ error: aborting due to 7 previous errors
+ 
+ For more information about this error, try `rustc --explain E0635`.
---
To only update this specific test, also pass `--test-args attributes/pointee.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/attributes/pointee.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/attributes/pointee" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/attributes/pointee/auxiliary"
--- stderr -------------------------------
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:8:5
   |
   |
LL |       #[pointee] //~ ERROR attribute should be applied to a function definition
LL | /     {
LL | |         1
LL | |     };
   | |_____- not a function definition
   | |_____- not a function definition

error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:14:1
   |
LL | #[pointee] //~ ERROR attribute should be applied to a function definition
LL | type InvalidTy = ();
   | -------------------- not a function definition

error: attribute should be applied to a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:17:1
   |
LL | #[pointee] //~ ERROR attribute should be applied to a function definition
LL | mod invalid_module {}
   | --------------------- not a function definition

error: attribute should be applied to a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:21:13
   |
LL |     let _ = #[pointee] //~ ERROR attribute should be applied to a function definition
   |             ^^^^^^^^^^
LL |     (|| 1);

error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:25:1
   |
   |
LL | #[pointee] //~ ERROR attribute should be applied to a function definition
LL | struct F;
   | --------- not a function definition

error: attribute should be applied to a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:28:1
   |
LL |   #[pointee] //~ ERROR attribute should be applied to a function definition
LL | / impl F {
LL | / impl F {
LL | |     #[pointee]
LL | |     fn valid(&self) {}
   | |_- not a function definition

error[E0635]: unknown feature `pointee`
##[error]  --> /checkout/tests/ui/attributes/pointee.rs:1:12
---

---- [ui] tests/ui/deriving/deriving-smart-pointer-neg.rs stdout ----
diff of stderr:

44 LL | struct NoMaybeSized<'a, #[pointee] T> {
46 
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:22:20
+    |
+    |
+ LL | struct NoField<'a, #[pointee] T: ?Sized> {}
+    |                    ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:29:24
+    |
+    |
+ LL | struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
+    |                        ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:35:27
+    |
+    |
+ LL | struct NotTransparent<'a, #[pointee] T: ?Sized> {
+    |                           ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:41:25
+    |
+    |
+ LL | struct NoMaybeSized<'a, #[pointee] T> {
+    |                         ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:49:40
+    |
+    |
+ LL | struct ThisIsAPossibleSmartPointer<'a, #[pointee] T: ?Sized> {
+    |                                        ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:56:21
+    |
+    |
+ LL | struct StdSized<'a, #[pointee] T: ?std::marker::Sized> {
+    |                     ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:61:22
+    |
+    |
+ LL | struct CoreSized<'a, #[pointee] T: ?core::marker::Sized> {
+    |                      ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:66:27
+    |
+    |
+ LL | struct GlobalStdSized<'a, #[pointee] T: ?::std::marker::Sized> {
+    |                           ^^^^^^^^^^ - not a function definition
+ error: attribute should be applied to a function definition
+   --> $DIR/deriving-smart-pointer-neg.rs:71:28
+    |
+    |
+ LL | struct GlobalCoreSized<'a, #[pointee] T: ?::core::marker::Sized> {
+    |                            ^^^^^^^^^^ - not a function definition
+ 
47 error[E0392]: lifetime parameter `'a` is never used
49    |

76    |
76    |
77    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
- error: aborting due to 10 previous errors
+ error: aborting due to 19 previous errors
80 
81 For more information about this error, try `rustc --explain E0392`.
---
To only update this specific test, also pass `--test-args deriving/deriving-smart-pointer-neg.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/deriving-smart-pointer-neg" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/deriving-smart-pointer-neg/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error: `SmartPointer` can only be derived on `struct`s with `#[repr(transparent)]`
   |
LL | #[derive(SmartPointer)]
   |          ^^^^^^^^^^^^
   |
   |
   = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)

error: At least one generic type should be designated as `#[pointee]` in order to derive `SmartPointer` traits
   |
LL | #[derive(SmartPointer)]
   |          ^^^^^^^^^^^^
   |
   |
   = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `SmartPointer` can only be derived on `struct`s with at least one field
   |
LL | #[derive(SmartPointer)]
   |          ^^^^^^^^^^^^
   |
   |
   = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `SmartPointer` can only be derived on `struct`s with at least one field
   |
LL | #[derive(SmartPointer)]
   |          ^^^^^^^^^^^^
   |
   |
   = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `SmartPointer` can only be derived on `struct`s with `#[repr(transparent)]`
   |
LL | #[derive(SmartPointer)]
   |          ^^^^^^^^^^^^
   |
   |
   = note: this error originates in the derive macro `SmartPointer` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `derive(SmartPointer)` requires T to be marked `?Sized`
   |
   |
LL | struct NoMaybeSized<'a, #[pointee] T> {

error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:22:20
   |
   |
LL | struct NoField<'a, #[pointee] T: ?Sized> {}
   |                    ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:29:24
   |
   |
LL | struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
   |                        ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:35:27
   |
   |
LL | struct NotTransparent<'a, #[pointee] T: ?Sized> {
   |                           ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:41:25
   |
   |
LL | struct NoMaybeSized<'a, #[pointee] T> {
   |                         ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:49:40
   |
   |
LL | struct ThisIsAPossibleSmartPointer<'a, #[pointee] T: ?Sized> {
   |                                        ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:56:21
   |
   |
LL | struct StdSized<'a, #[pointee] T: ?std::marker::Sized> {
   |                     ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:61:22
   |
   |
LL | struct CoreSized<'a, #[pointee] T: ?core::marker::Sized> {
   |                      ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:66:27
   |
   |
LL | struct GlobalStdSized<'a, #[pointee] T: ?::std::marker::Sized> {
   |                           ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:71:28
   |
   |
LL | struct GlobalCoreSized<'a, #[pointee] T: ?::core::marker::Sized> {
   |                            ^^^^^^^^^^ - not a function definition

error[E0392]: lifetime parameter `'a` is never used
   |
   |
LL | struct NoField<'a, #[pointee] T: ?Sized> {}
   |                ^^ unused lifetime parameter
   |
   = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
error[E0392]: type parameter `T` is never used
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:22:31
   |
   |
LL | struct NoField<'a, #[pointee] T: ?Sized> {}
   |                               ^ unused type parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: lifetime parameter `'a` is never used
   |
   |
LL | struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
   |                    ^^ unused lifetime parameter
   |
   = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
error[E0392]: type parameter `T` is never used
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer-neg.rs:29:35
   |
   |
LL | struct NoFieldUnit<'a, #[pointee] T: ?Sized>();
   |                                   ^ unused type parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
error: aborting due to 19 previous errors

For more information about this error, try `rustc --explain E0392`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/deriving/deriving-smart-pointer.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/deriving/deriving-smart-pointer.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/deriving-smart-pointer/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/deriving-smart-pointer/auxiliary"
--- stderr -------------------------------
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/deriving-smart-pointer.rs:8:22
   |
   |
LL | struct MyPointer<'a, #[pointee] T: ?Sized> {
   |                      ^^^^^^^^^^ - not a function definition
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/deriving/smart-pointer-bounds-issue-127647.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/smart-pointer-bounds-issue-127647" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/deriving/smart-pointer-bounds-issue-127647/auxiliary"
--- stderr -------------------------------
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:7:20
   |
   |
LL | pub struct Ptr<'a, #[pointee] T: OnDrop + ?Sized, X> {
   |                    ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:18:21
   |
   |
LL | pub struct Ptr2<'a, #[pointee] T: ?Sized, X>
   |                     ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:30:21
   |
   |
LL | pub struct Ptr3<'a, #[pointee] T: ?Sized, X>
   |                     ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:40:21
   |
   |
LL | pub struct Ptr4<'a, #[pointee] T: MyTrait<T> + ?Sized, X> {
   |                     ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:47:21
   |
   |
LL | pub struct Ptr5<'a, #[pointee] T: ?Sized, X>
   |                     ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:61:21
   |
   |
LL | pub struct Ptr6<'a, #[pointee] T: ?Sized, X: MyTrait<T> = (), const PARAM: usize = 0> {
   |                     ^^^^^^^^^^ - not a function definition
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/deriving/smart-pointer-bounds-issue-127647.rs:69:20
   |
   |
LL | pub struct ListArc<#[pointee] T, const ID: u64 = 0>
   |                    ^^^^^^^^^^ - not a function definition
error: aborting due to 7 previous errors
------------------------------------------



---- [ui] tests/ui/feature-gates/feature-gate-derive-smart-pointer.rs stdout ----
diff of stderr:

18    = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
19    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+ error: attribute should be applied to a function definition
+   --> $DIR/feature-gate-derive-smart-pointer.rs:5:22
+    |
+    |
+ LL | struct MyPointer<'a, #[pointee] T: ?Sized> {
+    |                      ^^^^^^^^^^ - not a function definition
21 error[E0658]: use of unstable library feature 'derive_smart_pointer'
22   --> $DIR/feature-gate-derive-smart-pointer.rs:1:5
23    |


28    = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
29    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
- error: aborting due to 3 previous errors
+ error: aborting due to 4 previous errors
32 
33 For more information about this error, try `rustc --explain E0658`.
---
To only update this specific test, also pass `--test-args feature-gates/feature-gate-derive-smart-pointer.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/feature-gates/feature-gate-derive-smart-pointer.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-derive-smart-pointer" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-derive-smart-pointer/auxiliary"
--- stderr -------------------------------
error[E0658]: use of unstable library feature 'derive_smart_pointer'
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-derive-smart-pointer.rs:3:10
   |
   |
LL | #[derive(SmartPointer)] //~ ERROR use of unstable library feature 'derive_smart_pointer'
   |
   = note: see issue #123430 <https://github.com/rust-lang/rust/issues/123430> for more information
   = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
   = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the `#[pointee]` attribute is an experimental feature
   |
   |
LL | struct MyPointer<'a, #[pointee] T: ?Sized> {
   |
   = note: see issue #123430 <https://github.com/rust-lang/rust/issues/123430> for more information
   = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
   = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: attribute should be applied to a function definition
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-derive-smart-pointer.rs:5:22
   |
   |
LL | struct MyPointer<'a, #[pointee] T: ?Sized> {
   |                      ^^^^^^^^^^ - not a function definition
error[E0658]: use of unstable library feature 'derive_smart_pointer'
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-derive-smart-pointer.rs:1:5
   |
   |
LL | use std::marker::SmartPointer; //~ ERROR use of unstable library feature 'derive_smart_pointer'
   |
   = note: see issue #123430 <https://github.com/rust-lang/rust/issues/123430> for more information
   = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
   = help: add `#![feature(derive_smart_pointer)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

@bors
Copy link
Contributor

bors commented Aug 5, 2024

☔ The latest upstream changes (presumably #128672) made this pull request unmergeable. Please resolve the merge conflicts.

@Darksonn
Copy link
Contributor

Darksonn commented Aug 6, 2024

@rustbot label F-derive_smart_pointer

@rustbot rustbot added the F-derive_smart_pointer `#![feature(derive_smart_pointer)]` label Aug 6, 2024
@Darksonn
Copy link
Contributor

Darksonn commented Aug 6, 2024

Possible duplicate of #128721.

@gangov
Copy link
Author

gangov commented Aug 6, 2024

duplicate, closing

@gangov gangov closed this Aug 6, 2024
@gangov gangov deleted the check-no-pointee-attribute-pos branch August 6, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-derive_smart_pointer `#![feature(derive_smart_pointer)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants