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

Rollup of 10 pull requests #119602

Closed
wants to merge 32 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fmease and others added 30 commits December 28, 2023 00:43
Add `E0796` error code.
Add `static_mut_ref` lint.

This is the idea for the 2024 edition.
It's not used within the repository in any way (e.g. in tests), and
doesn't seem useful.
It appears it was intended to be tier 3, but was accidentally added to
tier 2.
No functional changes - all checks have been emitted conditionally on
block being rechable already.
Reevaluate `body.should_skip()` after updating the MIR phase to ensure
that injected MIR is processed correctly.

Update a few custom MIR tests that were ill-formed for the injected
phase.
The check attempts to identify potential undefined behaviour, rather
than whether MIR is well-formed. It belongs in the lint not validator.
… r=matthewjasper

Avoid silencing relevant follow-up errors

r? ``@matthewjasper``

This PR only adds new errors to tests that are already failing and fixes one ICE.

Several tests were changed to not emit new errors. I believe all of them were faulty tests, and not explicitly testing for the code that had new errors.
…twco

Disallow reference to `static mut` and adding `static_mut_ref` lint

Closes rust-lang#114447

r? `@scottmcm`
…mpiler-errors

Make `negative_bounds` internal & fix some of its issues

r? compiler-errors
…bject-safety-error, r=Nilstrieb

Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error`

Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors.

Fixes rust-lang#119346
Fixes rust-lang#119502
…em,Nilstrieb

Remove `-Zdump-mir-spanview`

The `-Zdump-mir-spanview` flag was added back in rust-lang#76074, as a development/debugging aid for the initial work on what would eventually become `-Cinstrument-coverage`. It causes the compiler to emit an HTML file containing a function's source code, with various spans highlighted based on the contents of MIR.

When the suggestion was made to [triage and remove unnecessary `-Z` flags (Zulip)](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60-Z.60.20option.20triage), I noted that this flag could potentially be worth removing, but I wanted to keep it around to see whether I found it useful for my own coverage work.

But when I actually tried to use it, I ran into various issues (e.g. it crashes on `tests/coverage/closure.rs`). If I can't trust it to work properly without a full overhaul, then instead of diving down a rabbit hole of trying to fix arcane span-handling bugs, it seems better to just remove this obscure old code entirely.

---

`@rustbot` label +A-code-coverage
…s, r=oli-obk

Remove `-Zreport-delayed-bugs`.

It's not used within the repository in any way (e.g. in tests), and doesn't seem useful.

It was added in rust-lang#52568.

r? `@oli-obk`
Migrate memory overlap check from validator to lint

The check attempts to identify potential undefined behaviour, rather
than whether MIR is well-formed. It belongs in the lint not validator.

Follow up to changes from rust-lang#119077.
…methods, r=notriddle

[rustdoc] Fix invalid handling for static method calls in jump to definition feature

I realized when working on a clippy lint that static method calls on `Self` could not give me the method `Res`. For that, we need to use `typeck` and so that's what I did in here.

It fixes the linking to static method calls.

r? `@notriddle`
…trieb

Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table

It appears it was intended to be tier 3, but was accidentally added to tier 2. Based on inspecting the PR adding it the table rust-lang#117170 and the fact that it is not built in CI which is one of the tier 2 requirements.

cc `@he32`

r? `@Nilstrieb`
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 5, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jan 5, 2024

📌 Commit cbe63d0 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 5, 2024
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7cd4811f-7393-416a-82b5-f068653d2f57
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rollup-lfwsvai
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7cd4811f-7393-416a-82b5-f068653d2f57
GITHUB_REF=refs/pull/119602/merge
GITHUB_REF_NAME=119602/merge
GITHUB_REF_PROTECTED=false
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
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-16]
##[group]Clock drift check
  local time: Fri Jan  5 05:09:55 UTC 2024
  network time: Fri, 05 Jan 2024 05:09:55 GMT
  network time: Fri, 05 Jan 2024 05:09:55 GMT
##[endgroup]
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-16', '--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', '--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-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
---- [ui] tests/ui/associated-type-bounds/duplicate.rs stdout ----
diff of stderr:

538    |                      |
539    |                      `Item` bound here first
+ error[E0282]: type annotations needed
+   --> $DIR/duplicate.rs:136:5
+    |
+ LL |     iter::empty()
+ LL |     iter::empty()
+    |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+ help: consider specifying the generic argument
+    |
+ LL |     iter::empty::<T>()
+    |                +++++
+    |                +++++
+ 
+ error[E0282]: type annotations needed
+   --> $DIR/duplicate.rs:141:5
+    |
+ LL |     iter::empty()
+    |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+ help: consider specifying the generic argument
+    |
+ LL |     iter::empty::<T>()
+    |                +++++
+    |                +++++
+ 
+ error[E0282]: type annotations needed
+   --> $DIR/duplicate.rs:146:5
+    |
+ LL |     iter::empty()
+    |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
+ help: consider specifying the generic argument
+    |
+ LL |     iter::empty::<T>()
+    |                +++++
+    |                +++++
+ 
541 error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
542   --> $DIR/duplicate.rs:197:34
543    |

631    |
632 LL | trait TRA2 where <<Self as TRA2>::A as Iterator>::Item: Copy {
- 
- error[E0282]: type annotations needed
-   --> $DIR/duplicate.rs:136:5
-    |
-    |
- LL |     iter::empty()
-    |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
- help: consider specifying the generic argument
-    |
- LL |     iter::empty::<T>()
-    |                +++++
-    |                +++++
- 
- error[E0282]: type annotations needed
-   --> $DIR/duplicate.rs:141:5
-    |
- LL |     iter::empty()
-    |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
- help: consider specifying the generic argument
-    |
- LL |     iter::empty::<T>()
-    |                +++++
-    |                +++++
- 
- error[E0282]: type annotations needed
-   --> $DIR/duplicate.rs:146:5
-    |
- LL |     iter::empty()
-    |     ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty`
- help: consider specifying the generic argument
-    |
- LL |     iter::empty::<T>()
-    |                +++++
---
--- stderr -------------------------------
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:7:36
   |
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
   |                        ----------  ^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:11:36
   |
   |
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
   |                        ----------  ^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:15:39
   |
   |
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
   |                        -------------  ^^^^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:21:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Send>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:28:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Copy>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:35:32
   |
   |
LL |     T: Iterator<Item: 'static, Item: 'static>,
   |                 -------------  ^^^^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:41:34
   |
   |
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
   |                      ----------  ^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:45:34
   |
   |
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
   |                      ----------  ^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:49:37
   |
   |
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
   |                      -------------  ^^^^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:55:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Send>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:62:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Copy>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:69:32
   |
   |
LL |     T: Iterator<Item: 'static, Item: 'static>,
   |                 -------------  ^^^^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:75:35
   |
   |
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
   |                       ----------  ^^^^^^^^^^ re-bound here
   |                       |
   |                       `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:79:35
   |
   |
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
   |                       ----------  ^^^^^^^^^^ re-bound here
   |                       |
   |                       `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:83:38
   |
   |
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
   |                       -------------  ^^^^^^^^^^^^^ re-bound here
   |                       |
   |                       `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:89:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Send>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:96:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Copy>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:103:32
   |
   |
LL |     T: Iterator<Item: 'static, Item: 'static>,
   |                 -------------  ^^^^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:109:32
   |
   |
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
   |                    ----------  ^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:111:32
   |
   |
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
   |                    ----------  ^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:113:35
   |
   |
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
   |                    -------------  ^^^^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:117:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Send>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:123:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Copy>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:129:32
   |
   |
LL |     T: Iterator<Item: 'static, Item: 'static>,
   |                 -------------  ^^^^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:134:42
   |
   |
LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
   |                              ----------  ^^^^^^^^^^ re-bound here
   |                              |
   |                              `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:139:42
   |
   |
LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
   |                              ----------  ^^^^^^^^^^ re-bound here
   |                              |
   |                              `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:144:45
   |
   |
LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
   |                              -------------  ^^^^^^^^^^^^^ re-bound here
   |                              |
   |                              `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:149:40
   |
   |
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
   |                            ----------  ^^^^^^^^^^ re-bound here
   |                            |
   |                            `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:151:40
   |
   |
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
   |                            ----------  ^^^^^^^^^^ re-bound here
   |                            |
   |                            `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:153:43
   |
   |
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
   |                            -------------  ^^^^^^^^^^^^^ re-bound here
   |                            |
   |                            `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:156:35
   |
   |
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
   |                       ----------  ^^^^^^^^^^ re-bound here
   |                       |
   |                       `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:158:35
   |
   |
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
   |                       ----------  ^^^^^^^^^^ re-bound here
   |                       |
   |                       `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:160:38
   |
   |
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
   |                       -------------  ^^^^^^^^^^^^^ re-bound here
   |                       |
   |                       `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:164:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Send>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:169:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Copy>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:174:32
   |
   |
LL |     T: Iterator<Item: 'static, Item: 'static>,
   |                 -------------  ^^^^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:178:36
   |
   |
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
   |                        ----------  ^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:180:36
   |
   |
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
   |                        ----------  ^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:182:39
   |
   |
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
   |                        -------------  ^^^^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:184:40
   |
   |
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
   |                            ----------  ^^^^^^^^^^ re-bound here
   |                            |
   |                            `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:186:40
   |
   |
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
   |                            ----------  ^^^^^^^^^^ re-bound here
Build completed unsuccessfully in 0:13:13
Build completed unsuccessfully in 0:13:13
   |                            `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:188:43
   |
   |
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
   |                            -------------  ^^^^^^^^^^^^^ re-bound here
   |                            |
   |                            `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:191:36
   |
   |
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
   |                        ----------  ^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:193:36
   |
   |
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
   |                        ----------  ^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:195:39
   |
   |
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
   |                        -------------  ^^^^^^^^^^^^^ re-bound here
   |                        |
   |                        `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:197:34
   |
   |
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
   |                      ----------  ^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:197:34
   |
   |
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
   |                      ----------  ^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:201:34
   |
   |
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
   |                      ----------  ^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:201:34
   |
   |
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
   |                      ----------  ^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:205:37
   |
   |
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
   |                      -------------  ^^^^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:205:37
   |
   |
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
   |                      -------------  ^^^^^^^^^^^^^ re-bound here
   |                      |
   |                      `Item` bound here first
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:211:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Send>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:217:29
   |
   |
LL |     T: Iterator<Item: Copy, Item: Copy>,
   |                 ----------  ^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:223:32
   |
   |
LL |     T: Iterator<Item: 'static, Item: 'static>,
   |                 -------------  ^^^^^^^^^^^^^ re-bound here
   |                 |
   |                 `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:229:32
   |
LL |     Self: Iterator<Item: Copy, Item: Send>,
LL |     Self: Iterator<Item: Copy, Item: Send>,
   |                    ----------  ^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:229:32
   |
LL |     Self: Iterator<Item: Copy, Item: Send>,
LL |     Self: Iterator<Item: Copy, Item: Send>,
   |                    ----------  ^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:237:32
   |
LL |     Self: Iterator<Item: Copy, Item: Copy>,
LL |     Self: Iterator<Item: Copy, Item: Copy>,
   |                    ----------  ^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:237:32
   |
LL |     Self: Iterator<Item: Copy, Item: Copy>,
LL |     Self: Iterator<Item: Copy, Item: Copy>,
   |                    ----------  ^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:245:35
   |
LL |     Self: Iterator<Item: 'static, Item: 'static>,
LL |     Self: Iterator<Item: 'static, Item: 'static>,
   |                    -------------  ^^^^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:245:35
   |
LL |     Self: Iterator<Item: 'static, Item: 'static>,
LL |     Self: Iterator<Item: 'static, Item: 'static>,
   |                    -------------  ^^^^^^^^^^^^^ re-bound here
   |                    |
   |                    `Item` bound here first
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
##[error]  --> /checkout/tests/ui/associated-type-bounds/duplicate.rs:267:40
   |
   |
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
   |                            ----------  ^^^^^^^^^^ re-bound here
   |                            |
---

116 note: required by a bound in `Fn`
117   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
118 
- error[E0277]: expected a `FnOnce()` closure, found `Bar`
-    |
-    |
- LL | impl FnMut<()> for Bar {
-    |                    ^^^ expected an `FnOnce()` closure, found `Bar`
-    = help: the trait `FnOnce<()>` is not implemented for `Bar`
-    = help: the trait `FnOnce<()>` is not implemented for `Bar`
-    = note: wrap the `Bar` in a closure with no arguments: `|| { /* code */ }`
- note: required by a bound in `FnMut`
-   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
130 error[E0053]: method `call` has an incompatible type for trait
131   --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:32
132    |


146    | ^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation
147    |
148    = help: implement the missing item: `type Output = /* Type */;`
+ 
+ error[E0277]: expected a `FnOnce()` closure, found `Bar`
+    |
+    |
+ LL | impl FnMut<()> for Bar {
+    |                    ^^^ expected an `FnOnce()` closure, found `Bar`
+    = help: the trait `FnOnce<()>` is not implemented for `Bar`
+    = help: the trait `FnOnce<()>` is not implemented for `Bar`
+    = note: wrap the `Bar` in a closure with no arguments: `|| { /* code */ }`
+ note: required by a bound in `FnMut`
+   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
150 error[E0053]: method `call_mut` has an incompatible type for trait
151   --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:36


---
--- stderr -------------------------------
error[E0658]: rust-call ABI is subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:13:12
   |
LL |     extern "rust-call" fn call(self, args: ()) -> () {}
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0658]: rust-call ABI is subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:22:12
   |
LL |     extern "rust-call" fn call_once(self, args: ()) -> () {}
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0658]: rust-call ABI is subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:30:12
   |
LL |     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0658]: rust-call ABI is subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:39:12
   |
LL |     extern "rust-call" fn call_once(&self, args: ()) -> () {}
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
   |
   |
LL | impl Fn<()> for Foo {
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0183]: manual implementations of `Fn` are experimental
   |
   |
LL | impl Fn<()> for Foo {
   |      ^^^^^^ manual implementations of `Fn` are experimental
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0183]: manual implementations of `FnOnce` are experimental
   |
LL | impl FnOnce() for Foo1 {
LL | impl FnOnce() for Foo1 {
   |      ^^^^^^^^ manual implementations of `FnOnce` are experimental
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable

error[E0229]: associated type bindings are not allowed here
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:18:6
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:18:6
   |
LL | impl FnOnce() for Foo1 {
   |      ^^^^^^^^ associated type not allowed here
   |
help: parenthesized trait syntax expands to `FnOnce<(), Output=()>`
   |
LL | impl FnOnce() for Foo1 {
   |      ^^^^^^^^


error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
   |
   |
LL | impl FnMut<()> for Bar {
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0183]: manual implementations of `FnMut` are experimental
   |
   |
LL | impl FnMut<()> for Bar {
   |      ^^^^^^^^^ manual implementations of `FnMut` are experimental
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
   |
LL | impl FnOnce<()> for Baz {
   |      ^^^^^^^^^^
   |
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable

error[E0183]: manual implementations of `FnOnce` are experimental
   |
LL | impl FnOnce<()> for Baz {
LL | impl FnOnce<()> for Baz {
   |      ^^^^^^^^^^ manual implementations of `FnOnce` are experimental
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable


error[E0277]: expected a `FnMut()` closure, found `Foo`
   |
   |
LL | impl Fn<()> for Foo {
   |                 ^^^ expected an `FnMut()` closure, found `Foo`
   |
   = help: the trait `FnMut<()>` is not implemented for `Foo`
   = note: wrap the `Foo` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `Fn`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/function.rs:76:1
error[E0053]: method `call` has an incompatible type for trait
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:13:32
   |
   |
LL |     extern "rust-call" fn call(self, args: ()) -> () {}
   |                                |
   |                                |
   |                                expected `&Foo`, found `Foo`
   |                                help: change the self-receiver type to match the trait: `&self`
   |
   = note: expected signature `extern "rust-call" fn(&Foo, ()) -> _`
              found signature `extern "rust-call" fn(Foo, ())`
error[E0046]: not all trait items implemented, missing: `Output`
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:18:1
   |
LL | impl FnOnce() for Foo1 {
LL | impl FnOnce() for Foo1 {
   | ^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation
   |
   = help: implement the missing item: `type Output = /* Type */;`

error[E0277]: expected a `FnOnce()` closure, found `Bar`
   |
   |
LL | impl FnMut<()> for Bar {
   |                    ^^^ expected an `FnOnce()` closure, found `Bar`
   = help: the trait `FnOnce<()>` is not implemented for `Bar`
   = help: the trait `FnOnce<()>` is not implemented for `Bar`
   = note: wrap the `Bar` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `FnMut`
  --> /rustc/FAKE_PREFIX/library/core/src/ops/function.rs:163:1
error[E0053]: method `call_mut` has an incompatible type for trait
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:30:36
   |
   |
LL |     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
   |                                    |
   |                                    types differ in mutability
   |                                    help: change the self-receiver type to match the trait: `&mut self`
   |
   |
   = note: expected signature `extern "rust-call" fn(&mut Bar, ()) -> _`
              found signature `extern "rust-call" fn(&Bar, ())`
error[E0046]: not all trait items implemented, missing: `Output`
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.rs:35:1
   |
LL | impl FnOnce<()> for Baz {
LL | impl FnOnce<()> for Baz {
   | ^^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation
   |
   = help: implement the missing item: `type Output = /* Type */;`
error: aborting due to 18 previous errors

Some errors have detailed explanations: E0046, E0053, E0183, E0229, E0277, E0658.
For more information about an error, try `rustc --explain E0046`.
For more information about an error, try `rustc --explain E0046`.
------------------------------------------


---- [ui] tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs stdout ----
diff of stderr:

- error[E0038]: the trait `MyTrait` cannot be made into an object
-   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:16:6
-    |
- LL | impl dyn MyTrait {
-    |      ^^^^^^^^^^^ `MyTrait` cannot be made into an object
- note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
-    |
-    |
- LL | trait MyTrait {
-    |       ------- this trait cannot be made into an object...
- LL |     fn foo(&self) -> impl Marker;
-    |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
-    = help: consider moving `foo` to another trait
-    = help: only type `Outer` implements the trait, consider using it directly instead
- 
- error[E0038]: the trait `MyTrait` cannot be made into an object
-   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:18:15
- LL |     fn other(&self) -> impl Marker {
- LL |     fn other(&self) -> impl Marker {
-    |               ^^^^ `MyTrait` cannot be made into an object
- note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
-    |
-    |
- LL | trait MyTrait {
-    |       ------- this trait cannot be made into an object...
- LL |     fn foo(&self) -> impl Marker;
-    |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
-    = help: consider moving `foo` to another trait
-    = help: only type `Outer` implements the trait, consider using it directly instead
- 
33 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
34   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:22


71    |         ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
72    |
73    = help: the trait `MyTrait` is implemented for `Outer`
+ 
+ error[E0038]: the trait `MyTrait` cannot be made into an object
+   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:16:6
+    |
+ LL | impl dyn MyTrait {
+    |      ^^^^^^^^^^^ `MyTrait` cannot be made into an object
+ note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+    |
+    |
+ LL | trait MyTrait {
+    |       ------- this trait cannot be made into an object...
+ LL |     fn foo(&self) -> impl Marker;
+    |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
+    = help: consider moving `foo` to another trait
+    = help: only type `Outer` implements the trait, consider using it directly instead
+ 
+ error[E0038]: the trait `MyTrait` cannot be made into an object
+   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:18:15
+    |
+ LL |     fn other(&self) -> impl Marker {
+    |               ^^^^ `MyTrait` cannot be made into an object
+ note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+   --> $DIR/cycle-effective-visibilities-during-object-safety.rs:5:22
+    |
+    |
+ LL | trait MyTrait {
+    |       ------- this trait cannot be made into an object...
+ LL |     fn foo(&self) -> impl Marker;
+    |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
+    = help: consider moving `foo` to another trait
+    = help: only type `Outer` implements the trait, consider using it directly instead
75 error: aborting due to 6 previous errors
76 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety/cycle-effective-visibilities-during-object-safety.stderr
To only update this specific test, also pass `--test-args impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety" "-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/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:20:22
   |
LL |         MyTrait::foo(&self)
   |         ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
   |         required by a bound introduced by this call
   |
   |
   = help: the trait `MyTrait` is implemented for `Outer`

error[E0038]: the trait `MyTrait` cannot be made into an object
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:20:9
   |
LL |         MyTrait::foo(&self)
   |         ^^^^^^^^^^^^ `MyTrait` cannot be made into an object
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:5:22
   |
   |
LL | trait MyTrait {
   |       ------- this trait cannot be made into an object...
LL |     fn foo(&self) -> impl Marker;
   |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
   = help: consider moving `foo` to another trait
   = help: only type `Outer` implements the trait, consider using it directly instead

error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:20:9
   |
LL |         MyTrait::foo(&self)
   |         ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
   |
   = help: the trait `MyTrait` is implemented for `Outer`

error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:20:9
   |
LL |         MyTrait::foo(&self)
   |         ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
   |
   = help: the trait `MyTrait` is implemented for `Outer`

error[E0038]: the trait `MyTrait` cannot be made into an object
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:16:6
   |
LL | impl dyn MyTrait {
   |      ^^^^^^^^^^^ `MyTrait` cannot be made into an object
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:5:22
   |
   |
LL | trait MyTrait {
   |       ------- this trait cannot be made into an object...
LL |     fn foo(&self) -> impl Marker;
   |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
   = help: consider moving `foo` to another trait
   = help: only type `Outer` implements the trait, consider using it directly instead

error[E0038]: the trait `MyTrait` cannot be made into an object
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:18:15
LL |     fn other(&self) -> impl Marker {
LL |     fn other(&self) -> impl Marker {
   |               ^^^^ `MyTrait` cannot be made into an object
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
  --> /checkout/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs:5:22
   |
   |
LL | trait MyTrait {
   |       ------- this trait cannot be made into an object...
LL |     fn foo(&self) -> impl Marker;
   |                      ^^^^^^^^^^^ ...because method `foo` references an `impl Trait` type in its return type
   = help: consider moving `foo` to another trait
   = help: only type `Outer` implements the trait, consider using it directly instead
error: aborting due to 6 previous errors

Some errors have detailed explanations: E0038, E0277.
For more information about an error, try `rustc --explain E0038`.
---

+ error: unconstrained opaque type
+   --> $DIR/nested-in-anon-const.rs:13:33
+    |
+ LL |                     type B<Z> = impl Sized;
+    |
+    = note: `B` must be used in combination with a concrete type within the same item
+ 
1 error[E0308]: mismatched types
---
- 
- error: unconstrained opaque type
-   --> $DIR/nested-in-anon-const.rs:13:33
-    |
- LL |                     type B<Z> = impl Sized;
-    |
-    = note: `B` must be used in combination with a concrete type within the same item
17 
18 error: aborting due to 2 previous errors
---
--- stderr -------------------------------
error: unconstrained opaque type
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/nested-in-anon-const.rs:13:33
   |
LL |                     type B<Z> = impl Sized;
   |
   = note: `B` must be used in combination with a concrete type within the same item

error[E0308]: mismatched types
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/nested-in-anon-const.rs:12:17
   |
LL | /                 { //~ ERROR mismatched types
LL | |                     type B<Z> = impl Sized;
LL | |                     //~^ ERROR unconstrained opaque type
   | |_________________^ expected `usize`, found `()`

error: aborting due to 2 previous errors

@matthiaskrgr matthiaskrgr deleted the rollup-lfwsvai branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.