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

std cannot be compiled on win7 targets #126109

Closed
823984418 opened this issue Jun 7, 2024 · 4 comments · Fixed by #126110
Closed

std cannot be compiled on win7 targets #126109

823984418 opened this issue Jun 7, 2024 · 4 comments · Fixed by #126110
Labels
C-bug Category: This is a bug. O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@823984418
Copy link
Contributor

823984418 commented Jun 7, 2024

The relevant commit seem to be located at
rust-lang/backtrace-rs@7d26334

Meta

rustc 1.80.0-nightly (a330e4959 2024-06-04)
binary: rustc
commit-hash: a330e49593ee890f9197727a3a558b6e6b37f843
commit-date: 2024-06-04
host: x86_64-pc-windows-msvc
release: 1.80.0-nightly
LLVM version: 18.1.6
Error

error[E0308]: `if` and `else` have incompatible types
   --> D:\Program Files\rust\rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\..\..\backtrace\src\symbolize\dbghelp.rs:111:9
    |
104 |       let resolve_inner = if (*dbghelp.dbghelp()).SymAddrIncludeInlineTrace().is_some() {
    |  _________________________-
105 | |         // We are on a version of dbghelp 6.2+, which contains the more modern
106 | |         // Inline APIs.
107 | |         resolve_with_inline
    | |         ------------------- expected because of this
...   |
111 | |         resolve_legacy
    | |         ^^^^^^^^^^^^^^ expected `Option<()>`, found `()`
112 | |     };
    | |_____- `if` and `else` have incompatible types
    |
    = note: expected fn item `unsafe for<'a, 'b> fn(&'a Init, _, Option<_>, &'b mut (dyn for<'a> core::ops::FnMut(&'a symbolize::Symbol) + 'b)) -> Option<()> {resolve_with_inline}`
               found fn item `unsafe for<'a, 'b> fn(&'a Init, _, Option<_>, &'b mut (dyn for<'a> core::ops::FnMut(&'a symbolize::Symbol) + 'b)) {resolve_legacy}`

@823984418 823984418 added the C-bug Category: This is a bug. label Jun 7, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 7, 2024
@823984418 823984418 changed the title std无法在win7目标上编译 std cannot be compiled on win7targets Jun 7, 2024
@823984418 823984418 changed the title std cannot be compiled on win7targets std cannot be compiled on win7 targets Jun 7, 2024
@workingjubilee
Copy link
Contributor

Ah.
cc @ChrisDenton

@workingjubilee
Copy link
Contributor

Ah, this was fixed in rust-lang/backtrace-rs#631

@jieyouxu jieyouxu added O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 7, 2024
@823984418
Copy link
Contributor Author

Ah, this was fixed in rust-lang/backtrace-rs#631

Okay, it seems like this is just a misunderstanding.win7 keywords cannot be searched Windows 7...

@workingjubilee
Copy link
Contributor

@823984418 This won't be actually fixed in std until #126110 lands.

@bors bors closed this as completed in e3c3ce6 Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants