Skip to content

Untitled #145

Closed
Closed
@jyasskin

Description

@jyasskin

Compiling:

use std;
import std._str;
import std.os;

unsafe fn main() {
  auto name = "hello.txt";
  auto name_buf = _str.buf(name);
  auto fd = os.libc.open(name_buf, 0, 0u);
}

fails with:

/Users/jyasskin/tmp/sbuf_type_error.rs:8:24 - 8:41:E:Error: mismatched types: expected <native#10> but found <native#0>

That line calls os.libc.open() with a parameter of type _str.sbuf, which matches, but the type resolution doesn't seem to get it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions