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 8 pull requests #106031

Closed
wants to merge 23 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Yiming Lei and others added 23 commits December 19, 2022 08:38
…s one in ambiguity_errors

if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same
then these 2 ambiguity errors matched
prevent identical ambiguity error from pushing into vector of ambiguity_errors
this will fix rust-lang#105177
This patch fixes a regression, in which `#[track_caller]`, which was
previously a no-op, was changed to actually turn on the behavior. This
should instead only happen behind the `closure_track_caller` feature
gate.

Also, add a warning for the user to understand how their code will
compile depending on the feature gate being turned on or not.

Fixes rust-lang#104588
This patch does the following:
- Refactor some repeated lines into a single one
- Split the `ungated_async_fn_caller` lint into multiple lines, and make
  one of those lines only print out on nightly
- Use test revisions instead of copying an existing test
This patch improves the readability of some of the code by using
if-let-chains. Also, make use of the `add_feature_diagnostics` function.
No functional changes intended.

These tests were failing under `new-symbol-mangling = true`.
This adapts the patterns to work in this case.
Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.
…caller, r=compiler-errors

Switch `#[track_caller]` back to a no-op unless feature gate is enabled

This patch fixes a regression, in which `#[track_caller]`, which was previously a no-op, was changed to actually turn on the behavior. This should instead only happen behind the `closure_track_caller` feature gate.

Also, add a warning for the user to understand how their code will compile depending on the feature gate being turned on or not.

Fixes rust-lang#104588
add function to tell the identical errors for ambiguity_errors

if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same we call these 2 ambiguity errors identical
prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix rust-lang#105177
Suggest associated const on possible capitalization mistake

Suggest `i32::MAX` if we typed `i32::max` without making a function call.

Fixes rust-lang#93844
Re-enable `Fn` trait call notation error for non-tuple argument

I have no idea why I delayed this bug... but also there doesn't seem to be a UI test that actually shows a change, so maybe that's why.

Fixes rust-lang#105936
…iasko

Add a missing early return in drop tracking `handle_uninhabited_return`

This return is needed so we don't call `Ty::is_inhabited_from` from a type with ty/ct vars in it.

Fixes rust-lang#105981
codegen tests: adapt patterns to also work with v0 symbol mangling

No functional changes intended.

These tests were failing under `new-symbol-mangling = true`, cf. https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/a.20few.20panic-abort.20tests.20fail.20under.20.60new-symbol-mangling.60.
This adapts the patterns to work in this case.
… r=compiler-errors

Give opaque types a better coherence error
…notriddle

Fix ICE due to `todo!()` in `rustdoc` for `Term`s

Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.

Fixes rust-lang#105952.

Should I add some annotations to the rustdoc test?
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 22, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Dec 22, 2022

📌 Commit c27553f 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 Dec 22, 2022
@bors
Copy link
Contributor

bors commented Dec 22, 2022

⌛ Testing commit c27553f with merge 2690fe50cb7207671e7afd9eb54965df827c42af...

@rust-log-analyzer
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] src/test/ui/transmutability/primitives/numbers.rs ... ok

failures:

---- [ui] src/test/ui/generator/unresolved-ct-var.rs#stock stdout ----
thread '[ui] src/test/ui/generator/unresolved-ct-var.rs#stock' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 39, kind: DirectoryNotEmpty, message: "Directory not empty" }', src/tools/compiletest/src/runtest.rs:2871:47

---- [ui] src/test/ui/generator/unresolved-ct-var.rs#drop_tracking stdout ----
diff of stderr:


+ error: Failed to delete invalidated or incompatible incremental compilation session directory contents `$TEST_BUILD_DIR/generator/unresolved-ct-var/unresolved-ct-var.inc/unresolved_ct_var-25ai3o8jofo30/s-ggkfizoe8g-137zrl-working/dep-graph.bin`: No such file or directory (os error 2).
+ 
+ error: failed to create dependency graph at `$TEST_BUILD_DIR/generator/unresolved-ct-var/unresolved-ct-var.inc/unresolved_ct_var-25ai3o8jofo30/s-ggkfizoe8g-137zrl-working/dep-graph.part.bin`: No such file or directory (os error 2)
+ 
1 error[E0277]: `[(); _]` is not a future
3    |


72 LL |         let s = std::array::from_fn(|_| ()).await;
74 
- error: aborting due to 6 previous errors
+ error: aborting due to 8 previous errors
76 
76 
77 Some errors have detailed explanations: E0277, E0698.
78 For more information about an error, try `rustc --explain E0277`.


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generator/unresolved-ct-var.drop_tracking/unresolved-ct-var.drop_tracking.stderr
To only update this specific test, also pass `--test-args generator/unresolved-ct-var.rs`


error in revision `drop_tracking`: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/generator/unresolved-ct-var.rs" "-Zthreads=1" "--target=i586-unknown-linux-gnu" "--cfg" "drop_tracking" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generator/unresolved-ct-var/unresolved-ct-var.inc" "-Z" "incremental-verify-ich" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generator/unresolved-ct-var.drop_tracking" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i586-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=i586-unknown-linux-gnu-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generator/unresolved-ct-var.drop_tracking/auxiliary" "--edition=2021" "-Zdrop-tracking"
stdout: none
--- stderr -------------------------------
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generator/unresolved-ct-var/unresolved-ct-var.inc/unresolved_ct_var-25ai3o8jofo30/s-ggkfizoe8g-137zrl-working/dep-graph.bin`: No such file or directory (os error 2).

error: failed to create dependency graph at `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generator/unresolved-ct-var/unresolved-ct-var.inc/unresolved_ct_var-25ai3o8jofo30/s-ggkfizoe8g-137zrl-working/dep-graph.part.bin`: No such file or directory (os error 2)

error[E0277]: `[(); _]` is not a future
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=i586-unknown-linux-gnu
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;
   |                 |                          |
   |                 |                          |
   |                 |                          `[(); _]` is not a future
   |                 |                          help: remove the `.await`
   |                 this call returns `[(); _]`
   |
   = help: the trait `Future` is not implemented for `[(); _]`
   = note: [(); _] must be a future or must implement `IntoFuture` to be awaited
   = note: required for `[(); _]` to implement `IntoFuture`

error[E0698]: type inside `async` block must be known in this context
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;
   |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
   |
note: the type is part of the `async` block because of this `await`
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;


error[E0698]: type inside `async` block must be known in this context
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;
   |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
   |
note: the type is part of the `async` block because of this `await`
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;


error[E0698]: type inside `async` block must be known in this context
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;
   |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
   |
note: the type is part of the `async` block because of this `await`
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;


error[E0698]: type inside `async` block must be known in this context
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;
   |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
   |
note: the type is part of the `async` block because of this `await`
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;


error[E0698]: type inside `async` block must be known in this context
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;
   |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
   |
note: the type is part of the `async` block because of this `await`
   |
   |
LL |         let s = std::array::from_fn(|_| ()).await;

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0277, E0698.

@bors
Copy link
Contributor

bors commented Dec 22, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 22, 2022
@matthiaskrgr matthiaskrgr deleted the rollup-npu5khn branch December 22, 2022 10:47
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 23, 2022
…r=Mark-Simulacrum

Take revision into account in non-incremental-mode `// incremental` tests

A UI test I added in rust-lang#105983 confusingly [failed](rust-lang#106031 (comment)) in a merge because two different revisions raced with each other for the same incremental directory for a (non-incremental-mode, i.e. `src/test/ui`) UI test.

Let's take the revision name into account when generating an incremental directory so that other UI tests that combine `// incremental` and `// revisions` won't race and cause possible flakiness in CI.
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Dec 24, 2022
…mulacrum

Take revision into account in non-incremental-mode `// incremental` tests

A UI test I added in #105983 confusingly [failed](rust-lang/rust#106031 (comment)) in a merge because two different revisions raced with each other for the same incremental directory for a (non-incremental-mode, i.e. `src/test/ui`) UI test.

Let's take the revision name into account when generating an incremental directory so that other UI tests that combine `// incremental` and `// revisions` won't race and cause possible flakiness in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic rollup A PR which is a rollup 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-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.

10 participants