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

Gate async fn trait bound modifier on async_trait_bounds #132612

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

This PR moves async Fn() trait bounds into a new feature gate: feature(async_trait_bounds). The general vibe is that we will most likely stabilize the feature(async_closure) without the async Fn() trait bound modifier, so we need to gate that separately.

We're trying to work on the general vision of async trait bound modifier general in: rust-lang/rfcs#3710, however that RFC still needs more time for consensus to converge, and we've decided that the value that users get from calling the bound async Fn() is not really worth blocking landing async closures in general.

This is blocked on #132611, since moving these tests to AsyncFn is annoying without a prelude import.

r? @ghost

@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. labels Nov 4, 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
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 27.9s done
#16 DONE 34.7s
##[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-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
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-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--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-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
...

failures:

---- [coverage-map] tests/coverage/async_closure.rs stdout ----
Saved the actual cov-map to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/coverage/async_closure.coverage-map/async_closure.cov-map"
diff of cov-map:
1 Function name: async_closure::call_once::<async_closure::main::{closure#0}>
1 Function name: async_closure::call_once::<async_closure::main::{closure#0}>
- Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 00, 2c]
+ Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 00, 2b]
4 - file 0 => global file 1
5 Number of expressions: 0

6 Number of file 0 mappings: 1
6 Number of file 0 mappings: 1
- - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 44)
+ - Code(Counter(0)) at (prev + 7, 1) to (start + 0, 43)
8 Highest counter ID seen: c0
10 Function name: async_closure::call_once::<async_closure::main::{closure#0}>::{closure#0}


- Raw bytes (14): 0x[01, 01, 00, 02, 01, 07, 2c, 01, 0e, 05, 02, 01, 00, 02]
+ Raw bytes (14): 0x[01, 01, 00, 02, 01, 07, 2b, 01, 0e, 05, 02, 01, 00, 02]
13 - file 0 => global file 1
14 Number of expressions: 0

15 Number of file 0 mappings: 2
15 Number of file 0 mappings: 2
- - Code(Counter(0)) at (prev + 7, 44) to (start + 1, 14)
+ - Code(Counter(0)) at (prev + 7, 43) to (start + 1, 14)
17 - Code(Counter(1)) at (prev + 2, 1) to (start + 0, 2)
18 Highest counter ID seen: c1


The actual cov-map differed from the expected cov-map.


error: 1 errors occurred comparing coverage output.
status: exit status: 0
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/coverage-dump" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/coverage/async_closure.coverage-map/async_closure.ll"
Function name: async_closure::call_once::<async_closure::main::{closure#0}>
Function name: async_closure::call_once::<async_closure::main::{closure#0}>
Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 00, 2b]
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 43)
Highest counter ID seen: c0
Function name: async_closure::call_once::<async_closure::main::{closure#0}>::{closure#0}
Function name: async_closure::call_once::<async_closure::main::{closure#0}>::{closure#0}
Raw bytes (14): 0x[01, 01, 00, 02, 01, 07, 2b, 01, 0e, 05, 02, 01, 00, 02]
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 2
Number of file 0 mappings: 2
- Code(Counter(0)) at (prev + 7, 43) to (start + 1, 14)
- Code(Counter(1)) at (prev + 2, 1) to (start + 0, 2)
Highest counter ID seen: c1
Function name: async_closure::main
Function name: async_closure::main
Raw bytes (14): 0x[01, 01, 00, 02, 01, 0b, 01, 01, 16, 01, 02, 05, 02, 02]
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 2
Number of file 0 mappings: 2
- Code(Counter(0)) at (prev + 11, 1) to (start + 1, 22)
- Code(Counter(0)) at (prev + 2, 5) to (start + 2, 2)
Highest counter ID seen: c0
Function name: async_closure::main::{closure#0}
Function name: async_closure::main::{closure#0}
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 23, 00, 24]
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 12, 35) to (start + 0, 36)
Highest counter ID seen: c0
Function name: async_closure::main::{closure#0}::{closure#0}::<i16>
Function name: async_closure::main::{closure#0}::{closure#0}::<i16>
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 22, 00, 24]
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 12, 34) to (start + 0, 36)
Highest counter ID seen: c0
Function name: async_closure::main::{closure#0}::{closure#1}::<i32>
Function name: async_closure::main::{closure#0}::{closure#1}::<i32>
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 23, 00, 24]
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 12, 35) to (start + 0, 36)
Highest counter ID seen: c0
stderr: none



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants