Skip to content

unresolved import: there is no as_utf16_p in std::os::win32 #9053

Closed
@klutzy

Description

@klutzy

On win32,

use std::os::win32::as_utf16_p;
fn main() {}

gives "error: unresolved import: there is no as_utf16_p in std::os::win32".

With RUST_LOG=rustc, rustc gives some info:

~"(resolving single import) resolving `as_utf16_p` = `std::os::win32::as_utf16_p` from `???`"
~"(populating external module) attempting to populate std::os::win32"
~"(populating external module) ... found ident: SYSNAME"
~"(building reduced graph for external crate) building value (fn/static) SYSNAME"
~"(populating external module) ... found ident: DLL_PREFIX"
~"(building reduced graph for external crate) building value (fn/static) DLL_PREFIX"
~"(populating external module) ... found ident: DLL_SUFFIX"
~"(building reduced graph for external crate) building value (fn/static) DLL_SUFFIX"
~"(populating external module) ... found ident: EXE_SUFFIX"
~"(building reduced graph for external crate) building value (fn/static) EXE_SUFFIX"
tmp.rs:1:4: 1:30 error: unresolved import: there is no `as_utf16_p` in `std::os::win32`
tmp.rs:1 use std::os::win32::as_utf16_p;
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
tmp.rs:1:4: 1:30 error: failed to resolve import `std::os::win32::as_utf16_p`
tmp.rs:1 use std::os::win32::as_utf16_p;
             ^~~~~~~~~~~~~~~~~~~~~~~~~~

Seems like resolver cannot find any function inside std::os::win32.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metadataArea: Crate metadataA-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions