Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f5d6eb3
hir: Stop keeping prefixes for most of `use` list stems
petrochenkov Jan 30, 2024
17f0919
rustc_monomorphize: fix outdated comment in partition
klensy Feb 3, 2024
934618f
Emit a diagnostic for invalid target options
saethlin Feb 4, 2024
a4cb55f
For E0223, suggest methods that look similar to the path
trevyn Feb 3, 2024
285d8c2
Suggest `[tail @ ..]` on `[..tail]` and `[...tail]` where `tail` is u…
fmease Feb 3, 2024
e8c3cbf
Make `Diagnostic::is_error` return false for `Level::FailureNote`.
nnethercote Jan 30, 2024
5dd0431
Tighten the assertion in `downgrade_to_delayed_bug`.
nnethercote Jan 31, 2024
c367386
Refactor `emit_diagnostic`.
nnethercote Jan 31, 2024
59e0bc2
Split `Level::DelayedBug` in two.
nnethercote Jan 31, 2024
9cd6c68
cleanup effect var handling
lcnr Feb 5, 2024
d9508a1
Make `Emitter::emit_diagnostic` consuming.
nnethercote Feb 2, 2024
f32aa1a
rustc_metadata: fix typo
klensy Feb 5, 2024
d321437
Remove b-naber from the compiler review rotation
fmease Feb 5, 2024
0b6af71
Create helper `maybe_report_similar_assoc_fn`
trevyn Feb 6, 2024
25635b9
miri: fix ICE with symbolic alignment check on extern static
RalfJung Feb 5, 2024
f130878
Make async closures test use async bound modifier
compiler-errors Feb 6, 2024
5587be8
Rollup merge of #120520 - nnethercote:rename-good-path, r=oli-obk
matthiaskrgr Feb 6, 2024
a3d3ccf
Rollup merge of #120575 - nnethercote:simplify-codegen-diag-handling,…
matthiaskrgr Feb 6, 2024
89aa85d
Rollup merge of #120597 - fmease:sugg-on-js-style-spread-op-in-pat, r…
matthiaskrgr Feb 6, 2024
5a2cec2
Rollup merge of #120602 - klensy:mono-comment, r=nnethercote
matthiaskrgr Feb 6, 2024
3731acc
Rollup merge of #120609 - petrochenkov:nousestem2, r=compiler-errors
matthiaskrgr Feb 6, 2024
8906977
Rollup merge of #120631 - saethlin:invalid-target-ice, r=compiler-errors
matthiaskrgr Feb 6, 2024
eae477d
Rollup merge of #120632 - trevyn:issue-109195, r=oli-obk
matthiaskrgr Feb 6, 2024
cee6212
Rollup merge of #120670 - lcnr:effect-var-storage, r=fee1-dead
matthiaskrgr Feb 6, 2024
054fa0b
Rollup merge of #120673 - klensy:typo2, r=compiler-errors
matthiaskrgr Feb 6, 2024
6908d3e
Rollup merge of #120683 - RalfJung:symbolic-alignment-ice, r=oli-obk
matthiaskrgr Feb 6, 2024
0ab3f01
Rollup merge of #120690 - fmease:review-rotation-update, r=compiler-e…
matthiaskrgr Feb 6, 2024
d98a8a1
Rollup merge of #120713 - compiler-errors:async-bounds-on-tests, r=fm…
matthiaskrgr Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
// FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this.
// ignore-pass (test emits codegen-time warnings)

#![feature(async_closure, async_fn_traits)]
#![feature(async_closure)]

extern crate block_on;

use std::ops::AsyncFnMut;

fn main() {
block_on::block_on(async {
let x = async || {};

async fn needs_async_fn_mut(mut x: impl AsyncFnMut()) {
async fn needs_async_fn_mut(mut x: impl async FnMut()) {
x().await;
}
needs_async_fn_mut(x).await;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
// FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this.
// ignore-pass (test emits codegen-time warnings)

#![feature(async_closure, async_fn_traits)]
#![feature(async_closure)]

extern crate block_on;

use std::ops::AsyncFnOnce;

fn main() {
block_on::block_on(async {
let x = async || {};

async fn needs_async_fn_once(x: impl AsyncFnOnce()) {
async fn needs_async_fn_once(x: impl async FnOnce()) {
x().await;
}
needs_async_fn_once(x).await;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/async-closures/auxiliary/block-on.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// edition: 2021

#![feature(async_closure, noop_waker, async_fn_traits)]
#![feature(async_closure, noop_waker)]

use std::future::Future;
use std::pin::pin;
Expand Down
5 changes: 2 additions & 3 deletions tests/ui/async-await/async-closures/brand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
// edition:2021
// build-pass

#![feature(async_closure, async_fn_traits)]
#![feature(async_closure)]

extern crate block_on;

use std::future::Future;
use std::marker::PhantomData;
use std::ops::AsyncFn;

struct S;
struct B<'b>(PhantomData<&'b mut &'b mut ()>);

impl S {
async fn q<F: AsyncFn(B<'_>)>(self, f: F) {
async fn q<F: async Fn(B<'_>)>(self, f: F) {
f(B(PhantomData)).await;
}
}
Expand Down
6 changes: 2 additions & 4 deletions tests/ui/async-await/async-closures/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
// run-pass
// check-run-results

#![feature(async_closure, async_fn_traits)]
#![feature(async_closure)]
#![allow(unused)]

extern crate block_on;

use std::ops::AsyncFnOnce;

struct DropMe(i32);

impl Drop for DropMe {
Expand All @@ -18,7 +16,7 @@ impl Drop for DropMe {
}
}

async fn call_once(f: impl AsyncFnOnce()) {
async fn call_once(f: impl async FnOnce()) {
println!("before call");
let fut = Box::pin(f());
println!("after call");
Expand Down
7 changes: 3 additions & 4 deletions tests/ui/async-await/async-closures/mangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@
// FIXME(async_closures): When `fn_sig_for_fn_abi` is fixed, remove this.
// ignore-pass (test emits codegen-time warnings)

#![feature(async_closure, noop_waker, async_fn_traits)]
#![feature(async_closure, noop_waker)]

extern crate block_on;

use std::future::Future;
use std::ops::{AsyncFnMut, AsyncFnOnce};
use std::pin::pin;
use std::task::*;

async fn call_mut(f: &mut impl AsyncFnMut()) {
async fn call_mut(f: &mut impl async FnMut()) {
f().await;
}

async fn call_once(f: impl AsyncFnOnce()) {
async fn call_once(f: impl async FnOnce()) {
f().await;
}

Expand Down
8 changes: 3 additions & 5 deletions tests/ui/async-await/async-closures/wrong-fn-kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

// FIXME(async_closures): This needs a better error message!

#![feature(async_closure, async_fn_traits)]

use std::ops::AsyncFn;
#![feature(async_closure)]

fn main() {
fn needs_async_fn(_: impl AsyncFn()) {}
fn needs_async_fn(_: impl async Fn()) {}

let mut x = 1;
needs_async_fn(async || {
//~^ ERROR i16: ops::async_function::internal_implementation_detail::AsyncFnKindHelper<i8>
// FIXME: Should say "closure is AsyncFnMut but it needs AsyncFn" or sth.
// FIXME: Should say "closure is `async FnMut` but it needs `async Fn`" or sth.
x += 1;
});
}
10 changes: 5 additions & 5 deletions tests/ui/async-await/async-closures/wrong-fn-kind.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
error[E0277]: the trait bound `i16: ops::async_function::internal_implementation_detail::AsyncFnKindHelper<i8>` is not satisfied
--> $DIR/wrong-fn-kind.rs:13:20
--> $DIR/wrong-fn-kind.rs:11:20
|
LL | needs_async_fn(async || {
| _____--------------_^
| | |
| | required by a bound introduced by this call
LL | |
LL | | // FIXME: Should say "closure is AsyncFnMut but it needs AsyncFn" or sth.
LL | | // FIXME: Should say "closure is `async FnMut` but it needs `async Fn`" or sth.
LL | | x += 1;
LL | | });
| |_____^ the trait `ops::async_function::internal_implementation_detail::AsyncFnKindHelper<i8>` is not implemented for `i16`
|
note: required by a bound in `needs_async_fn`
--> $DIR/wrong-fn-kind.rs:10:31
--> $DIR/wrong-fn-kind.rs:8:31
|
LL | fn needs_async_fn(_: impl AsyncFn()) {}
| ^^^^^^^^^ required by this bound in `needs_async_fn`
LL | fn needs_async_fn(_: impl async Fn()) {}
| ^^^^^^^^^^ required by this bound in `needs_async_fn`

error: aborting due to 1 previous error

Expand Down