Skip to content

'Assertion i == total failed' in str::char_len #654

@jruderman

Description

@jruderman

rt: 9736:main:main: upcall fail 'Assertion i == total failed', ../src/lib/str.rs:279

use std;
use rustc;

import std::fs;
import std::io;
import std::vec;

import rustc::back::link;
import rustc::syntax::ast;
import rustc::syntax::print::pprust;
import driver = rustc::driver::rustc;
import rustc::driver::session;

fn main(vec[str] args) {
    auto file = "../src/test/run-pass/utf8.rs";

    auto binary = vec::shift[str](args);
    auto binary_dir = fs::dirname(binary);

    let @session::options sopts =
        @rec(library=false,
             static=false,
             optimize=0u,
             debuginfo=false,
             verify=true,
             run_typestate=true,
             save_temps=false,
             stats=false,
             time_passes=false,
             time_llvm_passes=false,
             output_type=link::output_type_bitcode,
             library_search_paths=[binary_dir + "/lib"],
             sysroot=driver::get_default_sysroot(binary),
             cfg=~[],
             test=false);

    auto stdout = std::io::stdout();
    let session::session sess = driver::build_session(sopts);
    let @ast::crate crate = driver::parse_input(sess, ~[], file);
    pprust::print_crate(sess.get_codemap(), crate, file, stdout, pprust::no_ann());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions